} else { $senderEmail = 'webmaster@' . $config['BASE_SERVER_VHOST']; } } } $tpl->assign(array('SENDER_NAME' => tohtml($senderName), 'SENDER_EMAIL' => tohtml($senderEmail), 'SUBJECT' => tohtml($subject), 'BODY' => tohtml($body))); } /*********************************************************************************************************************** * Main */ // Include core library require 'imscp-lib.php'; iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onResellerScriptStart); check_login('reseller'); if (!resellerHasCustomers()) { showBadRequestErrorPage(); } if (!(!empty($_POST) && reseller_sendCircular())) { $tpl = new iMSCP_pTemplate(); $tpl->define_dynamic(array('layout' => 'shared/layouts/ui.tpl', 'page' => 'reseller/circular.tpl', 'page_message' => 'layout')); $tpl->assign(array('TR_PAGE_TITLE' => tr('Reseller / Customers / Circular'), 'TR_CIRCULAR' => tr('Circular'), 'TR_SEND_TO' => tr('Send to'), 'TR_SUBJECT' => tr('Subject'), 'TR_BODY' => tr('Body'), 'TR_SENDER_EMAIL' => tr('Sender email'), 'TR_SENDER_NAME' => tr('Sender name'), 'TR_SEND_CIRCULAR' => tr('Send circular'), 'TR_CANCEL' => tr('Cancel'))); generateNavigation($tpl); generatePageMessage($tpl); reseller_generatePageData($tpl); $tpl->parse('LAYOUT_CONTENT', 'page'); iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onResellerScriptEnd, array('templateEngine' => $tpl)); $tpl->prnt(); unsetMessages(); } else { redirectTo('users.php'); }
$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>')); } /************************************************************************************ * Main script */ // Include core library require 'imscp-lib.php'; $eventManager = iMSCP_Events_Aggregator::getInstance(); $eventManager->dispatch(iMSCP_Events::onResellerScriptStart); /** @var $cfg iMSCP_Config_Handler_File */ $cfg = iMSCP_Registry::get('config'); check_login('reseller', $cfg['PREVENT_EXTERNAL_LOGIN_RESELLER']); $tpl = new iMSCP_pTemplate(); $tpl->define_dynamic(array('layout' => 'shared/layouts/ui.tpl', 'page' => 'reseller/index.tpl', 'page_message' => 'layout', 'traffic_warning_message' => 'page', 'disk_warning_message' => 'page')); $tpl->assign(array('TR_PAGE_TITLE' => tr('Reseller / General / Overview'), 'TR_SAVE' => tr('Save'), 'TR_TRAFFIC_USAGE' => tr('Traffic usage'), 'TR_DISK_USAGE' => tr('Disk usage'))); generateNavigation($tpl); reseller_generateSupportQuestionsMessage(); reseller_generateOrdersAliasesMessage(); reseller_generatePageData($tpl, $_SESSION['user_id'], $_SESSION['user_logged']); generatePageMessage($tpl); $tpl->parse('LAYOUT_CONTENT', 'page'); $eventManager->dispatch(iMSCP_Events::onResellerScriptEnd, array('templateEngine' => $tpl)); $tpl->prnt(); unsetMessages();