I have tried doing it with Session variables but it still isn't working this is my code...
<?php session_start(); ?>
<?php require_once('../Connections/extratime.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
$colname_client = "-1";
if (isset($_GET['Login_ClientID'])) {
$colname_client = $_GET['Login_ClientID'];
}
mysql_select_db($database_extratime, $extratime);
$query_client = sprintf("SELECT customercontacts.`Ref`, customercontacts.Title, customercontacts.Surname, customercontacts.FirstName, customercontacts.ClientType, customercontacts.ClientTypeLevel FROM customercontacts WHERE customercontacts.`Ref`=%s", GetSQLValueString($colname_client, "int"));
$client = mysql_query($query_client, $extratime) or die(mysql_error());
$row_client = mysql_fetch_assoc($client);
$totalRows_client = mysql_num_rows($client);
?>
<?php
if (!session_id()) session_start();
if("" == "") {
$_SESSION["clienttypelevel"] = "".$row_client['ClientTypeLevel'] ."";
}
?>
<?php require_once( "../webassist/security_assist/helper_php.php" ); ?>
<?php
if (!WA_Auth_RulePasses("mlogin")){
WA_Auth_RestrictAccess("../login/index.php");
}
?>
And the helpergroupsrulesphp...
<?php
function WA_Auth_GetComparisonsForRule($ruleName){
$comparisons = array();
switch ($ruleName){
case "login":
$comparisons[0] = array(TRUE, "".((isset($_SESSION['clienttypelevel']))?$_SESSION['clienttypelevel']:"") ."", 1, "2");
break;
case "mlogin":
$comparisons[0] = array(TRUE, "".((isset($_SESSION['clienttypelevel']))?$_SESSION['clienttypelevel']:"") ."", 1, "1");
break;
}
return $comparisons;
}
function WA_Auth_GetGroup($groupName){
$group = Array();
switch($groupName){
}
return $group;
}
?>