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


PHP Admin::getLogged方法代码示例

本文整理汇总了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;
开发者ID:robertpop,项目名称:NS,代码行数:31,代码来源:administrators.php

示例2: removeTournament

 /**
  * Removes a tournament.
  *
  * @param string $name
  *
  * @return boolean
  */
 public function removeTournament($name)
 {
     return $this->repo->removeTournament(\Admin::getLogged(), $name);
 }
开发者ID:TiagoMaiaL,项目名称:Tournament-Manager,代码行数:11,代码来源:TournamentsService.php

示例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);
 }
开发者ID:TiagoMaiaL,项目名称:Tournament-Manager,代码行数:12,代码来源:MatchesService.php

示例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');
开发者ID:robertpop,项目名称:NS,代码行数:31,代码来源:index.php

示例5: removeRanking

 /**
  * Removes the specified ranking.
  *
  * @param $rankingID
  *
  * @return boolean
  */
 public function removeRanking($rankingID)
 {
     return $this->repo->removeRanking(\Admin::getLogged(), $rankingID);
 }
开发者ID:TiagoMaiaL,项目名称:Tournament-Manager,代码行数:11,代码来源:RankingsService.php


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