本文整理汇总了PHP中menu::getAllMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP menu::getAllMenu方法的具体用法?PHP menu::getAllMenu怎么用?PHP menu::getAllMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类menu
的用法示例。
在下文中一共展示了menu::getAllMenu方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: menu
<?php
require_once '../models/class-menu.php';
require_once '../models/function.php';
$menu_obj = new menu();
$sort = '';
if (isset($_GET['sort'])) {
$sort = $_GET['sort'];
}
$group_id = isset($_GET['group_id']) ? $_GET['group_id'] : '';
switch ($sort) {
case 'menu_name':
$a = $menu_obj->getAllMenu($group_id, 'menu_name');
break;
case 'position':
$a = $menu_obj->getAllMenu($group_id, 'position');
break;
case 'parent_id':
$a = $menu_obj->getAllMenu($group_id, 'parent_id');
break;
default:
$a = $menu_obj->getAllMenu($group_id, 'parent_id');
}
?>
<form class="form-horizontal form-bordered">
<div class="form-group">
<label class="col-md-3 control-label" for="example-select">Lọc theo nhóm Menu</label>
<div class="col-md-6">
<select id="group_menu_list" name="menu_group" class="form-control" size="1">
<option value="0">Chọn nhóm menu</option>
<?php
示例2: buildMenuDeQuy
if (isset($_GET['id'])) {
echo $temp['position'];
}
?>
"></div>
</div>
<div class="form-group">
<label class="col-md-3 control-label" for="example-select">Chọn menu cha</label>
<div class="col-md-6">
<select id="example-select" name="parent_id" class="form-control" size="1">
<option value="0"><strong>Không có cấp cha</strong></option>
<?php
$menu_obj = new menu();
$group_id = isset($_GET['group_id']) ? $_GET['group_id'] : '';
$temp_menu = isset($_GET['id']) ? $menu_obj->getAllMenuExceptId($_GET['id'], $group_id, 'position') : $menu_obj->getAllMenu($group_id, 'position');
$id = isset($_GET['id']) ? $temp['parent_id'] : 0;
echo buildMenuDeQuy($temp_menu, $id);
?>
</select>
</div>
</div>
<div class="form-group form-actions">
<div class="col-md-9 col-md-offset-3">
<input type="hidden" name="id" value="<?php
if (isset($_GET['id'])) {
echo $_GET['id'];
}
?>
" />
示例3: buildMenuFrontend
<?php
if (isset($_SESSION['user-khachhang'])) {
?>
<p style=" margin-top:2px; margin-left:40px"><a href="logout.php">Logout</a></p>
<?php
}
?>
</div>
<!--End .header-info-->
</div><!--End #logo-->
<div class="group"></div>
<div class="menu">
<div class="main-menu">
<?php
$menu_temp = $menu_obj->getAllMenu($menu_config['main_menu'], 'position');
echo buildMenuFrontend($menu_temp);
?>
</div>
<div class="search">
<form action="index.php" method="get">
<input type="hidden" name="view" value="search" />
<input class="search1" type="text" placeholder="TÌM KIẾM" name="keyword" />
<input class="search1-buttom" type="submit" value="" />
</form>
</div>
<!--end search-->
</div>
</div><!--End #header-->
<?php
if (!isset($_GET["view"])) {