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


PHP checkmagicperm函数代码示例

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


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

示例1: _check

 function _check($thread)
 {
     if (!checkmagicperm($this->parameters['forum'], $thread['fid'])) {
         showmessage(lang('magic/sofa', 'sofa_info_noperm'));
     }
     $member = getuserbyuid($thread['authorid']);
     if (!checkmagicperm($this->parameters['targetgroups'], $member['groupid'])) {
         showmessage(lang('magic/sofa', 'sofa_info_user_noperm'));
     }
 }
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:10,代码来源:magic_sofa.php

示例2: _check

 function _check($fid)
 {
     if (!checkmagicperm($this->parameters['forum'], $fid)) {
         showmessage(lang('magic/jack', 'jack_info_noperm'));
     }
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:6,代码来源:magic_jack.php

示例3: exit

/*
	[Discuz!] (C)2001-2009 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: magic_move.inc.php 16688 2008-11-14 06:41:07Z cnteacher $
*/
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (submitcheck('usesubmit')) {
    if (empty($tid) && empty($moveto)) {
        showmessage('magics_info_nonexistence');
    }
    $thread = getpostinfo($tid, 'tid', array('fid', 'tid', 'authorid', 'special'));
    checkmagicperm($magicperm['forum'], $thread['fid']);
    if ($thread['authorid'] != $discuz_uid) {
        showmessage('magics_operation_nopermission');
    }
    if ($thread['special']) {
        $query = $db->query("SELECT allowpostspecial FROM {$tablepre}forums WHERE fid='{$moveto}'");
        if (!substr(sprintf('%04b', $forum['allowpostspecial']), -$thread['special'], 1)) {
            showmessage('admin_move_nopermission');
        }
    }
    $query = $db->query("SELECT postperm FROM {$tablepre}forumfields WHERE fid='{$moveto}'");
    if ($forum = $db->fetch_array($query)) {
        if (!$forum['postperm'] && !$allowpost) {
            showmessage('group_nopermission');
        } elseif ($forum['postperm'] && !forumperm($forum['postperm'])) {
            showmessage('post_forum_newthread_nopermission');
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:30,代码来源:magic_move.inc.php

示例4: exit

/*
	[Discuz!] (C)2001-2009 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: magic_del.inc.php 19960 2009-09-15 23:18:37Z wangjinbo $
*/
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (submitcheck('usesubmit')) {
    if (empty($pid)) {
        showmessage('magics_info_nonexistence');
    }
    $post = getpostinfo($pid, 'pid', array('t.tid', 't.fid', 't.authorid', 'first'));
    checkmagicperm($magicperm['forum'], $post['fid']);
    if ($post['authorid'] != $discuz_uid) {
        showmessage('magics_operation_nopermission');
    }
    require_once DISCUZ_ROOT . './include/post.func.php';
    if ($post['first']) {
        foreach (array('threads', 'threadsmod', 'relatedthreads', 'posts', 'polls', 'polloptions', 'trades', 'activities', 'activityapplies', 'attachments', 'favorites', 'debates', 'debateposts', 'typeoptionvars', 'forumrecommend') as $value) {
            $db->query("DELETE FROM {$tablepre}{$value} WHERE tid='{$post['tid']}'", 'UNBUFFERED');
        }
        $query = $db->query("SELECT uid, attachment, dateline, thumb, remote FROM {$tablepre}attachments WHERE tid='{$post['tid']}'");
        while ($attach = $db->fetch_array($query)) {
            dunlink($attach['attachment'], $attach['thumb'], $attach['remote']);
        }
        updateforumcount($post['fid']);
    } else {
        $db->query("DELETE FROM {$tablepre}posts WHERE pid='{$pid}'", 'UNBUFFERED');
开发者ID:lilhorse,项目名称:cocoa,代码行数:30,代码来源:magic_del.inc.php

示例5: _check

 function _check($post)
 {
     global $_G;
     if (!checkmagicperm($this->parameters['forum'], $post['fid'])) {
         showmessage(lang('magic/namepost', 'namepost_info_noperm'));
     }
     $member = getuserbyuid($post['authorid']);
     if (!checkmagicperm($this->parameters['targetgroups'], $member['groupid'])) {
         showmessage(lang('magic/namepost', 'namepost_info_user_noperm'));
     }
 }
开发者ID:softhui,项目名称:discuz,代码行数:11,代码来源:magic_namepost.php

示例6: _check

 function _check($post)
 {
     global $_G;
     if (!checkmagicperm($this->parameters['forum'], $post['fid'])) {
         showmessage(lang('magic/anonymouspost', 'anonymouspost_info_noperm'));
     }
     if ($post['authorid'] != $_G['uid']) {
         showmessage(lang('magic/anonymouspost', 'anonymouspost_info_user_noperm'));
     }
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:10,代码来源:magic_anonymouspost.php

示例7: _check

 function _check($post)
 {
     global $_G;
     if (!checkmagicperm($this->parameters['forum'], $post['fid'])) {
         showmessage(lang('magic/repent', 'repent_info_noperm'));
     }
     if ($post['authorid'] != $_G['uid']) {
         showmessage(lang('magic/repent', 'repent_info_user_noperm'));
     }
     if (getstatus($post['thread_status'], 3)) {
         showmessage(lang('magic/repent', 'repent_do_not_rushreply'));
     }
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:13,代码来源:magic_repent.php

示例8: _check

 function _check($groupid)
 {
     if (!checkmagicperm($this->parameters['targetgroups'], $groupid)) {
         showmessage(lang('magic/checkonline', 'checkonline_info_noperm'));
     }
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:6,代码来源:magic_checkonline.php

示例9: exit

/*
	[Discuz!] (C)2001-2009 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: magic_reporter.inc.php 16688 2008-11-14 06:41:07Z cnteacher $
*/
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (submitcheck('usesubmit')) {
    if (empty($username)) {
        showmessage('magics_info_nonexistence');
    }
    $member = getuserinfo($username, array('uid', 'groupid'));
    checkmagicperm($magicperm['targetgroups'], $member['groupid']);
    $query = $db->query("SELECT action FROM {$tablepre}sessions WHERE uid='{$member['uid']}'");
    if (!($msession = $db->fetch_array($query))) {
        $magicmessage = 'magics_RTK_on_message';
    } else {
        include language('actions');
        $magicmessage = 'magics_RTK_off_message';
    }
    usemagic($magicid, $magic['num']);
    updatemagiclog($magicid, '2', '1', '0', '', '', $member['uid']);
    showmessage($magicmessage, '', 1);
}
function showmagic()
{
    global $username, $lang;
    magicshowtype($lang['option'], 'top');
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:30,代码来源:magic_reporter.inc.php

示例10: _check

 function _check($groupid)
 {
     if (!checkmagicperm($this->parameters['targetgroups'], $groupid)) {
         showmessage('dsu_marcothief:magic_4');
     }
 }
开发者ID:v998,项目名称:dsu,代码行数:6,代码来源:magic_dsu_marcothief.php


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