本文整理匯總了PHP中Menu函數的典型用法代碼示例。如果您正苦於以下問題:PHP Menu函數的具體用法?PHP Menu怎麽用?PHP Menu使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Menu函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: WhoIsFaster
function WhoIsFaster($wiedzmin, $potwor)
{
if ($wiedzmin->getSpeed() >= $potwor->getSpeed()) {
//jeśli wiedźmin jest szybszy od potwora
$wiedzmin->setPunktyAkcji((int) ($wiedzmin->getSpeed() / $potwor->getSpeed()));
//przypisuje ilość punktów akcji (parsowanie na int (liczby całkowite))
$potwor->setPunktyAkcji(1);
//potwór dostaje jeden punkt akcji
Menu($wiedzmin, $potwor);
//wywołanie funkcji menu
if ($potwor->getHP() > 0) {
//sprawdza,czy potwór nie zginął
AtakPotwora($wiedzmin, $potwor);
}
//wywołanie funkcji AtakPotwora
} else {
if ($potwor->getSpeed() > $wiedzmin->getSpeed()) {
$potwor->setPunktyAkcji((int) ($potwor->getSpeed() / $wiedzmin->getSpeed()));
$wiedzmin->setPunktyAkcji(1);
echo PHP_EOL, 'Atakuje Potwor z ' . $potwor->getPunktyAkcji() . ' pkt akcji!', PHP_EOL;
AtakPotwora($wiedzmin, $potwor);
if ($wiedzmin->getHP() > 0) {
Menu($wiedzmin, $potwor);
} else {
echo PHP_EOL, PHP_EOL, 'Niestety, potwor Cie zalatwil!', PHP_EOL;
}
}
}
}
示例2: ActiveMenuText
function ActiveMenuText()
{
foreach (Menu() as $item) {
if ($item['active'] != '') {
return $item['text'];
}
}
}
示例3: Menu
function Menu($pid)
{
include_once 'Model/category.php';
$ctg = new Category();
$v = $ctg->SelectMenu($pid);
if ($v != null) {
print '<ul class="dropdown-menu">';
foreach ($v as $s) {
print '<li><a href="' . baseurl . 'News/Category/' . $s->Id . '">' . $s->Name . '</a>';
Menu($s->Id);
print '</li>';
}
print '</ul>';
}
}
示例4: Entete
<!DOCTYPE html>
<html lang="fr">
<?php
Entete();
?>
<?php
Menu(1);
?>
示例5: starteach
Stranica je još u izdradi, te su moguće poteškoće sa radom.
</div>
-->
<div class="outer-wrapper">
<div class="wrapper">
<div class="navbar-left">
<div class="brand">
<img height="80" style="position: relative; top: -10px;" src="/images/logo.png" alt="Hrvatska Sveučilišna Naklada" />
<small style="text-shadow: 0 0 5px #15150f">Hrvatska sveučilišna naklada</small>
</div>
<h3>Izbornik</h3>
<ul class="nav nav-pills nav-stacked">
<?php
starteach(Menu());
?>
<li{{3}}><a href="{{2}}">{{0}}</a></li>
<?php
endeach();
?>
</ul>
<footer>
<small>© Bojan Došen, 2015.</small>
</footer>
</div>
<div class="navbar-categories">
<h3>Kategorije</h3>
<ul class="nav nav-pills nav-stacked">
示例6: Menu
<?php
include "../funciones/comun.php";
include "../funciones/funciones.php";
Menu("busquedas", $srva);
?>
<!--cerrar cssmenu-->
</div>
<!--cerrar cabecera-->
</div>
<!--cerar comun-->
<div style="text-align:center">
<img src='../images/buscar.jpg' width='10%' height='40%'>
</div>
<br><br><br>
<form action="FORMULASBUSQUEDAS.php" method="post" accept-charset="utf-8" class="form-group">
<div class="row FormurarioIndex">
<div class=" col-md-3">Cliente<br>
<input id="tags" name="N_CLIENTE"/ class="form-control mayusculas">
</div>
<div class=" col-md-2">Fecha inicial<br>
<input type="date" name="FECHA1" class='form-control' value="<?php
echo date('Y-m-d');
?>
" />
</div>
示例7: Menu
<div id="art-hmenu-bg" class="art-bar art-nav">
</div>
<header class="art-header">
<div id="art-shapes">
</div>
<h1 class="art-headline" data-left="22.92%">
Sistema de ficha clínica
</h1>
</header>
<div class="art-sheet clearfix">
<nav class="art-nav">
<div class="art-nav-inner">
<?php
include "roles/" . Menu($_SESSION["rol"]) . "/menu.php";
?>
</div>
</nav>
<div class="art-layout-wrapper">
<div class="art-content-layout">
<?php
include $form;
?>
<footer class="art-footer">
<div class="art-footer-inner">
<p>Desarrollado por Metalicox </p>
<p class="art-page-footer">
<span id="art-footnote-links"></span>
</p>
</div>
示例8: Menu
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="<?php
echo ESTATICO;
?>
html5shiv.js"></script>
<script src="<?php
echo ESTATICO;
?>
respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php
Menu();
?>
<div class="container">
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-8 col-md-7 col-sm-6">
<h1><?php
echo TITULO;
?>
</h1>
<p class="lead">Cliente: <?php
echo $clientes['nombre'] . ' ' . $clientes['apellido1'] . ' ' . $clientes['apellido2'];
?>
</p>
</div>
示例9: Menu
<li class="active"><a href="cad_categorias.php">Cadastrar Categorias</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Noticias<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="cad_noticias.php">Cadastrar</a></li>
<li><a href="cons_noticias.php">Consultar</a></li>
</ul>
</li>
<li><a href="cad_usuarios.php">Cadastrar Usuários</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
<?php
Menu("Cadastro de Categorias");
$nome_categoria = $_POST['nome_categoria'];
$sql = "INSERT INTO Categ (nome_categoria) VALUES ('{$nome_categoria}')";
if ($conn->query($sql) === TRUE) {
?>
<div class="alert alert-success fade in">
<a href="./cad_categorias.php" class="close" data-dismiss="alert" aria-label="close">×</a>
<center>
<strong>Categoria cadastrada com Sucesso!</strong>
</center>
</div>
<?php
} else {
?>
<div class="alert alert-danger fade in">
<a href="./cad_categorias.php" class="close" data-dismiss="alert" aria-label="close">×</a>
示例10: Menu
<tr>
<td >
<div class='banner'>
Defs
<Div class='Eslogan'>
Product Standar CRM
</div>
</div>
</td>
</tr>
<tr>
<td bgcolor='#660000'>
<?php
echo Menu("jj");
?>
</td>
</tr>
<tr>
<td >
<div CLASS='CuadroTitulo'>
Seccion |
<?php
if (isset($_GET["lugar"]) != "") {
$stado = $_GET["lugar"];
echo $stado;
}
?>
</div>
示例11: Body
function Body()
{
$dr = $GLOBALS['dr'];
$wb = $GLOBALS['wb'];
global $mi;
/* PUT THE MODULE ID IN THE GLOBAL CONTEXT */
$c = "<table align='center' width='780' cellpadding='0' cellspacing='0' border='0' class='plain'>\n";
$c .= "<tr>\n";
$c .= "<td width='20' bgcolor='#3399CC'><img src='" . $wb . "images/curves/top_left.gif' width='20' height='42'></td>\n";
//$c.="<td width='740' bgcolor='#66CC33'><a href='index.php'></a></td>\n";
$c .= "<td width='740' bgcolor='#66CC33'><a href='index.php'>" . $GLOBALS['site_logo'] . "</a></td>\n";
$c .= "<td width='20' bgcolor='#3399CC'><img src='" . $wb . "images/curves/top_right.gif' width='20' height='42'></td>\n";
$c .= "</tr>\n";
$c .= "<tr>\n";
$c .= "<td bgcolor='#99CCFF' colspan='3'>\n";
if (isset($_SESSION['user_id'])) {
require_once $dr . "include/functions/design/login_bar.php";
$c .= LoginBar();
} else {
require_once $dr . "include/functions/design/logout_bar.php";
$c .= LogoutBar();
}
$c .= "</td>\n";
$c .= "</tr>\n";
/* NOT LOGGED IN AND NO MODULE IN QUERYSTRING */
if (!isset($_SESSION['user_id']) && !isset($_GET['module'])) {
require_once $dr . "modules/core/functions/forms/login_form.php";
$c .= "<tr bgcolor='#ffffff' align='center'>\n";
$c .= "<td colspan='3'>\n";
if (isset($_COOKIE['mvh_username'])) {
$c .= LoginFormCookie();
} else {
$c .= LoginForm();
}
$c .= "</td>\n";
$c .= "</tr>\n";
} elseif (isset($_SESSION['user_id']) && !isset($_GET['module']) && isset($GLOBALS['ui']) && isset($GLOBALS['wui'])) {
/* PROCESS THE ACTIVATION AND DEACTIVATION OF MODULES IN THE WORKSPACE HERE AS WE NEED UI TO BE SET */
if (isset($_GET['wtask']) && $_GET['wtask'] == "install_workspace_user_module") {
require_once $dr . "modules/workspace/classes/add_remove_user_workspace_module.php";
$aruwm = new AddRemoveUserWorkspaceModule();
$aruwm->SetParameters($_GET['module_id']);
$result = $aruwm->AddRemove();
//if (!$result) { echo Alert("3",$at->ShowErrors()); }
}
/* ACTIVATE THE TEAMSPACE MODULES */
if (isset($_GET['wtask']) && $_GET['wtask'] == "install_teamspace_user_module") {
require_once $dr . "modules/teamspace/classes/add_remove_user_teamspace_module.php";
$arutm = new AddRemoveUserTeamspaceModule();
$arutm->SetParameters($_GET['module_id']);
$result = $arutm->AddRemove();
//if (!$result) { echo Alert("3",$at->ShowErrors()); }
}
/* INCLUDE THE MAIN FILES FOR THE WORKSPACE */
require_once $dr . "modules/workspace/functions/browse/non_enterprise_workspace_modules.php";
require_once $dr . "include/functions/design/teamspace_slider.php";
require_once $dr . "include/functions/teamspace/user_teamspaces.php";
/* TODO: CHANGE THIS TO THE WORKSPACE FOLDER */
//require_once($dr."modules/teamspace/functions/browse/user_available_modules.php");
require_once $dr . "modules/teamspace/classes/user_available_modules.php";
//
$c .= "<tr>\n";
$c .= "<td colspan='3'>\n";
$c .= "<table cellspacing='0'>\n";
$c .= "<tr>\n";
if (IS_NUMERIC($GLOBALS['teamspace_id'])) {
$c .= "<td width='150' valign='top'>" . UserAvailableModules() . "</td>\n";
} else {
$obj_uam = new UserAvailableModules();
if ($obj_uam->CountUserAvailableModules() > 0) {
$c .= "<td width='150' valign='top'>" . TeamspaceSliderItems() . "</td>\n";
}
}
$c .= "<td width='630'>" . CurveBox(NonEnterpriseModules($GLOBALS['ui']->WorkspaceID(), $_SESSION['user_id'], $GLOBALS['wui']->RoleID(), True)) . "</td>\n";
$c .= "<td width='150' valign='top'>" . UserTeamspaces() . "</td>\n";
$c .= "</tr>\n";
$c .= "</table>\n";
$c .= "</td>\n";
$c .= "</tr>\n";
} elseif (isset($_SESSION['user_id']) && !isset($_GET['module']) && empty($workspace_id)) {
require_once $dr . "modules/workspace/functions/browse/select_workspace.php";
require_once $dr . "modules/workspace/functions/misc/menu.php";
$c .= "<tr>\n";
$c .= "<td colspan='3'>\n";
$c .= "<table cellspacing='0' class='plain_border'>\n";
$c .= "<tr>\n";
$c .= "<td>" . SelectWorkspace() . "</td>\n";
if ($GLOBALS['ui']->GetInfo("default_role") != "y") {
$c .= "<td width='150' valign='top'>" . Menu() . "</td>\n";
}
$c .= "</tr>\n";
$c .= "</table>\n";
$c .= "</td>\n";
$c .= "</tr>\n";
//$c.=CurveBox(SelectWorkspace());
} elseif (isset($_GET['module']) && file_exists($dr . "modules/" . $_GET['module'] . ".php")) {
$module_id = GetColumnValue("module_id", "core_module_master", "name", $_GET['module']);
require_once $dr . "modules/" . $_GET['module'] . ".php";
require_once $dr . "classes/modules/module_id.php";
$mi = new ModuleID();
//.........這裏部分代碼省略.........
示例12: Menu
</br>
<%= 'Rol:'.$_SESSION['id_perfil']%></br>
<%= 'Menu:'. Menu($_SESSION['id_perfil'])%></br>
</div>
</div>
<div class="art-shapes">
</div>
<h1 class="art-headline" data-left="22.92%">
<p id="sistema">SOFTMÉDICA<p>
</h1>
</header>
<nav class="art-nav desktop-nav">
<ul class="art-hmenu" id="menucito">
<?php
$rol = Menu($_SESSION["id_perfil"]);
include RAIZ_PHP . "/roles/" . $rol . "/menu.php";
//ChromePhp::log($_SESSION["id_perfil"]);
//ChromePhp::log($rol);
// if($rol!="anonimo"){
// include RAIZ_PHP . "/roles/todos/menu.php";
// }
?>
</ul>
</nav>
<div class="art-layout-wrapper">
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell art-content">
<article class="art-post art-article">
<div class="art-postcontent art-postcontent-0 clearfix">
示例13: Menu
<?php
include("../funciones/comun.php");
include("../funciones/funciones.php");
Menu("clientes",$srva);
?>
<!--cerrar cssmenu-->
</div>
<!--cerrar cabecera-->
</div>
<!--cerar comun-->
<?php #variables en blanco
$con="";
$nom="";
$tel="";
$cal="";
$mai="";
$mostrar_infe = false;
?>
<?php #CONEXION Y CONDICIONES
if( isset($_GET['as']))
{
$as1=$_GET['as'];
if($as1 === "activ"){$mostrar_infe = true;}
}else{
$as1="1";}
示例14: Menu
<li><a href="cad_categorias.php">Cadastrar Categorias</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Noticias<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="cad_noticias.php">Cadastrar</a></li>
<li><a href="cons_noticias.php">Consultar</a></li>
</ul>
</li>
<li class="active"><a href="cad_usuarios.php">Cadastrar Usuários</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
<?php
Menu("Cadastro de Usuários");
$nome = $_POST['nome'];
$user = $_POST['user'];
$senha = $_POST['pwd'];
$cargo = $_POST['cargo'];
$sql = "INSERT INTO Usuario (nome, login, senha,cargo,status) VALUES ('{$nome}', '{$user}', '{$senha}','{$cargo}','Ativo')";
if ($conn->query($sql) === TRUE) {
?>
<div class="alert alert-success fade in">
<a href="./cad_usuarios.php" class="close" data-dismiss="alert" aria-label="close">×</a>
<center>
<strong>Usuario cadastrado com Sucesso!</strong>
</center>
</div>
<?php
} else {
示例15: Inicio
if (isset($_SESSION["Logado"])) {
if ($_SESSION["Logado"] == "Sim") {
Inicio();
?>
<div>
<ul class="nav navbar-nav">
<li><a href="index.html">Início</a></li>
<li><a href="cad_categorias.php">Cadastrar Categorias</a></li>
<li class="active"><a href="cad_noticias.php">Cadastrar Notícias</a></li>
<li><a href="cad_usuarios.php">Cadastrar Usuários</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
<?php
Menu("Cadastro de Noticia");
$titulo = $_POST['titulo'];
$categoria = $_POST['categoria'];
$corpo = $_POST['corpo'];
echo "[{$corpo}]";
$caminho = "noticias_img/";
$login = $_SESSION["Nome"];
//Upload de arquivos
// verifica se foi enviado um arquivo
if (isset($_FILES['arquivo']['name']) && $_FILES["arquivo"]["error"] == 0) {
$arquivo_tmp = $_FILES['arquivo']['tmp_name'];
$nome = $_FILES['arquivo']['name'];
// Pega a extensao
$extensao = strrchr($nome, '.');
// Converte a extensao para mimusculo
$extensao = strtolower($extensao);