本文整理匯總了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');
}