本文整理汇总了PHP中XTemplate::menu_add方法的典型用法代码示例。如果您正苦于以下问题:PHP XTemplate::menu_add方法的具体用法?PHP XTemplate::menu_add怎么用?PHP XTemplate::menu_add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XTemplate
的用法示例。
在下文中一共展示了XTemplate::menu_add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
include WWW_ROOT . 'pages/page_index.php';
} else {
include WWW_ROOT . 'pages/page_adminvps.php';
}
break;
case 'lang':
$lang->change($_GET['newlang']);
break;
default:
//include WWW_ROOT.'pages/page_index.php';
include WWW_ROOT . 'pages/page_adminvps.php';
}
if (isset($_SESSION["logged_in"]) && $_SESSION["logged_in"]) {
// 如果是管理员,才显示服务器状态信息
if ($_SESSION[is_admin]) {
$xtpl->menu_add(_("Status"), '?page=status', $_GET["page"] == 'status');
}
$xtpl->menu_add(_("Manage VPS"), '?page=adminvps', $_GET["page"] == 'adminvps');
$xtpl->menu_add(_("Manage Members"), '?page=adminm', $_GET["page"] == 'adminm');
$xtpl->menu_add(_("Manage Networking"), '?page=networking', $_GET["page"] == 'networking');
if ($_SESSION[is_admin]) {
$xtpl->menu_add(_("Manage Cluster"), '?page=cluster', $_GET["page"] == 'cluster');
$xtpl->menu_add(_("Transaction log"), '?page=transactions', $_GET["page"] == 'transactions');
}
// $xtpl->menu_add(_("About vpsAdmin"),'?page=about', ($_GET["page"] == 'about'), true);
// 页面右侧显示任务日志
list_transactions();
$xtpl->assign('AJAX_SCRIPT', ajax_getHTML('ajax.php?page=transactbox', 'transactions', 5000));
} else {
if ($_SESSION[is_admin]) {
$xtpl->menu_add(_("Status"), '?page=status', $_GET["page"] == 'status');
示例2:
case 'lang':
$lang->change($_GET['newlang']);
break;
case 'console':
include WWW_ROOT . 'pages/page_console.php';
break;
case 'jumpto':
include WWW_ROOT . 'pages/page_jumpto.php';
break;
default:
include WWW_ROOT . 'pages/page_index.php';
}
$request_page = $_GET["page"];
}
if (isset($_SESSION["logged_in"]) && $_SESSION["logged_in"]) {
$xtpl->menu_add(_("Status"), '?page=', $_GET["page"] == '');
$xtpl->menu_add(_("Members"), '?page=adminm', $_GET["page"] == 'adminm');
$xtpl->menu_add(_("VPS"), '?page=adminvps', $_GET["page"] == 'adminvps');
if ($_SESSION["is_admin"]) {
$xtpl->menu_add(_("Backups"), '?page=backup', $_GET["page"] == 'backup');
if (NAS_PUBLIC || $_SESSION["is_admin"]) {
$xtpl->menu_add(_("NAS"), '?page=nas', $_GET["page"] == 'nas');
}
$xtpl->menu_add(_("Networking"), '?page=networking', $_GET["page"] == 'networking');
$xtpl->menu_add(_("Cluster"), '?page=cluster', $_GET["page"] == 'cluster');
$xtpl->menu_add(_("Transaction log"), '?page=transactions', $_GET["page"] == 'transactions', true);
} else {
$xtpl->menu_add(_("Backups"), '?page=backup', $_GET["page"] == 'backup');
if (NAS_PUBLIC || $_SESSION["is_admin"]) {
$xtpl->menu_add(_("NAS"), '?page=nas', $_GET["page"] == 'nas');
}