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


PHP dcPage::check方法代码示例

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


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

示例1: Copyright

<?php

# -- BEGIN LICENSE BLOCK ---------------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK -----------------------------------------
require dirname(__FILE__) . '/../inc/admin/prepend.php';
dcPage::check('usage,contentadmin');
if (!empty($_POST['delete_all_spam'])) {
    try {
        $core->blog->delJunkComments();
        $_SESSION['comments_del_spam'] = true;
        $core->adminurl->redirect("admin.comments");
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
# Creating filter combo boxes
# Filter form we'll put in html_block
$status_combo = array_merge(array('-' => ''), dcAdminCombos::getCommentStatusescombo());
$type_combo = array('-' => '', __('Comment') => 'co', __('Trackback') => 'tb');
$sortby_combo = array(__('Date') => 'comment_dt', __('Entry title') => 'post_title', __('Author') => 'comment_author', __('Status') => 'comment_status');
$order_combo = array(__('Descending') => 'desc', __('Ascending') => 'asc');
/* Get comments
-------------------------------------------------------- */
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:comments.php

示例2: Copyright

# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2009 Olivier Meunier and contributors
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
$standalone = !isset($edit_blog_mode);
$blog_id = false;
if ($standalone) {
    require dirname(__FILE__) . '/../inc/admin/prepend.php';
    dcPage::check('admin');
    $blog_id = $core->blog->id;
    $blog_url = $core->blog->url;
    $blog_status = $core->blog->status;
    $blog_name = $core->blog->name;
    $blog_desc = $core->blog->desc;
    $blog_settings = $core->blog->settings;
    $action = 'blog_pref.php';
    $redir = 'blog_pref.php?upd=1';
} else {
    dcPage::checkSuper();
    try {
        if (empty($_REQUEST['id'])) {
            throw new Exception(__('No given blog id.'));
        }
        $rs = $core->getBlog($_REQUEST['id']);
开发者ID:HackerMajor,项目名称:root,代码行数:30,代码来源:blog_pref.php

示例3: Copyright

<?php

# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2009 Olivier Meunier and contributors
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
require dirname(__FILE__) . '/../inc/admin/prepend.php';
dcPage::check('categories');
# Remove a category
if (!empty($_POST['del_cat'])) {
    try {
        $c = $core->blog->getCategory((int) $_POST['del_cat']);
        if ($c->isEmpty()) {
            throw new Exception(__('This category does not exist.'));
        }
        unset($c);
        $core->blog->delCategory($_POST['del_cat']);
        http::redirect('categories.php?del=1');
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
    }
}
# Reset order
if (!empty($_POST['reset'])) {
    try {
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:categories.php

示例4: Copyright

<?php

# -- BEGIN LICENSE BLOCK ---------------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK -----------------------------------------
require dirname(__FILE__) . '/../inc/admin/prepend.php';
dcPage::check('usage');
function helpPage()
{
    $ret = array('content' => '', 'title' => '');
    $args = func_get_args();
    if (empty($args)) {
        return $ret;
    }
    global $__resources;
    if (empty($__resources['help'])) {
        return $ret;
    }
    $content = '';
    $title = '';
    foreach ($args as $v) {
        if (is_object($v) && isset($v->content)) {
            $content .= $v->content;
            continue;
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:help.php

示例5: Copyright

<?php

# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2009 Olivier Meunier and contributors
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
if (!defined('DC_CONTEXT_ADMIN')) {
    return;
}
dcPage::check('pages,contentadmin');
/* Pager class
-------------------------------------------------------- */
class adminPageList extends adminGenericList
{
    public function display($page, $nb_per_page, $enclose_block = '')
    {
        if ($this->rs->isEmpty()) {
            echo '<p><strong>' . __('No page') . '</strong></p>';
        } else {
            $pager = new pager($page, $this->rs_count, $nb_per_page, 10);
            $pager->html_prev = $this->html_prev;
            $pager->html_next = $this->html_next;
            $pager->var_page = 'page';
            $html_block = '<table class="clear"><tr>' . '<th colspan="2">' . __('Title') . '</th>' . '<th>' . __('Date') . '</th>' . '<th>' . __('Author') . '</th>' . '<th>' . __('Comments') . '</th>' . '<th>' . __('Trackbacks') . '</th>' . '<th>' . __('Status') . '</th>' . '</tr>%s</table>';
            if ($enclose_block) {
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:list.php

示例6: Copyright

<?php

# -- BEGIN LICENSE BLOCK ---------------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK -----------------------------------------
require dirname(__FILE__) . '/../inc/admin/prepend.php';
dcPage::check('media,media_admin');
$tab = empty($_REQUEST['tab']) ? '' : $_REQUEST['tab'];
$post_id = !empty($_REQUEST['post_id']) ? (int) $_REQUEST['post_id'] : null;
if ($post_id) {
    $post = $core->blog->getPosts(array('post_id' => $post_id));
    if ($post->isEmpty()) {
        $post_id = null;
    }
    $post_title = $post->post_title;
    unset($post);
}
$file = null;
$popup = (int) (!empty($_REQUEST['popup']));
$select = !empty($_REQUEST['select']) ? (int) $_REQUEST['select'] : 0;
// 0 : none, 1 : single media, >1 : multiple medias
$plugin_id = isset($_REQUEST['plugin_id']) ? html::sanitizeURL($_REQUEST['plugin_id']) : '';
$page_url_params = array('popup' => $popup, 'select' => $select, 'post_id' => $post_id);
$media_page_url_params = array('popup' => $popup, 'select' => $select, 'post_id' => $post_id);
开发者ID:nikrou,项目名称:dotclear,代码行数:31,代码来源:media_item.php


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