vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Q about usergroupid permission ! (https://vborg.vbsupport.ru/showthread.php?t=44482)

Trident 10-10-2002 07:30 PM

Q about usergroupid permission !
 
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

Code:

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

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 .


All times are GMT. The time now is 01:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01081 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete