vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Help needed (https://vborg.vbsupport.ru/showthread.php?t=39397)

C.Birch 06-03-2002 03:58 PM

Help needed
 
Right im trying to make a password gate to a members only page on my site useing the vb members data base and that.

Im usering the following code


PHP Code:

<?php

  
include("global.php");
  if (!
$bbuserinfo[userid]) {
      eval(
"dooutput(\"".gettemplate("membersnoreg")."\");");
  } else {
  eval(
"dooutput(\"".gettemplate("membersmain")."\");");
    }

?>

thing is that will let all members in i want to make it so only a few member groups can go in anyone know how i can do this?

Admin 06-03-2002 04:13 PM

PHP Code:

<?php
error_reporting
(E_ALL & ~E_NOTICE);
require(
'./global.php');

if (
$bbuserinfo['usergroupid'] != 6) {
    eval(
"dooutput(\"".gettemplate("membersnoreg")."\");");
} else {
    eval(
"dooutput(\"".gettemplate("membersmain")."\");");
}

?>

It will let only users from usergroup 6 in.

C.Birch 06-03-2002 04:16 PM

thanx alot what do i have to do if i want more then just one user group in?

Admin 06-03-2002 04:20 PM

And [minicode]or[/minicode] to the if statement.

C.Birch 06-03-2002 04:35 PM

sorry for bugging but just how would you add it to the code im new to php

Admin 06-03-2002 04:37 PM

PHP Code:

if ($bbuserinfo['usergroupid'] != and $bbuserinfo['usergroupid'] != and $bbuserinfo['usergroupid'] != 2) { 


C.Birch 06-03-2002 04:45 PM

thanx alot :D your a star

Admin 06-03-2002 04:51 PM

You're welcome. :)


All times are GMT. The time now is 09:02 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.01002 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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