vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   how is this simply done ? (https://vborg.vbsupport.ru/showthread.php?t=42697)

Vinney 08-24-2002 05:52 PM

my example :

if (!$bbuserinfo[usergroupid]==1 || $bbuserinfo[usergroupid]==3 || $bbuserinfo[usergroupid]==11) {

your example:

if($bbuserinfo[usergroupid] != 1 || $bbuserinfo[usergroupid] != 3 || $bbuserinfo[usergroupid] != 11) {

( can the above be done ? - why does mine have double '==' and yours dont. - can you explain this please )

BTW am restrcing it to groupid 1, 3 and 11 , anthing else gets the error.

ps. Does the rest of my script too correct ( btw is all does work - am just wondering if i have done anything funny or wondering if there is a 'better' way to get the same result.

Thanks g-force2k , you have been loads of help.

g-force2k2 08-24-2002 06:02 PM

well the Vinney your code is correct... all mine stated was that if usergroupid isn't equal to two then show the error...

the difference btw the codes is that:

== <-- means is equal to

!= <-- means is not equal to

btw your code looks fine :)

g-force2k2

Vinney 08-24-2002 09:53 PM

ok am trying to get too big for my boots here, i cant seem to get this to work:

know why ?

<?php
error_reporting(7);
include ("../../mainfile.php");
$index = 1;
global $Pmenu,$breadcrumb;
$Pmenu="";
$breadcrumb="Account Activation";
$defaultmessage = "Your message here... \n\n - $bbuserinfo[username]";
$defaultemail = "$bbuserinfo[email]";
$unwantedgroups = array('1', '6', '11');
getvbpvars();
include("header.php");
//OpenTable();
if ($bbuserinfo[usergroupid] == $unwantedgroups) {
eval("dooutput(\"".gettemplate('contact_error')."\ ");");
} else {
eval("dooutput(\"".gettemplate('contact')."\");");
}
//CloseTable();
include("footer.php");
?>

am trying to use an array, to get the same result.

g-force2k2 08-25-2002 05:04 AM

Vinny you'll probably have to explode the array... im not that great with arrays and exploding :P so i suggest just using the way you had had it :) regards...

g-force2k2


All times are GMT. The time now is 01:23 AM.

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.01143 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete