} $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();
* 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'); $cfg2 = EasySCP_Configuration::getInstance(); $cfg2->PREVENT_EXTERNAL_LOGIN_ADMIN = 'blablub'; $cfg2->DUMP_GUI_DEBUG = 'blablub'; check_login(__FILE__); $tpl = EasySCP_TemplateEngine::getInstance(); $template = 'admin/index.tpl'; get_admin_general_info($tpl); get_update_infos($tpl); gen_server_trafic($tpl); gen_system_message($tpl); // static page messages $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Admin/Main Index'))); gen_admin_mainmenu($tpl, 'admin/main_menu_general_information.tpl'); gen_admin_menu($tpl, 'admin/menu_general_information.tpl'); gen_page_message($tpl); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } $tpl->display($template); unset_messages(); /** * @param EasySCP_TemplateEngine $tpl