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


PHP Authentication::require_admin方法代码示例

本文整理汇总了PHP中Authentication::require_admin方法的典型用法代码示例。如果您正苦于以下问题:PHP Authentication::require_admin方法的具体用法?PHP Authentication::require_admin怎么用?PHP Authentication::require_admin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Authentication的用法示例。


在下文中一共展示了Authentication::require_admin方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct()
 {
     Authentication::require_admin();
     $this->is_admin_page = true;
     // updates?
     $this->update_judge_status();
 }
开发者ID:jlsa,项目名称:justitia,代码行数:7,代码来源:admin_judge_daemons.php

示例2: __construct

 function __construct()
 {
     // find active entity
     parent::__construct();
     Authentication::require_admin();
     $this->is_admin_page = true;
 }
开发者ID:jlsa,项目名称:justitia,代码行数:7,代码来源:admin_submissions.php

示例3: __construct

 function __construct()
 {
     Authentication::require_admin();
     $this->is_admin_page = true;
     // find active entity
     parent::__construct();
     // debugging
     $this->debug = false;
 }
开发者ID:jlsa,项目名称:justitia,代码行数:9,代码来源:admin_results.php

示例4: __construct

 function __construct()
 {
     Authentication::require_admin();
     $this->is_admin_page = true;
     parent::__construct();
     // print?
     if (isset($_REQUEST['filled'])) {
         $this->write_print();
         exit;
     }
 }
开发者ID:jlsa,项目名称:justitia,代码行数:11,代码来源:admin_print.php

示例5: __construct

 function __construct()
 {
     Authentication::require_admin();
     $this->is_admin_page = true;
     // find active entity
     parent::__construct();
     // find user
     if (!isset($_REQUEST['userid'])) {
         throw new NotFoundException("Missing parameter: userid");
     }
     $this->user = User::by_id(intval($_REQUEST['userid']));
 }
开发者ID:jlsa,项目名称:justitia,代码行数:12,代码来源:admin_user_submission.php

示例6: __construct

 function __construct()
 {
     Authentication::require_admin();
     $this->is_admin_page = true;
     // find submission
     if (!isset($_REQUEST['submissionid'])) {
         throw new NotFoundException("Missing parameter: submissionid");
     }
     $this->subm = Submission::by_id(intval($_REQUEST['submissionid']));
     $this->entity = $this->subm->entity();
     // rejudge?
     if (isset($_REQUEST['rejudge'])) {
         $this->subm->rejudge();
         // redirect to this page, so a refresh doesn't rejudge again
         Util::redirect('admin_view_submission.php?submissionid=' . $_REQUEST['submissionid']);
     }
     // delete?
     if (isset($_REQUEST['delete'], $_POST['confirm']) && $_POST['confirm'] == sha1('confirmed' . $this->subm->submissionid)) {
         $this->subm->delete();
         Util::redirect('index.php' . $this->entity->path());
     }
 }
开发者ID:jlsa,项目名称:justitia,代码行数:22,代码来源:admin_view_submission.php

示例7: __construct

 function __construct()
 {
     Authentication::require_admin();
     $this->is_admin_page = true;
 }
开发者ID:jlsa,项目名称:justitia,代码行数:5,代码来源:admin_view_log.php

示例8: Page

<?php

require_once 'lib/bootstrap.inc';
Authentication::require_admin();
// Show a list of all comments
$p = new Page('');
$p->title = "Re spam filter";
$p->body = '';
if (isset($_POST['confirm'])) {
    // Delete/hide spam
    $total_change = 0;
    foreach (Resolver::find_all_pages('blog') as $page) {
        $comments = Comments::get_all($page->url, true);
        $change = false;
        foreach ($comments as $comment) {
            if ($comment->is_spam() && $comment->visible) {
                $comment->visible = false;
                $change = true;
                $total_change++;
            }
        }
        Comments::set_all($page->url, $comments);
    }
    $p->body .= "Hidden {$total_change} comments";
}
$num_new_spam = 0;
$p->body .= '<table class="spam">';
foreach (Resolver::find_all_pages('blog') as $page) {
    $comments = Comments::get_all($page->url, true);
    $com_body = array();
    foreach ($comments as $comment) {
开发者ID:rmoorman,项目名称:twanvl-nl,代码行数:31,代码来源:delete-spam.php


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