* You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * @link http://www.easyscp.net * @author EasySCP Team */ require '../../include/easyscp-lib.php'; $cfg = EasySCP_Registry::get('Config'); check_login(__FILE__); $tpl = EasySCP_TemplateEngine::getInstance(); $template = 'reseller/index.tpl'; // dynamic page data generate_page_data($tpl, $_SESSION['user_id'], $_SESSION['user_logged']); gen_messages_table($tpl, $_SESSION['user_id']); gen_system_message($tpl); // static page messages gen_logged_from($tpl); $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Reseller/Main Index'), 'TR_TRAFFIC_USAGE' => tr('Traffic usage'), 'TR_DISK_USAGE' => tr('Disk usage'))); gen_reseller_mainmenu($tpl, 'reseller/main_menu_general_information.tpl'); gen_reseller_menu($tpl, 'reseller/menu_general_information.tpl'); gen_page_message($tpl); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } $tpl->display($template); unset_messages(); // page functions /** * @param EasySCP_TemplateEngine $tpl */
} $pr = sprintf("%.2f", $pr); if (($straff_max != 0 || $straff_max != '') && $mtraff > $straff_max) { $tpl->assign('TR_TRAFFIC_WARNING', tr('You are exceeding your traffic limit!')); } else { $tpl->assign('TRAFF_WARN', ''); } $bar_value = calc_bar_value($traff, $straff_max, 400); if ($straff_max == 0) { $show_straf_max = tr('unlimited'); } else { $show_straf_max = sizeit($straff_max); } $tpl->assign(array('TR_OF' => tr('of'), 'PERCENT' => $pr, 'VALUE' => sizeit($mtraff), 'MAX_VALUE' => $show_straf_max, 'BAR_VALUE' => $bar_value)); } /* * * static page messages. * */ $tpl->assign(array('TR_ADMIN_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Admin/Main Index'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'])); gen_admin_menu($tpl); get_admin_general_info($tpl, $sql); gen_system_message($tpl, $sql); gen_server_trafic($tpl, $sql); $tpl->parse('PAGE', 'page'); $tpl->prnt(); if (isset($cfg['DUMP_GUI_DEBUG'])) { dump_gui_debug(); } unset_messages();