Skip to content

Commit 7d6ec3d

Browse files
committed
Implemented: FS#479 - Which domains belong to which Client
1 parent e28564d commit 7d6ec3d

File tree

4 files changed

+68
-9
lines changed

4 files changed

+68
-9
lines changed

interface/web/mail/list/mail_domain.list.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313

1414

1515
// Name of the list
16-
$liste["name"] = "mail_domain";
16+
if($_SESSION['s']['user']['typ'] == 'admin') {
17+
$liste["name"] = "mail_domain_admin";
18+
} else {
19+
$liste["name"] = "mail_domain";
20+
}
1721

1822
// Database table
1923
$liste["table"] = "mail_domain";
@@ -58,6 +62,22 @@
5862
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
5963

6064

65+
if($_SESSION['s']['user']['typ'] == 'admin') {
66+
$liste["item"][] = array( 'field' => "sys_groupid",
67+
'datatype' => "INTEGER",
68+
'formtype' => "SELECT",
69+
'op' => "=",
70+
'prefix' => "",
71+
'suffix' => "",
72+
'datasource' => array ( 'type' => 'SQL',
73+
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
74+
'keyfield'=> 'groupid',
75+
'valuefield'=> 'name'
76+
),
77+
'width' => "",
78+
'value' => "");
79+
}
80+
6181

6282
$liste["item"][] = array( 'field' => "server_id",
6383
'datatype' => "VARCHAR",

interface/web/sites/list/database.list.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313

1414

1515
// Name of the list
16-
$liste["name"] = "database";
16+
if($_SESSION['s']['user']['typ'] == 'admin') {
17+
$liste["name"] = "database_admin";
18+
} else {
19+
$liste["name"] = "database";
20+
}
1721

1822
// Database table
1923
$liste["table"] = "web_database";
@@ -66,6 +70,22 @@
6670
'width' => "",
6771
'value' => array('y' => "Yes",'n' => "No"));
6872

73+
if($_SESSION['s']['user']['typ'] == 'admin') {
74+
$liste["item"][] = array( 'field' => "sys_groupid",
75+
'datatype' => "INTEGER",
76+
'formtype' => "SELECT",
77+
'op' => "=",
78+
'prefix' => "",
79+
'suffix' => "",
80+
'datasource' => array ( 'type' => 'SQL',
81+
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
82+
'keyfield'=> 'groupid',
83+
'valuefield'=> 'name'
84+
),
85+
'width' => "",
86+
'value' => "");
87+
}
88+
6989
$liste["item"][] = array( 'field' => "server_id",
7090
'datatype' => "VARCHAR",
7191
'formtype' => "SELECT",

interface/web/sites/list/web_domain.list.php

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313

1414

1515
// Name of the list
16-
$liste["name"] = "web_domain";
16+
if($_SESSION['s']['user']['typ'] == 'admin') {
17+
$liste["name"] = "web_domain_admin";
18+
} else {
19+
$liste["name"] = "web_domain";
20+
}
1721

1822
// Database table
1923
$liste["table"] = "web_domain";
@@ -66,13 +70,28 @@
6670
'width' => "",
6771
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
6872

69-
73+
if($_SESSION['s']['user']['typ'] == 'admin') {
74+
$liste["item"][] = array( 'field' => "sys_groupid",
75+
'datatype' => "INTEGER",
76+
'formtype' => "SELECT",
77+
'op' => "=",
78+
'prefix' => "",
79+
'suffix' => "",
80+
'datasource' => array ( 'type' => 'SQL',
81+
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
82+
'keyfield'=> 'groupid',
83+
'valuefield'=> 'name'
84+
),
85+
'width' => "",
86+
'value' => "");
87+
}
88+
7089
$liste["item"][] = array( 'field' => "server_id",
71-
'datatype' => "VARCHAR",
90+
'datatype' => "INTEGER",
7291
'formtype' => "SELECT",
73-
'op' => "like",
74-
'prefix' => "%",
75-
'suffix' => "%",
92+
'op' => "=",
93+
'prefix' => "",
94+
'suffix' => "",
7695
'datasource' => array ( 'type' => 'SQL',
7796
'querystring' => 'SELECT a.server_id, a.server_name FROM server a, web_domain b WHERE (a.server_id = b.server_id) AND ({AUTHSQL-B}) ORDER BY a.server_name',
7897
'keyfield'=> 'server_id',

interface/web/sites/templates/web_domain_list.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
2525
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
2626
</tr>
2727
<tr>
28-
<td class="tbl_col_domain_id"><input type="text" name="search_domain_id" value="{tmpl_var name='search_domain_id'}" /></td>
28+
<td class="tbl_col_domain_id"><input type="text" size="5" name="search_domain_id" value="{tmpl_var name='search_domain_id'}" /></td>
2929
<td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','sites/web_domain_list.php');">{tmpl_var name='search_active'}</select></td>
3030
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','sites/web_domain_list.php');">{tmpl_var name='search_server_id'}</select></td>
3131
<td class="tbl_col_domain"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" /></td>

0 commit comments

Comments
 (0)