View Single Post
  #10  
Old 31st October 2008, 18:48
quentusrex quentusrex is offline
Senior Member
 
Join Date: May 2008
Posts: 174
Thanks: 6
Thanked 11 Times in 7 Posts
Default

// get the ID of the client
if($_SESSION["s"]["user"]["typ"] != 'admin') {
$client_group_id = $_SESSION["s"]["user"]["default_group"];
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
$client_id = intval($client["client_id"]);
} else {
//$client_id = intval($this->dataRecord["client_group_id"]);
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".intval($this->dataRecord["client_group_id"]));
$client_id = intval($client["client_id"]);
}

// Set the values for document_root, system_user and system_group
$system_user = 'web'.$this->id;
$system_group = 'client'.$client_id;
$document_root = str_replace("[client_id]",$client_id,$document_root);


It seems that SQL statement returns the wrong id ....
Reply With Quote