本文整理汇总了PHP中Admin::getLogged方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::getLogged方法的具体用法?PHP Admin::getLogged怎么用?PHP Admin::getLogged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::getLogged方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: md5
case 'add':
case 'edit':
if ($config->isPOST()) {
$adm->email = $_POST['email'];
if (!empty($_POST['password']) && $_POST['password'] == $_POST['password2']) {
$adm->password = md5($_POST['password']);
} else {
Messages::addError('Password not changed');
}
$adm->access = isset($_POST['access']) ? array_sum($_POST['access']) : 0;
if (empty($adm->id) && empty($adm->password)) {
Messages::addError('Password can\'t be empty');
jump('?page=administrators&action=add');
} else {
$adm->save();
if ($adm->id == Admin::getLogged()->id) {
Admin::setLoggedUser($adm);
}
Messages::addNotice('Saved');
jump('?page=administrators&action=edit&id=' . $adm->id);
}
}
$smarty->assign('accessData', Admin::getAccessData());
$smarty->assign('adm', $adm);
$smarty->assign('CONTENT', 'administrators/add_edit.tpl');
break;
case 'remove':
$adm->delete();
Messages::addNotice('Deleted');
jump('?page=administrators');
break;
示例2: removeTournament
/**
* Removes a tournament.
*
* @param string $name
*
* @return boolean
*/
public function removeTournament($name)
{
return $this->repo->removeTournament(\Admin::getLogged(), $name);
}
示例3: removeMatch
/**
* Removes an existing match from the specified
* Tournament.
*
* @param int $matchID
*
* @return boolean
*/
public function removeMatch($matchID)
{
return $this->repo->removeMatch(\Admin::getLogged(), $matchID);
}
示例4: empty
<?php
#init:
include "../init.php";
#smarty:
$smarty = Application::getSmarty('/admin/templates/', '/admin/templates_c/');
$page = empty($_GET['page']) ? 'home' : $_GET['page'];
$action = empty($_GET['action']) ? 'index' : $_GET['action'];
session_start();
$smarty->assign('SESSION_ID', session_id());
if (Admin::isLogged()) {
Admin::checkPageAccess($page);
$smarty->assign('ADMIN', Admin::getLogged());
} else {
$page = 'login';
}
$controller = $config->absolute_path . '/admin/pages/' . $page . '.php';
$template = $config->absolute_path . '/admin/templates/' . $page . '.tpl';
if (file_exists($controller)) {
require_once $controller;
$content_var = $smarty->get_template_vars('CONTENT');
if (empty($content_var)) {
$content_var = $page . '.tpl';
}
} else {
if (file_exists($template)) {
$content_var = $page . '.tpl';
} else {
header("HTTP/1.1 404 Not Found");
$smarty->assign('ERROR', 'The page you are trying to access does not exists.');
$smarty->assign('ERROR_TITLE', 'Page not found');
示例5: removeRanking
/**
* Removes the specified ranking.
*
* @param $rankingID
*
* @return boolean
*/
public function removeRanking($rankingID)
{
return $this->repo->removeRanking(\Admin::getLogged(), $rankingID);
}