Log in

View Full Version : Q about usergroupid permission !


Trident
10-10-2002, 07:30 PM
hi,

in my forum i have file php in the admin folder , it making cool thread in type on the head of the forum as marquee, permission for admins only .. i want to alow supermods and mods log in . this is code on top of the file :

require("./global.php");
if ($bbuserinfo[userid]==0) show_nopermission();
if ($bbuserinfo[usergroupid]!=6) {
echo "admins only";
exit;
}

i tried this :
require("./global.php");
if ($bbuserinfo[userid]==0) show_nopermission();
if (($bbuserinfo[usergroupid]!=6) or ($bbuserinfo[usergroupid] == 5) or ($bbuserinfo[usergroupid] == 7)) {
echo "login for admins,supermod,mods only";
exit;
}

also tried move the file to main vb directory but not worked !!

any idea ?

thanks,

Xenon
10-10-2002, 07:37 PM
if (($bbuserinfo[usergroupid]!=6) or ($bbuserinfo[usergroupid] == 5) or ($bbuserinfo[usergroupid] == 7)) {

can't work, try that:
if (($bbuserinfo[usergroupid]!=6 and $bbuserinfo[usergroupid] != 5 and $bbuserinfo[usergroupid] != 7) {

Trident
10-10-2002, 07:52 PM
You are a great man Xenon :)

it is worked fine .

but you are forgot " ) " end of the code ;)

thank you again .

Xenon
10-10-2002, 08:02 PM
you're welcome :)

no i didn't forgot it, i've made a ( too much at the front of the codeline ;)

Trident
10-10-2002, 08:19 PM
ha ha ha :)

you are right :)

but i made more ) in the end , and it worked :D .. so we are right :D

THANK YOU ALOT .