本文整理汇总了PHP中print_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP print_menu函数的具体用法?PHP print_menu怎么用?PHP print_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_menu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_menu
function print_menu($menu)
{
$buffer = null;
foreach ($menu as $name => $link) {
if (is_array($link)) {
$buffer .= '<li class="dropdown"><a href="" class="dropdown-toggle js-activated" data-toggle="dropdown"> ' . $name . '</a>';
$buffer .= '<ul class="dropdown-menu">' . print_menu($link) . '</ul></li>';
} else {
$buffer .= '<li><a href="' . $link . '">' . $name . '</a></li>';
}
}
return $buffer;
}
示例2: print_menu
function print_menu($menu, $isChilden = true)
{
echo '<ul style="z-index:1;">', "\n";
$item_count = 0;
foreach ($menu as $item) {
$item_count++;
if ($item_count == 1 && $isChilden) {
echo '<li class="li3_top">';
} else {
echo '<li>';
}
echo '<a href=', !$item->children ? '/videos/lists/' . $item->vcid : '#', '>', $item->vcname, !$item->children ? ' (' . $item->video_counts . ')' : '', '</a>';
// Only Leaves show number
if ($item->children) {
print_menu($item->children);
}
echo '</li>', "\n";
}
echo '</ul>', "\n";
}
示例3: print_menu
/**
* Generate a menu tree!
* A recursive function to generate a menu tree.
*
* @param string $uid The menu identifier
* @param int $level Level of the menu, used internally. Default 0.
* @param array $args Arguments
*/
function print_menu($uid = null, $level = 0, $args = [])
{
// Example of custom default args
$args = merge_args_defaults($args, ['max-level' => 99, 'menu-ul-intag' => 'class="collection"']);
// End menu if level reached
if ($level > $args['max-level']) {
return;
}
$menuEntries = get_children_menu_entries($uid);
if (!$menuEntries) {
return;
}
?>
<ul<?php
if ($level === 0) {
echo " {$args['menu-ul-intag']}";
}
?>
>
<?php
foreach ($menuEntries as $menuEntry) {
?>
<li class="collection-item">
<?php
echo HTML::a($menuEntry->url, $menuEntry->name, $menuEntry->get('title'));
?>
<?php
print_menu($menuEntry->uid, $level + 1, $args);
?>
</li>
<?php
}
?>
</ul>
<?php
}
示例4: preoutgoing
$out = new preoutgoing();
if (!$out->load($preoutgoing_id)) {
$message .= '<span class="error">' . $out->errormsg . '</span>';
}
$person = new benutzer();
if (!$person->load($out->uid)) {
$message .= '<span class="error">' . $person->errormsg . '</span>';
}
echo '<h2>Details - ' . $person->vorname . ' ' . $person->nachname . '</h2>';
print_menu('Personendetails', 'personendetails');
echo ' | ';
print_menu('Dokumente', 'dokumente');
echo ' | ';
print_menu('Lehrveranstaltungen', 'lehrveranstaltungen');
echo ' | ';
print_menu('Anmerkungen', 'anmerkungen');
echo '<div style="float:right">' . $message . '</div>';
switch ($action) {
case 'personendetails':
print_personendetails();
break;
case 'dokumente':
print_dokumente();
break;
case 'lehrveranstaltungen':
print_lvs();
break;
case 'anmerkungen':
print_anmerkungen();
break;
}
示例5: print_menu
<?php
require_once 'include/header.php';
require_once 'include/menu.php';
require_once 'modules/subscriber.php';
?>
<?php
print_menu('subscribers');
?>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable( {
<?php
/*$lang_file = 'js/'.$_SESSION['lang'].'.txt';
if (file_exists($lang_file)) {
echo '"oLanguage": { "sUrl": "'.$lang_file.'" },';
}*/
?>
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"aaSorting": [[ 0, "desc" ]],
"aoColumnDefs": [
{
"aTargets": [8],
"mData": null,
"mRender": function (data, type, full) {
sub = full[4].match(/\d\d\d\d\d\d\d\d\d\d\d/);
return '<a href="subscriber_edit.php?id='+sub+'" class="pop"><img src="img/edit.png" alt="Edit" valign="middle" /></a> | <a href="subscriber_delete.php?id='+sub+'" class="pop"><img src="img/delete.png" alt="Delete" valign="middle" /></a>';
}
示例6: mysql_result
echo "</td>\n";
}
echo "<td>\n";
echo "Select To Delete" . "\n";
echo "</td>\n";
echo "</tr>\n";
for ($i = 0; $i < $num_items; $i++) {
echo "<tr>\n";
for ($j = 0; $j < $num_fields; $j++) {
echo "<td>\n";
echo mysql_result($menu, $i, $j) . " " . "\n";
echo "</td>\n";
}
echo "<td>\n";
$type = "menu[]";
$id = mysql_result($menu, $i, 0);
echo "<input type=\"checkbox\" name=\"{$type}\" value=\"{$id}\"><br/>" . "\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "</table>" . "\n" . "<br/>";
echo "<input type=\"submit\" value=\"Delete Selected Items\">" . "\n";
}
?>
<body background="1.png">
<?php
print_menu();
?>
</body>
</html>
示例7: print_menu
<?php
require_once 'include/header.php';
require_once 'include/menu.php';
require_once 'modules/configuration.php';
?>
<?php
print_menu('platform');
?>
</script>
<br/><br/>
<center>
<?php
try {
$site = new Configuration();
$info = $site->getSite();
?>
<style>
dl {
border: 1px solid #666;
padding: 0.5em;
width: 500px;
font-size: 15px;
}
dt {
float: left;
clear: left;
width: 200px;
text-align: right;
示例8: print_menu
<div class="navbar navbar-material-orange">
<div class="navbar-header">
<a class="navbar-brand">ระบบจัดการฐานข้อมูลสมาชิกมูลนิธิไทยนำ-ลิมป์ศรีสวัสดิ์</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="../../logout.php">ออกจากระบบ</a></li>
</ul>
</div>
</div>
</div>
<!-- <div class=" col-xs-3 btn-material-brown">
<h3 class="mdi-navigation-menu"> เมนู</h3>
<ul class="nav nav-pills nav-stacked" >-->
<?php
print_menu(3);
?>
<!-- </ul>
</div>-->
<div class=" col-xs-9">
<center>
<h1>สร้างชื่อจีน</h1>
<div class="row" style="margin-top: -3px">
<div class="col-xs-10 col-xs-offset-1 well">
<form class="form-horizontal" action="createname.php" method="Get" style="margin-left:-10px; margin-top: 10px">
<div class="row">
<div class="col-xs-6 col-xs-offset-3" style="margin-top: -20px">
<h2>ค้นหาข้อมูล</h2>
</div>
</div>
<div class="row" style="margin-top: 10px">
示例9: print_menu
?>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable( {
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"aaSorting": [[ 0, "desc" ]],
"sAjaxSource": "credit_history_processing.php"
} );
} );
</script>
<?php
print_menu('credits');
?>
<h1><?php
echo _("Credit History");
?>
</h1><br/>
<div id="dynamic" style="margin-left: 20px;">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
<thead>
<tr>
<th align='left' width="15%"><?php
echo _("Date");
?>
</th>
示例10: html_page_bottom1
/**
* Print the part of the page that comes below the page content
* $p_file should always be the __FILE__ variable. This is passed to show source
* @param string $p_file should always be the __FILE__ variable. This is passed to show source
* @return null
*/
function html_page_bottom1($p_file = null)
{
if (!db_is_connected()) {
return;
}
event_signal('EVENT_LAYOUT_CONTENT_END');
echo '</div>', "\n";
if (config_get('show_footer_menu')) {
echo '<br />';
print_menu();
}
html_page_bottom1a($p_file);
}
示例11: array
);
// "Remember" administrators - try to make this link persistent if people have visited an admin page.
// (see _session.php file for implementation)
if ($is_admin) {
$sections[] = array('Admin', 'admin', 'admin/');
}
if (!preg_match( '/^www.worldcubeassociation.org$/', $_SERVER["SERVER_NAME"])) {
noticeBox3( 0, "Note: This is only a copy of the WCA results system used for testing stuff. The official WCA results are at:<br /><a href='https://www.worldcubeassociation.org/results/'>https://www.worldcubeassociation.org/results/</a>" );
}
// only show errors in admin section
if($currentSection == 'admin' && isset($installation_errors) && !empty($installation_errors)) {
showErrors($installation_errors);
}
?>
<!-- TODO: Remove or reappropriate for Bootstrap.
<div id="pageMenuFrame">
<div id="pageMenu">
<ul class="navigation">
<?php print_menu($sections, $currentSection); ?>
</ul>
</div>
</div>
<div id='header'><a href='https://www.worldcubeassociation.org/'>World Cube Association<br />Official Results</a></div>
<?php } ?>
-->
<?php startTimer(); ?>
示例12: preincoming
$inc = new preincoming();
if (!$inc->load($preincoming_id)) {
$message .= '<span class="error">' . $inc->errormsg . '</span>';
}
$person = new person();
if (!$person->load($inc->person_id)) {
$message .= '<span class="error">' . $person->errormsg . '</span>';
}
echo '<h2>Details - ' . $person->vorname . ' ' . $person->nachname . '</h2>';
print_menu('Personendetails', 'personendetails');
echo ' | ';
print_menu('Dokumente', 'dokumente');
echo ' | ';
print_menu('Lehrveranstaltungen', 'lehrveranstaltungen');
echo ' | ';
print_menu('Ansprechpersonen', 'ansprechpersonen');
echo '<div style="float:right">' . $message . '</div>';
echo '<br />';
switch ($action) {
case 'personendetails':
print_personendetails();
break;
case 'dokumente':
print_dokumente();
break;
case 'lehrveranstaltungen':
print_lehrveranstaltungen();
break;
case 'ansprechpersonen':
print_ansprechpersonen();
break;
示例13: print_menu
require_once 'include/header.php';
require_once 'include/menu.php';
?>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable( {
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "rates_processing.php"
} );
} );
</script>
<?php
print_menu('rates');
?>
<h1><?php
echo _("Rates");
?>
</h1><br/>
<div id="dynamic" style="margin-left: 20px;">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
<thead>
<tr>
<th align='left' width="20%"><?php
echo _("Destination");
?>
</th>
示例14: print_menu
<?php
require_once 'include/header.php';
require_once 'include/menu.php';
require_once 'modules/statistics.php';
print_menu('statistics');
?>
<br/><br/>
<center>
<?php
$stat = new CallsStatistics();
try {
$total_calls = $stat->getTotalCalls();
} catch (StatisticException $e) {
$total_calls = "ERROR {$e}";
}
try {
$total_minutes = $stat->getTotalMinutes();
} catch (StatisticException $e) {
$total_minutes = "ERROR {$e}";
}
try {
$avg_call_duration = $stat->getAverageCallDuration();
} catch (StatisticException $e) {
$avg_call_duration = "ERROR {$e}";
}
?>
Total calls: <b><?php
echo $total_calls;
?>
示例15: header
}
# what is the current id
if (isset($_REQUEST['id'])) {
$id = $_REQUEST['id'];
} else {
header("Location: index.php");
die('need an id');
}
# Make sure we can get here.
if ($sections[$table]['level']['edit'] < get_page_acccess_level() && ($table != "users" || $id != get_userid())) {
#header("Location: {$matches[1]}/index.php");
die("Not authorized. " . get_userid());
}
# print top
print_header($table);
print_menu($section);
# print form to edit entry
$msg = print_entry($id, $table, false);
# list files associated
if ($section['files']) {
$tmp = show_files($id, $table, false);
if ($msg == "") {
$msg = $tmp;
} else {
if ($tmp != "") {
$msg = "{$msg}<br/>{$tmp}";
}
}
}
# print footer of html
print_footer($msg);