本文整理汇总了PHP中getMenu函数的典型用法代码示例。如果您正苦于以下问题:PHP getMenu函数的具体用法?PHP getMenu怎么用?PHP getMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getMenu函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: generateMenu
/**
* Generate User Menu Assigned by Profile.
* @param type $id_profile
* @return type
*/
function generateMenu($id_profile, $id_user)
{
global $array_label;
$query_result = getMenu($id_profile);
$a_menu = array();
$s_menu = array();
if (mysql_num_rows($query_result) == 0) {
array_push($a_menu, array("label" => $array_label['login_no_menu'], "id_group_phase" => 0));
$a_temp = array("id_group_phase" => "0", "id_phase" => "0", "name" => $array_label['login_no_menu'], "total" => 0, "assigned" => 0);
array_push($s_menu, $a_temp);
} else {
$temp = "";
while ($showtablerow = mysql_fetch_array($query_result)) {
$phase_label = $showtablerow['label'];
$a_temp = array("id_group_phase" => $showtablerow['id_group_phase'], "id_phase" => $showtablerow['id_phase'], "name" => $showtablerow['name'], "total" => 0, "assigned" => 0);
array_push($s_menu, $a_temp);
if ($phase_label != $temp) {
$temp = $phase_label;
array_push($a_menu, array("label" => $showtablerow['label'], "id_group_phase" => $showtablerow['id_group_phase']));
}
}
$s_menu = updateInstanceWork($s_menu, $id_user);
}
return array("a_menu" => $a_menu, "s_menu" => $s_menu);
}
开发者ID:Gary-Flores,项目名称:photo_flow,代码行数:30,代码来源:pf_data_service.php
示例2: smarty_function_moduleEditMenu
function smarty_function_moduleEditMenu($params, &$container)
{
$specialModules = array_flip($container->main->getSpecialModules());
if (!isset($specialModules[$container->main->selectedTab]) && canUserEditModule($container->main, $container->moduleID)) {
$result = getVariables($container->moduleID);
$result .= getMenu($container->main, $container->moduleID);
return $result;
} else {
return '';
}
}
开发者ID:BackupTheBerlios,项目名称:alumni-online-svn,代码行数:11,代码来源:function.moduleEditMenu.php
示例3: run
public function run()
{
$settings = Style::getSettings();
//Reverse the Menu, we've right float
getMenu()->flip();
foreach ($settings as $setting => $value) {
if ($value != null) {
getDisplay()->setTemplateVariable($settings, $value);
}
}
}
开发者ID:JacoRuit,项目名称:orongocms,代码行数:11,代码来源:monkPHP.php
示例4: getMenu
/**
* @param $mList
* @param int $pid
* @return array
* description:菜单递归方法
*/
function getMenu($mList, $pid = 0)
{
$arr = array();
foreach ($mList as $array) {
if ($array['pid'] == $pid) {
$array['child'] = getMenu($mList, $array['id']);
$arr[$array['id']] = $array;
}
}
return $arr;
}
开发者ID:LiJiaDongYue,项目名称:adminmanage,代码行数:17,代码来源:function.php
示例5: getMenu
function getMenu($categoryId = 0)
{
$children = mysql_query("SELECT id, title, menuTitle, override, slug, categoryId, type FROM " . DB_PREFIX . "content WHERE categoryId = " . (int) $categoryId . " AND menu = 1 AND status = 1 ORDER BY sort ASC");
$items = array();
while ($row = mysql_fetch_assoc($children)) {
$items[] = '<li' . ($_GET['locationName'] == $row['slug'] ? ' class="current-menu-item"' : '') . '><a href="' . ($row['override'] ? $row['override'] : gen_seo_friendly_titles($row['slug']) . '.html') . '">' . ($row['menuTitle'] ? $row['menuTitle'] : $row['title']) . (isParent($row['id']) ? ' <i class="icon-angle-down"></i>' : '') . '</a>' . getMenu($row['id']) . '</li>';
}
if (count($items)) {
return '<ul class="nav-menu dropdown-menu">' . implode('', $items) . '</ul>';
} else {
return '';
}
}
开发者ID:sabasco,项目名称:gnscms,代码行数:13,代码来源:func.php
示例6: getCurrentURI
/**
* @return string the requested menu item URI
*/
function getCurrentURI()
{
$menu = getMenu();
if (array_key_exists($_SERVER['REQUEST_URI'], $menu)) {
return $_SERVER['REQUEST_URI'];
} else {
foreach (array_keys(getMenu()) as $href) {
if (preg_match("@^{$href}@", $_SERVER['REQUEST_URI'])) {
return $href;
}
}
}
return key($menu);
}
开发者ID:dani-nadler,项目名称:SA_Auswertung,代码行数:17,代码来源:index.php
示例7: getMenu
function getMenu($uid, $pid)
{
$q = "\tselect \tA.id\t\t\t\tas menu_id" . "\t,\t\tA.pid\t\t\t\tas menu_pid" . "\t,\t\tA.label\t\t\t\tas text" . "\t,\t\tA.icon\t\t\t\tas iconCls" . "\t,\t\tA.module\t\t\tas module" . "\t,\t\tMAX(B.permission)\tas permission" . "\tfrom\t_menu\t\t\t\tA" . "\t,\t\t_group_menu\t\t\tB" . "\t,\t\t_user_group\t\t\tC" . "\twhere\tA.pid\t\t\t\t= ?" . "\tand\t\tA.id\t\t\t\t= B._menu_id" . "\tand\t\tB._group_id\t\t\t= C._group_id" . "\tand\t\tC._user_id\t\t\t= ?" . "\tand\t\tC._profile_id\t\t= ?" . "\tand\t\tB.permission\t\t> 0" . "\tand\t\tA.type\t\t\t\tin (1,3)" . "\tgroup by A.id" . "\torder by A.id";
$ps = Jaring::$_db->prepare($q);
$ps->execute(array($pid, $uid, Jaring::$_c_profile_id));
$rs = $ps->fetchAll(PDO::FETCH_ASSOC);
$ps->closeCursor();
foreach ($rs as &$menu) {
$menu['enableToggle'] = true;
$submenu = getMenu($uid, $menu['menu_id']);
if (count($submenu) > 0) {
$menu['arrowAlign'] = "right";
$menu['menu'] = $submenu;
}
}
return $rs;
}
开发者ID:shuLhan,项目名称:sigma,代码行数:17,代码来源:menu.php
示例8: getMenu
function getMenu($pid = 0)
{
global $webdb;
if (isShopUser()) {
$where = " and (sid='0' or sid='" . $_SESSION['shop_id'] . "')";
} else {
$where = " and sid=0 ";
}
$sql = "select * from web_prod_type where parent_id=" . $pid . " " . $where;
$menuAry = $webdb->getList($sql);
if (sizeof($menuAry) > 0) {
foreach ($menuAry as $key => $val) {
$sub_menu = getMenu($val['id']);
if ($sub_menu) {
$menuAry[$key]['children'] = $sub_menu;
}
}
return $menuAry;
} else {
return false;
}
}
开发者ID:austinliniware,项目名称:tsci-rota,代码行数:22,代码来源:menu.fun.php
示例9: getMenu
function getMenu($parent = 'All')
{
$module = new owebp_OwebpModule();
$rStr = '';
if ($parent == 'All') {
$rStr .= '<ul>';
}
foreach ($module->table as $record) {
if ($record['parent'] == $parent) {
$rStr .= '<li>' . $record['value'];
$rStr .= '<ul>';
foreach ($record['collections'] as $collection) {
$rStr .= '<li><a href="/' . $collection . '">' . ucwords(join(' ', split('_', $collection))) . '</a></li>';
}
$rStr .= getMenu($record['value']);
$rStr .= '</ul>';
$rStr .= '</li>';
}
}
if ($parent == 'All') {
$rStr .= '</ul>';
}
return $rStr;
}
开发者ID:hybr,项目名称:jpm,代码行数:24,代码来源:autoload.php
示例10: getLabel
}
}
$html .= "<div class='container menu-cont'>";
$html .= "<div class='InitTop col-xs-4'>";
$html .= "<div class='menu-bg-l'></div>";
$html .= "<div>";
require "login.topo.php";
$html .= "</div>";
$html .= "<a href='{$dados_relevantes->SITE}/'><div class='Logo'></div></a>";
$html .= "</div>";
$html .= "<div class='Bandeiras col-xs-8'>";
$html .= "<div class='Pouzada'>";
$html .= getLabel('LABEL_POUZADA', $_SESSION['LANGUAGE']);
$html .= "</div>";
$html .= getInternacionalizacao();
$html .= getMenu($dados_relevantes->SITE);
$html .= "</div>";
$html .= "</div>";
$html .= "<div class='ResetFloat'></div>";
if (isset($_GET["actionType"])) {
$url = $_GET["actionType"] . ".php";
if (is_file($url)) {
require $url;
} else {
if ($_GET["actionType"] == "") {
require 'pagina.inicial.php';
} else {
echo "<script>window.location.href = '/404.html';</script>";
//die('Página não encontrada');
}
}
开发者ID:patryckgratao,项目名称:projeto-maravista,代码行数:31,代码来源:mobile.php
示例11: Usuario
include_once 'class/master.inc.php';
$usuario = new Usuario();
$chamado = new Chamado();
$categoria = new Categoria();
if (isset($_GET)) {
switch ($_GET['action']) {
case 'abrir':
$chamado->CriarChamado($usuario->GetId($_SESSION['login']), utf8_decode($_POST['titulo']), utf8_decode($_POST['mensagem']), $_POST['os'], $_POST['categoria']);
$tplMensagem = '<p class="success" id="sucesso">Helpdesk aberto com sucesso.</p>';
break;
}
}
$tplCategoria = "<option>(vazio)</option>";
if ($categoria->RetornarCategorias()) {
foreach ($categoria->RetornarCategorias() as $cat) {
$tplCategoria .= "<option value='" . $cat['id_categoria'] . "'>" . $cat['descricao'] . "</option>";
}
}
$tplHelpdeskAberto = "";
$todosChamados = $chamado->GetTodosChamados('', $usuario->GetId($_SESSION['login']), '');
if ($todosChamados != "") {
foreach ($todosChamados as $helpdesk) {
$tplHelpdeskAberto .= '<p><a href="detalhe.php?id=' . $helpdesk['id_chamado'] . '" class="tooltip" title="' . utf8_encode($helpdesk['titulo']) . '">' . $helpdesk['id_chamado'] . '</a> - <strong>' . $categoria->GetDescricao($helpdesk['categoria']) . '</strong> - OS ' . $helpdesk['os'] . ' - ' . utf8_encode($helpdesk['titulo']) . ' </p>';
}
} else {
$tplHelpdeskAberto = "<blockquote>Nenhum helpdesk aberto no momento.</blockquote>";
}
$pagina = new Template('templates/principal.tpl');
$pagina->trocarTags(array('CABECALHO' => 'templates/cabecalho.tpl', 'RODAPE' => 'templates/rodape.tpl', 'MENU' => getMenu(), 'USUARIO' => $usuario->GetNome($_SESSION['login']), 'CATEGORIA' => $tplCategoria, 'HELPDESK_ABERTO' => $tplHelpdeskAberto, 'MENSAGEM' => $tplMensagem));
$pagina->mostrar();
开发者ID:rogeriopradoj,项目名称:Helpdesk,代码行数:30,代码来源:principal.php
示例12: header
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
// Date in the past
/* algemene controller */
//error_reporting(E_ALL); //commentarieer
@define('__ROOT__', dirname(dirname(__FILE__) . "/mvc_2013"));
require_once __ROOT__ . "/data/plantendao.php";
require_once __ROOT__ . "/data/soortendao.php";
require_once __ROOT__ . "/man/templateManager.php";
require_once __ROOT__ . "/content/inhoud.php";
//require_once "content/dyn_elementen.php";
//default waarden
$tpl['title'] = "de Plantenshop, een vdab jQuery tutorial";
// title in head
$tpl['body_id'] = "";
// id van body tag
$tpl['links'] = getMenu();
// inhoud linkerkolom
$tpl['rechts'] = "";
// inhoud rechterkolom
$tpl['paginaScripts'] = "";
// pagina specifiek scripts //gebruikt ondersteunende functies in inhoud.php
$tpl['paginaStylesheets'] = "";
// pagina specifiek link element
$tpl['dyn'] = "";
// om verborgen dynamische elementen op te roepen via script,
//********welke pagina**********************
if (isset($_GET['page'])) {
//specifieke pagina
$page = $_GET['page'];
switch ($page) {
case "about":
开发者ID:rvaliev,项目名称:Plantenshop,代码行数:31,代码来源:index.php
示例13: getPathToRoot
/**
* Returns array containing all pages an the path from specified page to root
*
* @param string $path Path to the page, "." if you want to use $spid, else use the path in this parameter.
* @param integer $spid ID of the sitepage to get the menu structure from.
* @returns array
*/
function getPathToRoot($path=".", $spid=0) {
global $page, $v;
if (($path==".") && ($spid==0)) $spid=$page;
$currentMenuId = getDBCell("sitepage", "MENU_ID", "SPID = $spid");
$currentSPID = $page;
if (getSPType($currentSPID) > 1)
$currentSPID = getDBCell("sitepage", "SPID", "MENU_ID = $currentMenuId ORDER BY POSITION");
$currentSPName = getMenu($spid, $v, true);
$path = array();
while ($currentMenuId != 0) {
array_push($path, $currentSPID);
$currentMenuId = getDBCell("sitemap", "PARENT_ID", "MENU_ID = $currentMenuId");
$currentSPID = getDBCell("sitepage", "SPID", "MENU_ID = ".$currentMenuId);
$currentSPName = getMenu($currentSPID, $v, true);
}
return $path;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:26,代码来源:menu.inc.php
示例14: getContent
$TITLE = CMS_TITLE . " - {$TITLE}";
} else {
$TITLE = CMS_TITLE;
}
///Gets the content according to the user's permissions
$CONTENT = getContent($pageId, $action, $userId, $permission);
///Gets the inherited code (if any) from the parent page
$INHERITEDINFO = inheritedinfo($pageIdArray);
///Gets the breadcrumb
$BREADCRUMB = breadcrumbs($pageIdArray, " » ");
//Gets the searchbar
$SEARCHBAR = getSearchbar($userId, $pageId);
//Gets the page-speciit keywords
$PAGEKEYWORDS = getPagetags($pageId);
///Gets the menubar consisting of the child pages from the current location upto a certain depth
$MENUBAR = getMenu($userId, $pageIdArray);
///The Login form to be displayed from login.lib.php
if ($userId == 0) {
$LOGINFORM = loginForm();
} else {
$userNameFromId = getUserName($userId);
$LOGINFORM = "Welcome {$userNameFromId}.";
}
///Gets the list of allowed actions for the current page
$ACTIONBARPAGE = getActionbarPage($userId, $pageId);
///Gets the list of allowed actions for the current module on the page
$ACTIONBARMODULE = getActionbarModule($userId, $pageId);
///Initializes the widgets in the page
populateWidgetVariables($pageId);
///If its disabled, then all the links in the generated page are converted into non-pretty URLs using regex
if ($rewriteEngineEnabled == 'false') {
开发者ID:ksb1712,项目名称:pragyan,代码行数:31,代码来源:index.php
示例15: session_start
require "curl_menu.php";
// require 'conn.php';
session_start();
$username = $_SESSION['username'];
$password = $_SESSION['password'];
$hiddenfild = $_SESSION['hiddenfild'];
$url = $_POST['url'];
if (!empty($url)) {
$_SESSION['url'] = $url;
}
$schoolyear = $_GET['schoolyear'];
$semester = $_GET['semester'];
if (!empty($schoolyear)) {
$url = $_SESSION['url'] . '?schoolyear=' . $schoolyear . '&semester=' . $semester;
}
$contents = getMenu($hiddenfild, $username, $password, $url);
//echo $contents;
preg_match_all('/<table([\\s\\S]*?)width="95[^>]*>([\\s\\S]*?)<\\/table>/', $contents, $table);
//用正则表达式将课表的表格取出
//print_r($table);
preg_match_all('/<select([\\s\\S]*?)[^>]*>([\\s\\S]*?)<\\/select>/', $table[2][0], $class_date);
//学期时间;
//preg_match_all('/<span([\s\S]*?)<\/span>/',$table[2][1],$title_data);//标题
//print_r($title_data[0][0]);
//
//preg_match_all('/<font([\s\S]*?)<\/font>/',$table[2][2],$title_tip);//提示
//print_r($title_tip[0][0]);
preg_match_all('/<tr height="25">([\\s\\S]*?)<\\/tr>/', $table[2][3], $info_data);
//信息
//print_r($info_data);
?>
开发者ID:bin-code,项目名称:curl,代码行数:31,代码来源:2.php
示例16: getMenu
$_SESSION["menu_usuario"] = getMenu("menu_con.txt");
$_SESSION["id_usuario"] = 1;
$_SESSION["id_local"] = $v_dados_rede['id_local'];
$_SESSION["nm_local"] = $v_dados_rede['nm_local'];
$_SESSION["sg_local"] = $v_dados_rede['sg_local'];
$_SESSION["cs_nivel_administracao"] = 0;
?>
<SCRIPT LANGUAGE="Javascript">
top.location = 'index.php';
</script>
<?
}
else
{
$treefile = getMenu("menu_ini.txt"); //"language/menus/menu_ini.txt";
require "include/treemenu.php";
?>
<p>
<form name="form1" method="post" action="menu_esq.php">
<table width="24%" border="0" align="center">
<tr>
<td valign="middle" class="label_peq_sem_fundo"><div align="right"><?php
echo $oTranslator->_('kciq_msg user');
?>
:</div></td>
<td class="dado_peq_sem_fundo"><div align="left"><input name="frm_nm_usuario_acesso" type="text" id="frm_nm_usuario_acesso" size="12" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" ></div></td>
</tr>
<tr>
<td valign="middle" class="label_peq_sem_fundo"><div align="right"><?php
echo $oTranslator->_('kciq_msg password');
开发者ID:GabrielDiniz,项目名称:FluxNetControl,代码行数:31,代码来源:menu_esq.php
示例17: dirname
// require_once(dirname(dirname(dirname(__file__))) . "/config.php");
// require_once(dirname(dirname(dirname(__file__))) . "/functions.php");
require_once dirname(__FILE__) . "/functions.php";
procLockCheck(getPDO());
procLocking(getPDO());
date_default_timezone_set('Asia/Tokyo');
$tags = [];
$times = [];
timeTest("ProcStart");
memoryGetUse("base");
$queryList = getSQLQuery(getPDO());
$censorList = getCensorList(getPDO(), $queryList["SELECT_CENSOR"]);
$regexList = getRegex(getPDO(), $queryList["SELECT_REGEX"]);
$fixedList = getFix(getPDO(), $queryList["SELECT_FIX"]);
$menuUrl = getMenu(getPDO(), $queryList["SELECT_MENUURL"]);
$isMenuSteal = false;
$isThreadSteal = true;
$isResSteal = true;
$isProc = true;
if ($isMenuSteal) {
foreach ($menuUrl as $value) {
$ip = useIp(getPDO(), getUseIpMod(getPDO()));
$html = menuSteal(getPDO(), $ip, "menuSteal", $value["menu_url"], $queryList["INSERT_IP_ACCESS"], getUa(getPDO(), $queryList["SELECT_UA"]), "open2ch.net");
$regex = getDiRegex(getPDO(), "menuStealRegex", $value["kind"], $queryList["SELECT_DIREGEX"]);
$menuListArray = menuReArray(menuDataPregMatch($html, $regex));
menuInsert(getPDO(), $menuListArray, $value["kind"], $queryList["INSERT_MENU"]);
}
unset($value);
}
// $menuList = [
开发者ID:pecodrive,项目名称:stealsystem,代码行数:30,代码来源:thread.php
示例18: getResource
<html>
<head>
<title>Sveglie - Leila</title>
<?php
include "functions.php";
getResource();
?>
<link href="res/css/sveglie.css" rel="stylesheet" type="text/css">
<link href="bootstrap-3.3.5-dist/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
<script src="res/js/jquery-2.2.0.min.js"></script>
<script src="bootstrap-3.3.5-dist/js/bootstrap-datetimepicker.min.js"></script>
</head>
<body>
<?php
getMenu();
?>
<div class="main">
<div style="position:relative; height:300px; width:100%; background:#8ce196;">
<article style="position:relative; margin:10 auto; " class="clock">
<div class="hours-container">
<div class="hours"></div>
</div>
<div class="minutes-container">
<div class="minutes"></div>
</div>
<div class="seconds-container">
<div class="seconds"></div>
</div>
</article>
</div>
开发者ID:progettoarp,项目名称:mobile-site,代码行数:31,代码来源:sveglie.php
示例19: M
<button class="btn btn-danger"><i class="ace-icon fa fa-cogs"></i></button>
</div>
</div>
<ul class="nav nav-list">
<?php
use Common\Controller\AuthController;
use Think\Auth;
$auth_rule = M('auth_rule');
$menu = $auth_rule->field("id,name,pid,title,css")->where('status=1')->order('sort')->select();
$auth = new Auth();
foreach ($menu as $k => $v) {
if (!$auth->check($v['name'], $_SESSION['aid']) && $_SESSION['aid'] != 1) {
unset($menu[$k]);
}
}
$menu = getMenu($menu);
?>
<?php
if (is_array($menu)) {
foreach ($menu as $key => $vo) {
?>
<li class="<?php
if (CONTROLLER_NAME == $vo['name']) {
?>
active open<?php
}
?>
">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="menu-icon fa <?php
echo $vo["css"];
开发者ID:LiJiaDongYue,项目名称:adminmanage,代码行数:31,代码来源:b595b808c2ebeeeb0478ffc30bb4e87a.php
示例20: _t
?>
"><i class="icon-pencil"></i> <?php
echo _t('MY_PREFERENCES');
?>
</a></li>
<li><a href="?act=logout"><i class="icon-off"></i> <?php
echo _t('SIGN_OUT');
?>
</a></li>
</ul>
</div>
<ul class="nav" style="float:right">
<?php
$activemenu = "top_right_menu";
$topMenuItems = getMenu($activemenu);
if ($conf[$activemenu]) {
$acMenu = @unserialize($conf[$activemenu]);
if ($acMenu) {
$topMenuItems = $acMenu;
}
}
$menuItems = $topMenuItems;
$level = 0;
foreach ($menuItems as $key => $menu) {
$id = $menu['id'];
$element1 = $menu;
$element2 = $menuItems[$key + 1];
//$level = $element1['level'];
$url = $defaultMenuItems[$menu['slug']]['url'];
$title = $menu['title'];
开发者ID:GeraldScott,项目名称:OpenEvSys,代码行数:31,代码来源:sec_menu.php
注:本文中的getMenu函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论