本文整理匯總了PHP中Renderer::setNav方法的典型用法代碼示例。如果您正苦於以下問題:PHP Renderer::setNav方法的具體用法?PHP Renderer::setNav怎麽用?PHP Renderer::setNav使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Renderer
的用法示例。
在下文中一共展示了Renderer::setNav方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: User
<?php
include_once 'lib/config.php';
include_once 'lib/Renderer.php';
include_once 'classes/User.php';
include_once 'classes/Files.php';
include_once 'classes/Shares.php';
$user = new User();
$renderer = new Renderer('layouts/overall.tpl');
$path = isset($_GET['path']) ? $_GET['path'] : false;
$mod = isset($_GET['mod']) ? $_GET['mod'] : false;
$token = isset($_POST['token']) ? $_POST['token'] : false;
$hasUser = $user->loadCurrent();
if ($path) {
if ($hasUser) {
$renderer->setNav('nav/dashboard.tpl');
switch ($path) {
case 'account':
$files = new Files();
$files->getBy(array('_user_id' => $user->getAttribute('user_id')));
$id = isset($_POST['id']) ? $_POST['id'] : false;
$password1 = isset($_POST['password1']) ? $_POST['password1'] : false;
$password2 = isset($_POST['password2']) ? $_POST['password2'] : false;
$passwordError = false;
$passwordMessage = false;
$deleteError = false;
if ($mod && $mod === 'update') {
if ($password1 === $password2 && $token === $_SESSION['token']) {
$user->setPassword($password1);
if ($user->save()) {
$passwordMessage = "Your password has been changed";