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')); } }
function _check($fid) { if (!checkmagicperm($this->parameters['forum'], $fid)) { showmessage(lang('magic/jack', 'jack_info_noperm')); } }
/* [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');
/* [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');
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')); } }
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')); } }
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')); } }
function _check($groupid) { if (!checkmagicperm($this->parameters['targetgroups'], $groupid)) { showmessage(lang('magic/checkonline', 'checkonline_info_noperm')); } }
/* [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');
function _check($groupid) { if (!checkmagicperm($this->parameters['targetgroups'], $groupid)) { showmessage('dsu_marcothief:magic_4'); } }