/** * Generates statistics for the given reseller * * @param iMSCP_pTemplate $tpl Template engine instance * @param int $resellerId Reseller unique identifier * @param string $resellerName Reseller name * @return void */ function _generateResellerStatistics($tpl, $resellerId, $resellerName) { $resellerProps = imscp_getResellerProperties($resellerId, true); list($udmn_current, , , $usub_current, , , $uals_current, , , $umail_current, , , $uftp_current, , , $usql_db_current, , , $usql_user_current, , , $utraff_current, , , $udisk_current, ) = generate_reseller_users_props($resellerId); $trafficLimitBytes = $resellerProps['max_traff_amnt'] * 1048576; $trafficUsageBytes = $resellerProps['current_traff_amnt'] * 1048576; $diskspaceLimitBytes = $resellerProps['max_disk_amnt'] * 1048576; $diskspaceUsageBytes = $resellerProps['current_disk_amnt'] * 1048576; $trafficUsagePercent = make_usage_vals($trafficUsageBytes, $trafficLimitBytes); $diskspaceUsagePercent = make_usage_vals($diskspaceUsageBytes, $diskspaceLimitBytes); $tpl->assign(array('RESELLER_NAME' => tohtml($resellerName), 'RESELLER_ID' => tohtml($resellerId), 'TRAFFIC_PERCENT' => tohtml($trafficUsagePercent), 'TRAFFIC_MSG' => $trafficLimitBytes ? tohtml(tr('%1$s / %2$s of %3$s', bytesHuman($utraff_current), bytesHuman($trafficUsageBytes), bytesHuman($trafficLimitBytes))) : tohtml(tr('%1$s / %2$s of unlimited', bytesHuman($utraff_current), bytesHuman($trafficUsageBytes))), 'DISK_PERCENT' => tohtml($diskspaceUsagePercent), 'DISK_MSG' => $diskspaceLimitBytes ? tohtml(tr('%1$s / %2$s of %3$s', bytesHuman($udisk_current), bytesHuman($diskspaceUsageBytes), bytesHuman($diskspaceLimitBytes))) : tohtml(tr('%1$s / %2$s of unlimited', bytesHuman($udisk_current), bytesHuman($diskspaceUsageBytes))), 'DMN_MSG' => $resellerProps['max_dmn_cnt'] ? tohtml(tr('%1$d / %2$d of %3$d', $udmn_current, $resellerProps['current_dmn_cnt'], $resellerProps['max_dmn_cnt'])) : tohtml(tr('%1$d / %2$d of unlimited', $udmn_current, $resellerProps['current_dmn_cnt'])), 'SUB_MSG' => $resellerProps['max_sub_cnt'] > 0 ? tohtml(tr('%1$d / %2$d of %3$d', $usub_current, $resellerProps['current_sub_cnt'], $resellerProps['max_sub_cnt'])) : ($resellerProps['max_sub_cnt'] == '-1' ? tohtml(tr('disabled')) : tohtml(tr('%1$d / %2$d of unlimited', $usub_current, $resellerProps['current_sub_cnt']))), 'ALS_MSG' => $resellerProps['max_als_cnt'] > 0 ? tohtml(tr('%1$d / %2$d of %3$d', $uals_current, $resellerProps['current_als_cnt'], $resellerProps['max_als_cnt'])) : ($resellerProps['max_als_cnt'] == '-1' ? tohtml(tr('disabled')) : tohtml(tr('%1$d / %2$d of unlimited', $uals_current, $resellerProps['current_als_cnt']))), 'MAIL_MSG' => $resellerProps['max_mail_cnt'] > 0 ? tohtml(tr('%1$d / %2$d of %3$d', $umail_current, $resellerProps['current_mail_cnt'], $resellerProps['max_mail_cnt'])) : ($resellerProps['max_mail_cnt'] == '-1' ? tohtml(tr('disabled')) : tohtml(tr('%1$d / %2$d of unlimited', $umail_current, $resellerProps['current_mail_cnt']))), 'FTP_MSG' => $resellerProps['max_ftp_cnt'] > 0 ? tohtml(tr('%1$d / %2$d of %3$d', $uftp_current, $resellerProps['current_ftp_cnt'], $resellerProps['max_ftp_cnt'])) : ($resellerProps['max_ftp_cnt'] == '-1' ? tohtml(tr('disabled')) : tohtml(tr('%1$d / %2$d of unlimited', $uftp_current, $resellerProps['current_ftp_cnt']))), 'SQL_DB_MSG' => $resellerProps['max_sql_db_cnt'] > 0 ? tohtml(tr('%1$d / %2$d of %3$d', $usql_db_current, $resellerProps['current_sql_db_cnt'], $resellerProps['max_sql_db_cnt'])) : ($resellerProps['max_sql_db_cnt'] == '-1' ? tohtml(tr('disabled')) : tohtml(tr('%1$d / %2$d of unlimited', $usql_db_current, $resellerProps['current_sql_db_cnt']))), 'SQL_USER_MSG' => $resellerProps['max_sql_user_cnt'] > 0 ? tohtml(tr('%1$d / %2$d of %3$d', $usql_user_current, $resellerProps['current_sql_user_cnt'], $resellerProps['max_sql_user_cnt'])) : ($resellerProps['max_sql_user_cnt'] == '-1' ? tohtml(tr('disabled')) : tohtml(tr('%1$d / %2$d of unlimited', $usql_user_current, $resellerProps['current_sql_user_cnt']))))); }
throw $e; } return true; } /*********************************************************************************************************************** * Main */ require_once 'imscp-lib.php'; iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onResellerScriptStart); check_login('reseller'); resellerHasFeature('domain_aliases') && resellerHasCustomers() or showBadRequestErrorPage(); if (is_xhr() && isset($_POST['customer_id'])) { echo getJsonDomainsList(clean_input($_POST['customer_id'])); return; } $resellerProps = imscp_getResellerProperties($_SESSION['user_id']); if ($resellerProps['max_als_cnt'] != 0 && $resellerProps['current_als_cnt'] >= $resellerProps['max_als_cnt']) { set_page_message(tr('You have reached the maximum number of domain aliasses allowed by your subscription.'), 'warning'); redirectTo('users.php'); } if (!empty($_POST) && addDomainAlias()) { redirectTo('alias.php'); } $tpl = new iMSCP_pTemplate(); $tpl->define_dynamic(array('layout' => 'shared/layouts/ui.tpl', 'page' => 'reseller/alias_add.tpl', 'page_message' => 'layout', 'customer_option' => 'page', 'shared_mount_point_domain' => 'page')); $tpl->assign(array('TR_PAGE_TITLE' => tr('Reseller / Domains / Add Domain Alias'), 'TR_CUSTOMER_ACCOUNT' => tr('Customer account'), 'TR_DOMAIN_ALIAS' => tr('Domain alias'), 'TR_DOMAIN_ALIAS_NAME' => tr('Domain alias name'), 'TR_DOMAIN_ALIAS_NAME_TOOLTIP' => tr("You must omit 'www'. It will be added automatically."), 'TR_SHARED_MOUNT_POINT' => tr('Shared mount point'), 'TR_SHARED_MOUNT_POINT_TOOLTIP' => tr('Allows to share the mount point of another domain.'), 'TR_URL_FORWARDING' => tr('URL forwarding'), 'TR_URL_FORWARDING_TOOLTIP' => tr('Allows to forward any request made to this domain alias to a specific URL. Be aware that when this option is in use, no Web folder is created for the domain alias.'), 'TR_FORWARD_TO_URL' => tr('Forward to URL'), 'TR_YES' => tr('Yes'), 'TR_NO' => tr('No'), 'TR_HTTP' => 'http://', 'TR_HTTPS' => 'https://', 'TR_FTP' => 'ftp://', 'TR_ADD' => tr('Add'), 'TR_CANCEL' => tr('Cancel'))); generateNavigation($tpl); generatePage($tpl); generatePageMessage($tpl); $tpl->parse('LAYOUT_CONTENT', 'page'); iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onResellerScriptEnd, array('templateEngine' => $tpl));
resellerHasFeature('domain_aliases') or showBadRequestErrorPage(); if (is_xhr()) { header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-type: application/json'); header('Status: 200 OK'); echo json_encode(reseller_getDatatable()); exit; } /** @var $tpl iMSCP_pTemplate */ $tpl = new iMSCP_pTemplate(); $tpl->define_dynamic(array('layout' => 'shared/layouts/ui.tpl', 'page' => 'reseller/alias.tpl', 'page_message' => 'layout', 'als_add_button' => 'page')); $tpl->assign(array('TR_PAGE_TITLE' => tr('Reseller / Customers / Domain Aliases'), 'TR_ALIAS_NAME' => tr('Domain alias name'), 'TR_MOUNT_POINT' => tr('Mount point'), 'TR_FORWARD_URL' => tr('Forward URL'), 'TR_STATUS' => tr('Status'), 'TR_CUSTOMER' => tr('Customer'), 'TR_ACTIONS' => tr('Actions'), 'TR_ADD_DOMAIN_ALIAS' => tr('Add domain alias'), 'TR_MESSAGE_DELETE_ALIAS' => tr('Are you sure you want to delete the %s domain alias?', '%s'), 'TR_MESSAGE_DELETE_ALIAS_ORDER' => tr('Are you sure you want to delete the %s domain alias order?', '%s'), 'TR_PROCESSING_DATA' => tr('Processing...'))); iMSCP_Events_Aggregator::getInstance()->registerListener('onGetJsTranslations', function ($e) { /** @var $e \iMSCP_Events_Event */ $e->getParam('translations')->core['dataTable'] = getDataTablesPluginTranslations(false); }); $resellerId = $_SESSION['user_id']; $resellerProps = imscp_getResellerProperties($resellerId); if ($resellerProps['max_als_cnt'] != 0) { list(, , , , , , $customersAlsCount) = generate_reseller_user_props($resellerId); if ($customersAlsCount >= $resellerProps['max_als_cnt'] || $resellerProps['current_als_cnt'] >= $resellerProps['max_als_cnt']) { $tpl->assign('ALS_ADD_BUTTON', ''); } } generateNavigation($tpl); generatePageMessage($tpl); $tpl->parse('LAYOUT_CONTENT', 'page'); iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onResellerScriptEnd, array('templateEngine' => $tpl)); $tpl->prnt(); unsetMessages();
/** * Update resellers limit * * @throws iMSCP_Exception_Database * @param int $toReseller Reseller for which the givens customer are moved to * @param int $fromReseller Reseller for wich the givens customers are moved from * @param array $users List of user to move * @param array $errorsStack Error stack * @return bool */ function admin_updateResellerLimits($toReseller, $fromReseller, $users, &$errorsStack) { $toResellerProperties = imscp_getResellerProperties($toReseller); $fromResellerProperties = imscp_getResellerProperties($fromReseller, true); $usersList = explode(';', $users); for ($i = 0, $countUsersList = count($usersList) - 1; $i < $countUsersList; $i++) { $stmt = exec_query('SELECT domain_name FROM domain WHERE domain_admin_id = ?', $usersList[$i]); if ($stmt->rowCount()) { $domainName = $stmt->fields['domain_name']; list($subdomainsLimit, , $domainAliasesLimit, , $mailAccountsLimit, , $ftpAccountsLimit, , $sqlDatabasesLimit, , $sqlUsersLimit, , $trafficLimit, $diskspaceLimit) = shared_getCustomerProps($usersList[$i]); calculate_reseller_dvals($toResellerProperties['current_dmn_cnt'], $toResellerProperties['max_dmn_cnt'], $src_dmn_current, $fromResellerProperties['max_dmn_cnt'], 1, $errorsStack, 'Domain', $domainName); if ($errorsStack == '_off_') { calculate_reseller_dvals($toResellerProperties['current_sub_cnt'], $toResellerProperties['max_sub_cnt'], $fromResellerProperties['current_sub_cnt'], $fromResellerProperties['max_sub_cnt'], $subdomainsLimit, $errorsStack, 'Subdomain', $domainName); calculate_reseller_dvals($toResellerProperties['current_als_cnt'], $toResellerProperties['max_als_cnt'], $fromResellerProperties['current_als_cnt'], $fromResellerProperties['max_als_cnt'], $domainAliasesLimit, $errorsStack, 'Alias', $domainName); calculate_reseller_dvals($toResellerProperties['current_mail_cnt'], $toResellerProperties['max_mail_cnt'], $fromResellerProperties['current_mail_cnt'], $fromResellerProperties['max_mail_cnt'], $mailAccountsLimit, $errorsStack, 'Mail', $domainName); calculate_reseller_dvals($toResellerProperties['current_ftp_cnt'], $toResellerProperties['max_ftp_cnt'], $fromResellerProperties['current_ftp_cnt'], $fromResellerProperties['max_ftp_cnt'], $ftpAccountsLimit, $errorsStack, 'FTP', $domainName); calculate_reseller_dvals($toResellerProperties['current_sql_db_cnt'], $toResellerProperties['max_sql_db_cnt'], $fromResellerProperties['current_sql_db_cnt'], $fromResellerProperties['max_sql_db_cnt'], $sqlDatabasesLimit, $errorsStack, 'SQL Database', $domainName); calculate_reseller_dvals($toResellerProperties['current_sql_user_cnt'], $toResellerProperties['max_sql_user_cnt'], $fromResellerProperties['current_sql_user_cnt'], $fromResellerProperties['max_sql_user_cnt'], $sqlUsersLimit, $errorsStack, 'SQL User', $domainName); calculate_reseller_dvals($toResellerProperties['current_traff_amnt'], $toResellerProperties['max_traff_amnt'], $fromResellerProperties['current_traff_amnt'], $fromResellerProperties['max_traff_amnt'], $trafficLimit, $errorsStack, 'Traffic', $domainName); calculate_reseller_dvals($toResellerProperties['current_disk_amnt'], $toResellerProperties['max_disk_amnt'], $fromResellerProperties['current_disk_amnt'], $fromResellerProperties['max_disk_amnt'], $diskspaceLimit, $errorsStack, 'Disk', $domainName); } if ($errorsStack != '_off_') { return false; } } else { } } // Update reseller properties /** @var $db iMSCP_Database */ $db = iMSCP_Database::getInstance(); try { $db->beginTransaction(); $newFromResellerProperties = "{$fromResellerProperties['current_dmn_cnt']};{$fromResellerProperties['max_dmn_cnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_sub_cnt']};{$fromResellerProperties['max_sub_cnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_als_cnt']};{$fromResellerProperties['max_als_cnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_mail_cnt']};{$fromResellerProperties['max_mail_cnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_ftp_cnt']};{$fromResellerProperties['max_ftp_cnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_sql_db_cnt']};{$fromResellerProperties['max_sql_db_cnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_sql_user_cnt']};{$fromResellerProperties['max_sql_user_cnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_traff_amnt']};{$fromResellerProperties['max_traff_amnt']};"; $newFromResellerProperties .= "{$fromResellerProperties['current_disk_amnt']};{$fromResellerProperties['max_disk_amnt']};"; update_reseller_props($fromReseller, $newFromResellerProperties); $newToResellerProperties = "{$toResellerProperties['current_dmn_cnt']};{$toResellerProperties['max_dmn_cnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_sub_cnt']};{$toResellerProperties['max_sub_cnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_als_cnt']};{$toResellerProperties['max_als_cnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_mail_cnt']};{$toResellerProperties['max_mail_cnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_ftp_cnt']};{$toResellerProperties['max_ftp_cnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_sql_db_cnt']};{$toResellerProperties['max_sql_db_cnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_sql_user_cnt']};{$toResellerProperties['max_sql_user_cnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_traff_amnt']};{$toResellerProperties['max_traff_amnt']};"; $newToResellerProperties .= "{$toResellerProperties['current_disk_amnt']};{$toResellerProperties['max_disk_amnt']};"; update_reseller_props($toReseller, $newToResellerProperties); for ($i = 0, $countUsersList = count($usersList) - 1; $i < $countUsersList; $i++) { $query = 'UPDATE `admin` SET `created_by` = ? WHERE `admin_id` = ?'; exec_query($query, array($toReseller, $usersList[$i])); } $db->commit(); } catch (iMSCP_Exception_Database $e) { $db->rollBack(); throw $e; } return true; }
/** * Tells whether or not the given feature is available for the reseller. * * @author Laurent Declercq <*****@*****.**> * @throws iMSCP_Exception When $featureName is not known * @param string $featureName Feature name * @param bool $forceReload If true force data to be reloaded * @return bool TRUE if $featureName is available for reseller, FALSE otherwise * TODO add hosting_plan feature */ function resellerHasFeature($featureName, $forceReload = false) { static $availableFeatures = null; $featureName = strtolower($featureName); if (null == $availableFeatures || $forceReload) { /** @var $cfg iMSCP_Config_Handler_File */ $cfg = iMSCP_Registry::get('config'); $resellerProps = imscp_getResellerProperties($_SESSION['user_id'], true); $availableFeatures = array('domains' => $resellerProps['max_dmn_cnt'] != '-1' ? true : false, 'subdomains' => $resellerProps['max_sub_cnt'] != '-1' ? true : false, 'domain_aliases' => $resellerProps['max_als_cnt'] != '-1' ? true : false, 'mail' => $resellerProps['max_mail_cnt'] != '-1' ? true : false, 'ftp' => $resellerProps['max_ftp_cnt'] != '-1' ? true : false, 'sql' => $resellerProps['max_sql_db_cnt'] != '-1' ? true : false, 'sql_db' => $resellerProps['max_sql_db_cnt'] != '-1' ? true : false, 'sql_user' => $resellerProps['max_sql_user_cnt'] != '-1' ? true : false, 'php' => true, 'php_editor' => $resellerProps['php_ini_system'] == 'yes' ? true : false, 'cgi' => true, 'custom_dns_records' => $cfg['NAMED_SERVER'] != 'external_server' ? true : false, 'aps' => $resellerProps['software_allowed'] != 'no' ? true : false, 'external_mail' => true, 'backup' => $cfg['BACKUP_DOMAINS'] != 'no' ? true : false, 'support' => $cfg['IMSCP_SUPPORT_SYSTEM'] && $resellerProps['support_system'] == 'yes' ? true : false); } if (!array_key_exists($featureName, $availableFeatures)) { throw new iMSCP_Exception(sprintf("Feature %s is not known by the resellerHasFeature() function.", $featureName)); } return $availableFeatures[$featureName]; }
/** * Generates page data * * @param iMSCP_pTemplate $tpl Template engine * @param int $resellerId Reseller unique identifier * @param string $resellerName Reseller name * @return void */ function reseller_generatePageData($tpl, $resellerId, $resellerName) { $resellerProperties = imscp_getResellerProperties($resellerId); list($udmnCurrent, , , $usubCurrent, , , $ualsCurrent, , , $umailCurrent, , , $uftpCurrent, , , $usqlDbCurrent, , , $usqlUserCurrent, , , $utraffCurrent, , , $udiskCurrent) = generate_reseller_user_props($resellerId); // Convert into Mib values $rtraffMax = $resellerProperties['max_traff_amnt'] * 1024 * 1024; $rdiskMax = $resellerProperties['max_disk_amnt'] * 1024 * 1024; reseller_generateTrafficUsageBar($tpl, $utraffCurrent, $rtraffMax); reseller_generateDiskUsageBar($tpl, $udiskCurrent, $rdiskMax); if ($rtraffMax > 0 && $utraffCurrent > $rtraffMax) { $tpl->assign('TR_TRAFFIC_WARNING', tr('You are exceeding your monthly traffic limit.')); } else { $tpl->assign('TRAFFIC_WARNING_MESSAGE', ''); } if ($rdiskMax > 0 && $udiskCurrent > $rdiskMax) { $tpl->assign('TR_DISK_WARNING', tr('You are exceeding your disk space limit.')); } else { $tpl->assign('DISK_WARNING_MESSAGE', ''); } $tpl->assign(array('TR_ACCOUNT_OVERVIEW' => tr('Account overview'), 'TR_ACCOUNT_LIMITS' => tr('Account limits'), 'TR_FEATURES' => tr('Features'), 'ACCOUNT_NAME' => tr('Account name'), 'GENERAL_INFO' => tr('General information'), 'DOMAINS' => tr('Domain accounts'), 'SUBDOMAINS' => tr('Subdomains'), 'ALIASES' => tr('Aliases'), 'MAIL_ACCOUNTS' => tr('Email accounts'), 'TR_FTP_ACCOUNTS' => tr('FTP accounts'), 'SQL_DATABASES' => tr('SQL databases'), 'SQL_USERS' => tr('SQL users'), 'TRAFFIC' => tr("Traffic"), 'DISK' => tr('Disk'), 'RESELLER_NAME' => tohtml($resellerName), 'DMN_MSG' => $resellerProperties['max_dmn_cnt'] ? tr('%1$d / %2$d of %3$d', $udmnCurrent, $resellerProperties['current_dmn_cnt'], $resellerProperties['max_dmn_cnt']) : tr('%1$d / %2$d of unlimited', $udmnCurrent, $resellerProperties['current_dmn_cnt']), 'SUB_MSG' => $resellerProperties['max_sub_cnt'] > 0 ? tr('%1$d / %2$d of %3$d</b>', $usubCurrent, $resellerProperties['current_sub_cnt'], $resellerProperties['max_sub_cnt']) : ($resellerProperties['max_sub_cnt'] == '-1' ? tr('disabled') : tr('%1$d / %2$d of unlimited', $usubCurrent, $resellerProperties['current_sub_cnt'])), 'ALS_MSG' => $resellerProperties['max_als_cnt'] > 0 ? tr('%1$d / %2$d of %3$d', $ualsCurrent, $resellerProperties['current_als_cnt'], $resellerProperties['max_als_cnt']) : ($resellerProperties['max_als_cnt'] == '-1' ? tr('disabled') : tr('%1$d / %2$d of unlimited', $ualsCurrent, $resellerProperties['current_als_cnt'])), 'MAIL_MSG' => $resellerProperties['max_mail_cnt'] > 0 ? tr('%1$d / %2$d of %3$d', $umailCurrent, $resellerProperties['current_mail_cnt'], $resellerProperties['max_mail_cnt']) : ($resellerProperties['max_mail_cnt'] == '-1' ? tr('disabled') : tr('%1$d / %2$d of unlimited', $umailCurrent, $resellerProperties['current_mail_cnt'])), 'FTP_MSG' => $resellerProperties['max_ftp_cnt'] > 0 ? tr('%1$d / %2$d of %3$d', $uftpCurrent, $resellerProperties['current_ftp_cnt'], $resellerProperties['max_ftp_cnt']) : ($resellerProperties['max_ftp_cnt'] == '-1' ? tr('disabled') : tr('%1$d / %2$d of unlimited', $uftpCurrent, $resellerProperties['current_ftp_cnt'])), 'SQL_DB_MSG' => $resellerProperties['max_sql_db_cnt'] > 0 ? tr('%1$d / %2$d of %3$d', $usqlDbCurrent, $resellerProperties['current_sql_db_cnt'], $resellerProperties['max_sql_db_cnt']) : ($resellerProperties['max_sql_db_cnt'] == '-1' ? tr('disabled') : tr('%1$d / %2$d of unlimited', $usqlDbCurrent, $resellerProperties['current_sql_db_cnt'])), 'SQL_USER_MSG' => $resellerProperties['max_sql_db_cnt'] > 0 ? tr('%1$d / %2$d of %3$d', $usqlUserCurrent, $resellerProperties['current_sql_user_cnt'], $resellerProperties['max_sql_user_cnt']) : ($resellerProperties['max_sql_user_cnt'] == '-1' ? tr('disabled') : tr('%1$d / %2$d of unlimited', $usqlUserCurrent, $resellerProperties['current_sql_user_cnt'])), 'TR_SUPPORT' => tr('Support system'), 'SUPPORT_STATUS' => $resellerProperties['support_system'] == 'yes' ? '<span style="color:green;">' . tr('Enabled') . '</span>' : '<span style="color:red;">' . tr('Disabled') . '</span>', 'TR_PHP_EDITOR' => tr('PHP Editor'), 'PHP_EDITOR_STATUS' => $resellerProperties['php_ini_system'] == 'yes' ? '<span style="color:green;">' . tr('Enabled') . '</span>' : '<span style="color:red;">' . tr('Disabled') . '</span>', 'TR_APS' => tr('Software installer'), 'APS_STATUS' => $resellerProperties['software_allowed'] == 'yes' ? '<span style="color:green;">' . tr('Enabled') . '</span>' : '<span style="color:red;">' . tr('Disabled') . '</span>')); }