本文整理汇总了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'));
}
}
示例2: _check
function _check($fid)
{
if (!checkmagicperm($this->parameters['forum'], $fid)) {
showmessage(lang('magic/jack', 'jack_info_noperm'));
}
}
示例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');
示例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');
示例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'));
}
}
示例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'));
}
}
示例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'));
}
}
示例8: _check
function _check($groupid)
{
if (!checkmagicperm($this->parameters['targetgroups'], $groupid)) {
showmessage(lang('magic/checkonline', 'checkonline_info_noperm'));
}
}
示例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');
示例10: _check
function _check($groupid)
{
if (!checkmagicperm($this->parameters['targetgroups'], $groupid)) {
showmessage('dsu_marcothief:magic_4');
}
}