From ad955792a8ade5c0015aa3d68f86b1035c1acc31 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Wed, 22 Jan 2014 11:30:52 -0500 Subject: [PATCH] Fixed bug from previous commit --- interface/web/client/domain_edit.php | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/interface/web/client/domain_edit.php b/interface/web/client/domain_edit.php index 13e35b8..24a4c81 100644 --- a/interface/web/client/domain_edit.php +++ b/interface/web/client/domain_edit.php @@ -38,8 +38,8 @@ * End Form configuration ******************************************/ -require_once('../../lib/config.inc.php'); -require_once('../../lib/app.inc.php'); +require_once '../../lib/config.inc.php'; +require_once '../../lib/app.inc.php'; //* Check permissions for module $app->auth->check_module_permissions('client'); @@ -50,7 +50,7 @@ //* load language file $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'.lng'; -include($lng_file); +include $lng_file; class page_action extends tform_actions { @@ -69,7 +69,8 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') { // Getting Clients of the user - $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name"; + //$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name"; + $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name"; $clients = $app->db->queryAllRecords($sql); $client_select = ''; if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>"; @@ -80,7 +81,7 @@ $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } - $app->tpl->setVar("client_group_id",$client_select); + $app->tpl->setVar("client_group_id", $client_select); } @@ -146,9 +147,10 @@ $app->db->query("UPDATE domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id); } } + } $page = new page_action; $page->onLoad(); -?> \ No newline at end of file +?> -- Gitblit v1.9.1