本文整理汇总了PHP中menu_entry函数的典型用法代码示例。如果您正苦于以下问题:PHP menu_entry函数的具体用法?PHP menu_entry怎么用?PHP menu_entry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了menu_entry函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMenu
function getMenu()
{
global $PHP_SELF;
echo "<ol class=menu>";
if ($_GET['op'] != 4) {
echo <<<EOB
<li><a href="{$PHP_SELF}&op={$_GET['op']}">Refresh Data</a></li>
EOB;
} else {
echo <<<EOB
<li><a href="{$PHP_SELF}&op=2}">Back</a></li>
EOB;
}
echo menu_entry(1, 'View Host Stats'), menu_entry(2, 'Variables');
echo <<<EOB
\t</ol>
\t<br/>
EOB;
}
示例2: put_login_link
</h1>
<div class="login">
<?php
put_login_link();
?>
</div>
<hr class="apc">
</div>
<?php
// Display main Menu
echo <<<EOB
\t<ol class=menu>
\t<li><a href="{$MY_SELF}&OB={$MYREQUEST['OB']}&SH={$MYREQUEST['SH']}">Refresh Data</a></li>
EOB;
echo menu_entry(OB_HOST_STATS, 'View Host Stats'), menu_entry(OB_USER_CACHE, 'User Cache Entries'), menu_entry(OB_VERSION_CHECK, 'Version Check');
if ($AUTHENTICATED) {
echo <<<EOB
\t\t<li><a class="aright" href="{$MY_SELF}&CC=1&OB={$MYREQUEST['OB']}" onClick="javascript:return confirm('Are you sure?');">Clear Cache</a></li>
EOB;
}
echo <<<EOB
\t</ol>
EOB;
// CONTENT
echo <<<EOB
\t<div class=content>
EOB;
// MAIN SWITCH STATEMENT
switch ($MYREQUEST['OB']) {
// -----------------------------------------------
示例3: put_login_link
put_login_link();
?>
</div>
<hr class="apc">
</div>
<?php
// Display main Menu
echo <<<EOB
\t<ol class=menu>
\t<li><a href="{$MY_SELF}&OB={$MYREQUEST['OB']}&SH={$MYREQUEST['SH']}">Refresh Data</a></li>
EOB;
echo menu_entry(1, 'View Host Stats'), menu_entry(2, 'System Cache Entries');
if ($AUTHENTICATED) {
echo menu_entry(4, 'Per-Directory Entries');
}
echo menu_entry(3, 'User Cache Entries'), menu_entry(9, 'Version Check');
if ($AUTHENTICATED) {
echo <<<EOB
\t\t<li><a class="aright" href="{$MY_SELF}&CC=1&OB={$MYREQUEST['OB']}" onClick="javascript:return confirm('Are you sure?');">Clear {$cache_mode} Cache</a></li>
EOB;
}
echo <<<EOB
\t</ol>
EOB;
// CONTENT
echo <<<EOB
\t<div class=content>
EOB;
// MAIN SWITCH STATEMENT
switch ($MYREQUEST['OB']) {
// -----------------------------------------------
示例4: put_login_link
put_login_link();
?>
</div>
<hr class="apc">
</div>
<?php
// Display main Menu
echo <<<EOB
\t<ol class=menu>
\t<li><a href="{$MY_SELF}&OB={$MYREQUEST['OB']}&SH={$MYREQUEST['SH']}">Refresh Data</a></li>
EOB;
echo menu_entry(1, 'View Host Stats', $MYREQUEST, $MY_SELF), menu_entry(2, 'System Cache Entries', $MYREQUEST, $MY_SELF);
if ($AUTHENTICATED) {
echo menu_entry(4, 'Per-Directory Entries', $MYREQUEST, $MY_SELF);
}
echo menu_entry(3, 'User Cache Entries', $MYREQUEST, $MY_SELF), menu_entry(9, 'Version Check', $MYREQUEST, $MY_SELF);
//// END
if ($AUTHENTICATED) {
echo <<<EOB
\t\t<li><a class="aright" href="{$MY_SELF}&CC=1&OB={$MYREQUEST['OB']}" onClick="javascipt:return confirm('Are you sure?');">Clear {$cache_mode} Cache</a></li>
EOB;
}
echo <<<EOB
\t</ol>
EOB;
// CONTENT
echo <<<EOB
\t<div class=content>
EOB;
// MAIN SWITCH STATEMENT
switch ($MYREQUEST['OB']) {
示例5: getMenu
function getMenu()
{
global $PHP_SELF, $INSTALLER09;
echo "<ol class=menu>";
if ($_GET['op'] != 4) {
echo <<<EOB
<li><a href="{$INSTALLER09['baseurl']}/staffpanel.php?tool=memcache&op={$_GET['op']}">Refresh Data</a></li>
EOB;
} else {
echo <<<EOB
<li><a href="{$INSTALLER09['baseurl']}/staffpanel.php?tool=memcache&op=2">Back</a></li>
EOB;
}
echo menu_entry(1, 'View Host Stats'), menu_entry(2, 'Variables');
echo <<<EOB
\t</ol>
\t<br/>
EOB;
}
示例6: block_sort
}
}
function block_sort($array1, $array2)
{
if ($array1['offset'] > $array2['offset']) {
return 1;
} else {
return -1;
}
}
// Display main Menu
echo <<<EOB
\t<ol class="menu nav nav-pills">
\t<li><a href="{$MY_SELF}&OB={$MYREQUEST['OB']}&SH={$MYREQUEST['SH']}">Refresh Data</a></li>
EOB;
echo menu_entry(1, 'View Host Stats', $MYREQUEST, $MY_SELF), menu_entry(2, 'System Cache Entries', $MYREQUEST, $MY_SELF), menu_entry(4, 'Per-Directory Entries', $MYREQUEST, $MY_SELF), menu_entry(3, 'User Cache Entries', $MYREQUEST, $MY_SELF), menu_entry(9, 'Version Check', $MYREQUEST, $MY_SELF);
echo <<<EOB
\t\t<li><a class="aright" href="{$MY_SELF}&CC=1&OB={$MYREQUEST['OB']}" onClick="javascript:return confirm('Are you sure?');">Clear {$cache_mode} Cache</a></li>
EOB;
echo <<<EOB
\t</ol>
EOB;
// CONTENT
echo <<<EOB
\t<div class=content>
EOB;
// MAIN SWITCH STATEMENT
switch ($MYREQUEST['OB']) {
// -----------------------------------------------
// Host Stats
// -----------------------------------------------
示例7: menu_entry
// Display main Menu
echo <<<EOB
<ol class=menu>
<li><a href="$MY_SELF&OB={$MYREQUEST['OB']}&SH={$MYREQUEST['SH']}">Refresh Data</a></li>
EOB;
echo
menu_entry(1,'View Host Stats'),
menu_entry(2,'System Cache Entries');
if ($AUTHENTICATED) {
echo menu_entry(4,'Per-Directory Entries');
}
echo
menu_entry(3,'User Cache Entries'),
menu_entry(9,'Version Check');
if ($AUTHENTICATED) {
echo <<<EOB
<li><a class="aright" href="$MY_SELF&CC=1&OB={$MYREQUEST['OB']}" onClick="javascipt:return confirm('Are you sure?');">Clear $cache_mode Cache</a></li>
EOB;
}
echo <<<EOB
</ol>
EOB;
// CONTENT
echo <<<EOB
<div class=content>
EOB;
示例8: createlayout_top
function createlayout_top($title = 'HackTheNet', $nomenu = false, $pads = true)
{
global $usr, $javascript, $STYLESHEET, $bodytag, $localhost, $FILE_REQUIRES_PC, $pc, $pcid;
if ($usr['sid'] != '') {
$sid = '&sid=' . $usr['sid'];
}
$stylesheet = $STYLESHEET;
if (@is_dir('styles/' . $stylesheet) == false || $stylesheet == '') {
$stylesheet = 'crystal';
}
basicheader($title);
if ($sid != '' && $usr['ads'] != 'no' && !$localhost && $pads == true) {
// werbung hier ausgeben
}
echo '
<body' . $bodytag . '>
<div class="header">
<h1>HTN v2 PublicSource</h1>
' . $ads;
if ($nomenu == false) {
echo '<ul class="navigation">
';
if ($sid != '') {
// INGAME ITEMS
menu_entry('game.htn?m=start' . $sid, 'Übersicht', 'Übersicht über alles Wichtige auf einen Blick.');
if ($usr['newmail'] > 0) {
$hw = $usr['newmail'] == 1 ? '' : 's';
$hw = 'Du hast ' . $usr['newmail'] . ' neue Message' . $hw;
}
menu_entry('mail.htn?m=start' . $sid, 'Messages', 'Hier kannst du Nachrichten verwalten und neue verfassen.', $hw, 'new-messages');
$numberofpcs = count(explode(',', $usr['pcs']));
$url = $numberofpcs > 1 ? 'game.htn?m=pcs' . $sid : 'game.htn?a=selpc&pcid=' . $usr['pcs'] . $sid;
$help = $numberofpcs > 1 ? 'Hier kommst du zu deinen PCs.' : 'Hier kommst du direkt zu deinem PC.';
if ($FILE_REQUIRES_PC && $pc['id'] == $pcid) {
$pc['name'] = safeentities($pc['name']);
menu_entry($url, 'Computer', $help, '<br />10.47.' . $pc['ip'] . ' (<em>' . $pc['name'] . '</em>)', '', true);
} else {
menu_entry($url, 'Computer', $help);
}
$help = (int) $usr['cluster'] > 0 ? 'Hier kannst du dich über den aktuellen Stand deines Clusters informieren' : 'Hier kannst du einen neuen Cluster gründen oder einem existierenden beitreten.';
menu_entry('cluster.htn?a=start' . $sid, 'Cluster', $help);
menu_entry('game.htn?m=subnet' . $sid, 'Subnet', 'Hier kannst du die Computer in deinem oder einem anderen Subnet einsehen.');
menu_entry('user.htn?a=config' . $sid, 'Optionen');
menu_entry('ranking.htn?m=ranking' . $sid, 'Rangliste');
menu_entry('game.htn?m=kb' . $sid, 'Hilfe', 'Hier findest du die Hilfe zum Spiel.');
} else {
// PUBLIC ITEMS
menu_entry('pub.htn', 'Startseite', 'HackTheNet-Startseite (Log In)');
menu_entry('pub.htn?a=register', 'Registrieren', 'Einen HackTheNet-Account anlegen');
menu_entry('pub.htn?d=newpwd', 'Neues Passwort', 'Ein neues Passwort für deinen Account anfordern');
menu_entry('pub.htn?d=credits', 'HTN-Team');
menu_entry('pub.htn?d=impressum', 'Impressum');
menu_entry('pub.htn?d=rules', 'Spielregeln', 'Wer die nicht beachtet, fliegt!');
menu_entry('pub.htn?d=faq', 'FAQ', 'Häufig gestellte Fragen zu HTN');
menu_entry('pub.htn?d=stats', 'Statistik', 'Statistische Daten über das Spiel');
}
// COMMON ITEMS
#menu_entry('http://forum.hackthenet.org/', 'Forum');
if ($sid != '') {
// INGAME ITEMS 2
menu_entry('login.htn?a=logout' . $sid, 'Log Out', 'Hier kannst du dich abmelden.', '<br />Angemeldet als: <em>' . $usr['name'] . '</em>', '', true);
} else {
// PUBLIC ITEMS 2
}
}
echo '</ul>
</div>
<!-- NAVI ENDE -->
';
}
示例9: getMenu
function getMenu()
{
$PHP_SELF = getUrl();
echo '<ul class="nav nav-tabs">';
if ($_GET['op'] != 4) {
echo <<<EOB
<li><a href="{$PHP_SELF}&op={$_GET['op']}"><span class="label label-success">Refresh Stats</span></a></li>
EOB;
} else {
echo <<<EOB
<li><a href="{$PHP_SELF}&op=2}">Back</a></li>
EOB;
}
echo menu_entry(1, 'View Host Stats'), menu_entry(2, 'Variables'), menu_entry(8, 'Slabs');
echo <<<EOB
\t</ul>
EOB;
}
示例10: getMenu
function getMenu()
{
global $PHP_SELF;
echo "<ol class=menu>";
if ($_GET['op'] != 4) {
echo <<<EOB
<li><a href="{$PHP_SELF}&op={$_GET['op']}">刷新数据信息</a></li>
EOB;
} else {
echo <<<EOB
<li><a href="{$PHP_SELF}&op=2}">Back</a></li>
EOB;
}
echo menu_entry(1, '显示主机统计信息'), menu_entry(2, '显示变量信息');
echo <<<EOB
\t</ol>
\t<br/>
EOB;
}
示例11: indexAction
//.........这里部分代码省略.........
text-align:center;
}
input {
background:rgb(153,153,204);
border:solid rgb(102,102,153) 2px;
color:white;
font-weight:bold;
margin-right:1em;
padding:0.1em 0.5em 0.1em 0.5em;
}
//-->
</style>
</head>
<body>
<div class="head">
<h1 class="apc">
<div class="logo"><span class="logo"><a href="http://pecl.php.net/package/APC">APC</a></span></div>
<div class="nameinfo">Opcode Cache</div>
</h1>
<div class="login">
<?php
put_login_link();
?>
</div>
<hr class="apc">
</div>
<?php
// Display main Menu
echo <<<EOB
<ol class=menu>
<li><a href="{$MY_SELF}&OB={$MYREQUEST['OB']}&SH={$MYREQUEST['SH']}">Refresh Data</a></li>
EOB;
echo menu_entry(1, 'View Host Stats'), menu_entry(2, 'System Cache Entries');
if ($AUTHENTICATED) {
echo menu_entry(4, 'Per-Directory Entries');
}
echo menu_entry(3, 'User Cache Entries'), menu_entry(9, 'Version Check');
if ($AUTHENTICATED) {
echo <<<EOB
<li><a class="aright" href="{$MY_SELF}&CC=1&OB={$MYREQUEST['OB']}" onClick="javascipt:return confirm('Are you sure?');">Clear {$cache_mode} Cache</a></li>
EOB;
}
echo <<<EOB
</ol>
EOB;
// CONTENT
echo <<<EOB
<div class=content>
EOB;
// MAIN SWITCH STATEMENT
switch ($MYREQUEST['OB']) {
// -----------------------------------------------
// Host Stats
// -----------------------------------------------
case OB_HOST_STATS:
$mem_size = $mem['num_seg'] * $mem['seg_size'];
$mem_avail = $mem['avail_mem'];
$mem_used = $mem_size - $mem_avail;
$seg_size = bsize($mem['seg_size']);
$req_rate = sprintf("%.2f", ($cache['num_hits'] + $cache['num_misses']) / ($time - $cache['start_time']));
$hit_rate = sprintf("%.2f", $cache['num_hits'] / ($time - $cache['start_time']));
$miss_rate = sprintf("%.2f", $cache['num_misses'] / ($time - $cache['start_time']));
$insert_rate = sprintf("%.2f", $cache['num_inserts'] / ($time - $cache['start_time']));
$req_rate_user = sprintf("%.2f", ($cache_user['num_hits'] + $cache_user['num_misses']) / ($time - $cache_user['start_time']));
$hit_rate_user = sprintf("%.2f", $cache_user['num_hits'] / ($time - $cache_user['start_time']));
示例12: getMenu
function getMenu(){
global $PHP_SELF,$langs;
echo "<ol class=menu>";
echo menu_entry(1,$langs->trans("Refresh"));
// echo menu_entry(2,$langs->trans('Variables'));
echo <<<EOB
</ol>
<br/>
EOB;
}