ispconfig 3 client fix (?)
When someone login as client (reseller) and create his own clients, when he create a new site, the dropdown box to select client for this site is empty. Also the label "Client" does not appear. The changes I've made to fix this are:
The diff for the file web_domain_edit.php:
Start of diff.
99,100c99,103 < $client = $app->db->queryOneRecord("SELECT client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); < ---
// at change // $client = $app->db->queryOneRecord("SELECT client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); $client = $app->db->queryOneRecord("SELECT client.client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.parent_client_id AND client.parent_client_id = ".
client['client_id'];
107c110,114
< // at change > // $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.parent_client_id AND client.parent_client_id = ".$client['client_id']; $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
109a117,123
// at change $selected = ''; $clientid = $_SESSION['s']['user']['sys_groupid']; $clientusername = $_SESSION['s']['user']['username']; $client_select .= "<option value='$clientid' $selected>$clientusername</option>\r\n";
112a127
342c357 < ?> \ No newline at end of file
?>
End of diff.
And for the "Client" label to appear, must enter a new line to language file like this:
$wb["client_group_id_txt"] = 'Client';
In the previous email I sent you I forgot to mention a change I've made that shows the username in the header, at left of top navigation:
diff for topnav.tpl.htm:
0a1
and diff for nav.php:
40c40 < ---
52a53,55
$app->tpl->setVar('headusername','User: '.$_SESSION["s"]["user"]["username"]);