You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/lib/classes/quota_lib.inc.php
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,14 @@ public function get_quota_data($clientid = null, $readable = true) {
13
13
}
14
14
//print_r($monitor_data);
15
15
16
+
// select all websites or websites belonging to client
16
17
if($clientid != null){
17
-
$sql_where = " AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=".$clientid.")";
18
+
$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost' AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)", $app->functions->intval($client_id));
19
+
}
20
+
else {
21
+
$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'");
18
22
}
19
23
20
-
// select websites belonging to client
21
-
$sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".$sql_where);
22
24
//print_r($sites);
23
25
if(is_array($sites) && !empty($sites)){
24
26
for($i=0;$i<sizeof($sites);$i++){
@@ -111,13 +113,14 @@ public function get_mailquota_data($clientid = null, $readable = true) {
111
113
}
112
114
//print_r($monitor_data);
113
115
116
+
// select all email accounts or email accounts belonging to client
114
117
if($clientid != null){
115
-
$sql_where = " AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=".$clientid.")";
118
+
$emails = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)", $app->functions->intval($client_id));
119
+
}
120
+
else {
121
+
$emails = $app->db->queryAllRecords("SELECT * FROM mail_user");
116
122
}
117
123
118
-
119
-
// select email accounts belonging to client
120
-
$emails = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE 1".$sql_where);
0 commit comments