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


PHP check_articleperm函数代码示例

本文整理汇总了PHP中check_articleperm函数的典型用法代码示例。如果您正苦于以下问题:PHP check_articleperm函数的具体用法?PHP check_articleperm怎么用?PHP check_articleperm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: array

                C::t('portal_article_title')->update($aids, array('catid' => $catid));
                showmessage('article_move_success', dreferer("portal.php?mod=portalcp&ac=category&catid={$catid}"));
            } else {
                showmessage('article_move_select_cat', dreferer());
            }
        }
    }
} elseif ($op == 'verify') {
    if ($aid) {
        check_articleperm($article['catid'], $aid, $article);
    } else {
        showmessage('article_not_exist', dreferer());
    }
} elseif ($op == 'pushplus') {
    if ($aid) {
        check_articleperm($article['catid'], $aid, $article);
    } else {
        showmessage('no_article_specified_for_pushplus', dreferer());
    }
    $pids = (array) $_POST['topiclist'];
    $tid = intval($_GET['tid']);
    $pushedids = array();
    $pushcount = $pushedcount = 0;
    if (!empty($pids)) {
        foreach (C::t('portal_article_content')->fetch_all($aid) as $value) {
            $pushedids[] = intval($value['id']);
            $pushedcount++;
        }
        $pids = array_diff($pids, $pushedids);
    }
    $pushcount = count($pids);
开发者ID:renning,项目名称:html,代码行数:31,代码来源:portalcp_article.php

示例2: exit

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: portalcp_related.php 12343 2010-07-05 08:56:47Z shanzongjun $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$op = in_array($_GET['op'], array('manual', 'search', 'add', 'get')) ? $_GET['op'] : '';
$aid = intval($_G['gp_aid']);
$catid = intval($_G['gp_catid']);
if ($aid) {
    check_articleperm($catid, $aid);
} else {
    check_articleperm($catid);
}
$wherearr = $articlelist = $relatedarr = array();
if ($op == 'manual') {
    $manualid = intval($_GET['manualid']);
    $ra = array();
    if ($manualid) {
        $query = DB::query("SELECT * FROM " . DB::table('portal_article_title') . " WHERE aid='{$manualid}'");
        $ra = DB::fetch($query);
    }
} elseif ($op == 'get') {
    $id = trim($_GET['id']);
    $getidarr = explode(',', $id);
    $getidarr = array_map('intval', $getidarr);
    $getidarr = array_unique($getidarr);
    $getidarr = array_filter($getidarr);
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:portalcp_related.php

示例3: discuz_upload

}
$operation = $_GET['op'] ? $_GET['op'] : '';
$upload = new discuz_upload();
$downremotefile = false;
$aid = intval(getgpc('aid'));
$catid = intval(getgpc('catid'));
if ($aid) {
    $article = C::t('portal_article_title')->fetch($aid);
    if (!$article) {
        portal_upload_error(lang('portalcp', 'article_noexist'));
    }
    if (check_articleperm($catid, $aid, $article, false, true) !== true) {
        portal_upload_error(lang('portalcp', 'article_noallowed'));
    }
} else {
    if (($return = check_articleperm($catid, $aid, null, false, true)) !== true) {
        portal_upload_error(lang('portalcp', $return));
    }
}
if ($operation == 'downremotefile') {
    $arrayimageurl = $temp = $imagereplace = array();
    $string = $_GET['content'];
    $downremotefile = true;
    preg_match_all("/\\<img.+src=('|\"|)?(.*)(\\1)([\\s].*)?\\>/ismUe", $string, $temp, PREG_SET_ORDER);
    if (is_array($temp) && !empty($temp)) {
        foreach ($temp as $tempvalue) {
            $tempvalue[2] = str_replace('\\"', '', $tempvalue[2]);
            if (strlen($tempvalue[2])) {
                $arrayimageurl[] = $tempvalue[2];
            }
        }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:portalcp_upload.php

示例4: elseif

} elseif ($_GET['operation'] == 'portal') {
    $aid = intval($_POST['aid']);
    $catid = intval($_POST['catid']);
    $msg = '';
    $errorcode = 0;
    require_once libfile('function/portalcp');
    if ($aid) {
        $article = C::t('portal_article_title')->fetch($aid);
        if (!$article) {
            $errorcode = 1;
        }
        if (check_articleperm($catid, $aid, $article, false, true) !== true) {
            $errorcode = 2;
        }
    } else {
        if (check_articleperm($catid, $aid, null, false, true) !== true) {
            $errorcode = 3;
        }
    }
    $upload = new discuz_upload();
    $_FILES["Filedata"]['name'] = addslashes(diconv(urldecode($_FILES["Filedata"]['name']), 'UTF-8'));
    $upload->init($_FILES['Filedata'], 'portal');
    $attach = $upload->attach;
    if (!$upload->error()) {
        $upload->save();
    }
    if ($upload->error()) {
        $errorcode = 4;
    }
    if (!$errorcode) {
        if ($attach['isimage'] && empty($_G['setting']['portalarticleimgthumbclosed'])) {
开发者ID:renning,项目名称:html,代码行数:31,代码来源:misc_swfupload.php

示例5: IN

        $query = DB::query('SELECT id FROM ' . DB::table('portal_article_content') . " WHERE aid='{$aid}' AND id IN (" . dimplode($pids) . ")");
        while ($value = DB::fetch($query)) {
            $pushedids[] = intval($value['id']);
            $pushedcount++;
        }
        $pids = array_diff($pids, $pushedids);
    }
    $pushcount = count($pids);
    if (empty($pids)) {
        showmessage($pushedids ? 'all_posts_pushed_already' : 'no_posts_for_pushplus');
    }
} else {
    if ($aid) {
        $catid = intval($article['catid']);
    }
    check_articleperm($catid, $aid, $article);
    $page = empty($_GET['page']) ? 1 : intval($_GET['page']);
    if ($page < 1) {
        $page = 1;
    }
    $start = $page - 1;
    $pageselect = '';
    $category = $_G['cache']['portalcategory'];
    $cate = $category[$catid];
    if ($article) {
        if ($op == 'addpage') {
            $article_content = array();
        } else {
            $query = DB::query("SELECT * FROM " . DB::table('portal_article_content') . " WHERE aid='{$aid}' ORDER BY pageorder LIMIT {$start},1");
            $article_content = DB::fetch($query);
        }
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:portalcp_article.php


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