Hi,
I have a serious problem.
I made the following chat page; it is called parachat.php and this is the code:
Quote:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'parachat'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'parachat',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
$nombre = $vbulletin->userinfo['username'];
$navbits = array();
$navbits[$parent] = '?Chat!';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('parachat') . '");');
?>
|
The "parachat" template has
conditionals... it is something like this:
Quote:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1">
<if condition="$bbuserinfo['usergroupid'] != 1 AND
$bbuserinfo['usergroupid'] != 2 AND
$bbuserinfo['usergroupid'] != 3 AND $bbuserinfo['usergroupid'] != 4 AND $bbuserinfo['usergroupid'] != 10 AND $bbuserinfo['usergroupid'] != 18 AND $bbuserinfo['usergroupid'] != 19 AND $bbuserinfo['usergroupid'] != 21">
Here it comes a chat applet.
<else />
Here it comes a message for non authorized usergroups.
<br /><br />
<if condition="$bbuserinfo['usergroupid'] == 2">
Here another message, specifically for usergroup 2 which is non-authorized for chat in my forum.
<br /><br />
</if>
</if>
</td>
</tr>
</table>
<br /><br />
$footer
</body>
</html>
|
However, one member managed to enter that page, although she is in a non-authorized usergroup (usergroup 21).
Is this a problem with the php page, or with the use of conditionals?
Could anybody help me? Thanky you in advance.