PDA

View Full Version : Secure VBstats Page?


Renegade
03-10-2002, 11:28 PM
How can I secure the VBstats page from particular groups of users? For example I only want to allow the Moderators and Admins to be able view the VBstats page.

thx in advance,

ReN

FWC
03-11-2002, 03:12 AM
Replace:if ($bbuserinfo[userid]==0) {
show_nopermission();
}withif ($bbuserinfo['usergroupid']!=6 or $bbuserinfo['usergroupid']!=5 or $bbuserinfo['usergroupid']!=7) {
show_nopermission();
}

If you don't already have that first block, just add the second block under:require('./vbslang_en.php'); // Future Language File

Renegade
03-11-2002, 09:35 AM
Thank you for such a quick response! I will hack it now.....

Renegade
03-11-2002, 09:48 AM
This is a georgeous thing! It worked like a charm thank you so much!!!!

FWC
03-11-2002, 10:07 PM
Originally posted by Renegade
This is a georgeous thing! It worked like a charm thank you so much!!!! You're welcome. :)

Renegade
03-12-2002, 10:03 AM
Small problem, it seems as though no one has access now. I tried including the admin group and excluding it, but still get nopermission message.
if ($bbuserinfo['usergroupid']!=2 or $bbuserinfo['usergroupid']!=3 or $bbuserinfo['usergroupid']!=1 or $bbuserinfo['usergroupid']!=4) {
show_nopermission();

help....

Admin
03-12-2002, 10:08 AM
Change all or's in the code to and's.

Renegade
03-12-2002, 10:17 AM
:( :cry:
Still the same problem. Essentially all groups should get denied except the Admins group (6).

thx

Admin
03-12-2002, 10:23 AM
Use FWC's code and do what I said.

Renegade
03-12-2002, 12:15 PM
LOL, sorry for the confusion. That would been my next step in troubleshooting this :dead:

That worked!!!

thx again.

Admin
03-12-2002, 12:32 PM
:)

Renegade
04-07-2002, 07:49 PM
How would this chage if I need it in a page like .downloads.php which does not have the require statement for global??

thx in advance,