@@ -138,6 +138,16 @@ function updateCounters($returndebuginfo = false)
|
||||
$admin_resources[$customer['adminid']]['email_quota_used']+= intval_ressource($customer['email_quota']);
|
||||
}
|
||||
|
||||
if(!isset($admin_resources[$customer['adminid']]['email_autoresponder_used']))
|
||||
{
|
||||
$admin_resources[$customer['adminid']]['email_autoresponder_used'] = 0;
|
||||
}
|
||||
|
||||
if($customer['email_autoresponder'] != '-1')
|
||||
{
|
||||
$admin_resources[$customer['adminid']]['email_autoresponder_used']+= intval_ressource($customer['email_autoresponder']);
|
||||
}
|
||||
|
||||
if(!isset($admin_resources[$customer['adminid']]['subdomains_used']))
|
||||
{
|
||||
$admin_resources[$customer['adminid']]['subdomains_used'] = 0;
|
||||
@@ -181,7 +191,11 @@ function updateCounters($returndebuginfo = false)
|
||||
$customer['subdomains_used_new'] = (int)$customer_subdomains['number_subdomains'];
|
||||
$customer_email_quota = $db->query_first('SELECT SUM(`quota`) AS `email_quota` FROM `' . TABLE_MAIL_USERS . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"');
|
||||
$customer['email_quota_used_new'] = (int)$customer_email_quota['email_quota'];
|
||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used` = "' . (int)$customer['mysqls_used_new'] . '", `emails_used` = "' . (int)$customer['emails_used_new'] . '", `email_accounts_used` = "' . (int)$customer['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$customer['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$customer['email_quota_used_new'] . '", `ftps_used` = "' . (int)$customer['ftps_used_new'] . '", `tickets_used` = "' . (int)$customer['tickets_used_new'] . '", `subdomains_used` = "' . (int)$customer['subdomains_used_new'] . '" WHERE `customerid` = "' . (int)$customer['customerid'] . '"');
|
||||
|
||||
$customer_email_autoresponder = $db->query_first('SELECT COUNT(*) AS `number_autoresponder` FROM `' . TABLE_MAIL_AUTORESPONDER . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"');
|
||||
$customer['email_autoresponder_used_new'] = (int)$customer_email_autoresponder['number_autoresponder'];
|
||||
|
||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used` = "' . (int)$customer['mysqls_used_new'] . '", `emails_used` = "' . (int)$customer['emails_used_new'] . '", `email_accounts_used` = "' . (int)$customer['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$customer['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$customer['email_quota_used_new'] . '", `email_autoresponder_used` = "' . (int)$customer['email_autoresponder_used_new'] . '", `ftps_used` = "' . (int)$customer['ftps_used_new'] . '", `tickets_used` = "' . (int)$customer['tickets_used_new'] . '", `subdomains_used` = "' . (int)$customer['subdomains_used_new'] . '" WHERE `customerid` = "' . (int)$customer['customerid'] . '"');
|
||||
|
||||
if($returndebuginfo === true)
|
||||
{
|
||||
@@ -268,13 +282,21 @@ function updateCounters($returndebuginfo = false)
|
||||
|
||||
$admin['email_quota_used_new'] = $admin_resources[$admin['adminid']]['email_quota_used'];
|
||||
|
||||
if(!isset($admin_resources[$admin['adminid']]['email_autoresponder_used']))
|
||||
{
|
||||
$admin_resources[$admin['adminid']]['email_autoresponder_used'] = 0;
|
||||
}
|
||||
|
||||
$admin['email_autoresponder_used_new'] = $admin_resources[$admin['adminid']]['email_autoresponder_used'];
|
||||
|
||||
if(!isset($admin_resources[$admin['adminid']]['subdomains_used']))
|
||||
{
|
||||
$admin_resources[$admin['adminid']]['subdomains_used'] = 0;
|
||||
}
|
||||
|
||||
|
||||
$admin['subdomains_used_new'] = $admin_resources[$admin['adminid']]['subdomains_used'];
|
||||
$db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `customers_used` = "' . (int)$admin['customers_used_new'] . '", `domains_used` = "' . (int)$admin['domains_used_new'] . '", `diskspace_used` = "' . (int)$admin['diskspace_used_new'] . '", `mysqls_used` = "' . (int)$admin['mysqls_used_new'] . '", `emails_used` = "' . (int)$admin['emails_used_new'] . '", `email_accounts_used` = "' . (int)$admin['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$admin['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$admin['email_quota_used_new'] . '", `ftps_used` = "' . (int)$admin['ftps_used_new'] . '", `tickets_used` = "' . (int)$admin['tickets_used_new'] . '", `subdomains_used` = "' . (int)$admin['subdomains_used_new'] . '", `traffic_used` = "' . (int)$admin['traffic_used_new'] . '" WHERE `adminid` = "' . (int)$admin['adminid'] . '"');
|
||||
$db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `customers_used` = "' . (int)$admin['customers_used_new'] . '", `domains_used` = "' . (int)$admin['domains_used_new'] . '", `diskspace_used` = "' . (int)$admin['diskspace_used_new'] . '", `mysqls_used` = "' . (int)$admin['mysqls_used_new'] . '", `emails_used` = "' . (int)$admin['emails_used_new'] . '", `email_accounts_used` = "' . (int)$admin['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$admin['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$admin['email_quota_used_new'] . '", `email_autoresponder_used` = "' . (int)$admin['email_autoresponder_used_new'] . '", `ftps_used` = "' . (int)$admin['ftps_used_new'] . '", `tickets_used` = "' . (int)$admin['tickets_used_new'] . '", `subdomains_used` = "' . (int)$admin['subdomains_used_new'] . '", `traffic_used` = "' . (int)$admin['traffic_used_new'] . '" WHERE `adminid` = "' . (int)$admin['adminid'] . '"');
|
||||
|
||||
if($returndebuginfo === true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user