当前位置: 首页>>代码示例>>PHP>>正文


PHP getMenu函数代码示例

本文整理汇总了PHP中getMenu函数的典型用法代码示例。如果您正苦于以下问题:PHP getMenu函数的具体用法?PHP getMenu怎么用?PHP getMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getMenu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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']) ? ' &nbsp;<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, "&nbsp;»&nbsp;");
//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


注:本文中的getMenu函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。