• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pwRights函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getReadRight

 function getReadRight($user)
 {
     global $isGM, $isBM, $admincheck, $pwPostHide, $pwSellHide, $pwEncodeHide, $manager, $groupid, $windid;
     $pwSystem = array();
     if ($user->groupid != 'guest') {
         $isGM = S::inArray($windid, $manager);
         if (!$isGM) {
             $pwSystem = pwRights();
             $pwPostHide = $pwSystem['posthide'];
             $pwSellHide = $pwSystem['sellhide'];
             $pwEncodeHide = $pwSystem['encodehide'];
         } else {
             $pwPostHide = $pwSellHide = $pwEncodeHide = 1;
         }
     }
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:16,代码来源:ver.customized.common.php


示例2: check

 function check()
 {
     global $db_allowupload, $winddb, $groupid, $_G, $windid, $winduid, $manager;
     if (empty($this->attach)) {
         return 'job_attach_error';
     }
     if (!$db_allowupload) {
         return 'upload_close';
     } elseif (!$this->forum->allowupload($winddb, $groupid)) {
         return 'upload_forum_right';
     } elseif (!$this->forum->foruminfo['allowupload'] && $_G['allowupload'] == 0) {
         return 'upload_group_right';
     }
     if (!($winduid == $this->attach['uid'] || S::inArray($windid, $manager) || pwRights($this->forum->isBM($windid), 'deltpcs', $this->forum->fid))) {
         return 'modify_noper';
     }
     return true;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:18,代码来源:attmodify.class.php


示例3: wap_check

function wap_check($fid, $action)
{
    global $db, $groupid, $_G, $_time, $db_titlemax, $db_postmin, $db_postmax, $subject, $content;
    $subject = trim($subject);
    $content = trim($content);
    if ($action == 'new' && (!$subject || strlen($subject) > $db_titlemax)) {
        wap_msg('subject_limit');
    }
    if (strlen($content) >= $db_postmax || strlen($content) < $db_postmin) {
        wap_msg('content_limit');
    }
    $fm = $db->get_one("SELECT f.forumadmin,f.fupadmin,f.password,f.allowvisit,f.f_type,f.f_check,f.allowpost,f.allowrp,fe.forumset FROM pw_forums f LEFT JOIN pw_forumsextra fe USING(fid) WHERE f.fid=" . pwEscape($fid));
    $forumset = unserialize($fm['forumset']);
    if (!$fm || $fm['password'] != '' || $fm['f_type'] == 'hidden' || $fm['allowvisit'] && @strpos($fm['allowvisit'], ",{$groupid},") === false) {
        wap_msg('post_right');
    }
    if ($action == 'new') {
        $isGM = CkInArray($GLOBALS['windid'], $GLOBALS['manager']);
        $isBM = admincheck($fm['forumadmin'], $fm['fupadmin'], $GLOBALS['windid']);
        if ($fm['f_check'] == '1' || $fm['f_check'] == '3') {
            wap_msg('post_right');
        }
        if ($fm['allowpost'] && strpos($fm['allowpost'], ",{$groupid},") === false) {
            wap_msg('post_right');
        }
        if (!$fm['allowpost'] && $_G['allowpost'] == 0) {
            wap_msg('post_group');
        }
        if ($forumset['allowtime'] && !$isGM && !allowcheck($forumset['allowtime'], "{$_time['hours']}", '') && !pwRights($isBM, 'allowtime')) {
            wap_msg('post_right');
        }
    } elseif ($action == 'reply') {
        if ($fm['f_check'] == '2' || $fm['f_check'] == '3') {
            wap_msg('reply_right');
        }
        if ($fm['allowrp'] && strpos($fm['allowrp'], ",{$groupid},") === false) {
            wap_msg('reply_right');
        }
        if (!$fm['allowrp'] && $_G['allowrp'] == 0) {
            wap_msg('reply_group');
        }
    }
}
开发者ID:adi00,项目名称:wumaproject,代码行数:43,代码来源:wap_global.php


示例4: extract

        extract(L::style());
        $leaveword = $atcdb['leaveword'] ? leaveword($atcdb['leaveword']) : '';
        $content = convert($atc_content . $leaveword, $db_windpost);
        if (strpos($content, '[p:') !== false || strpos($content, '[s:') !== false) {
            $content = showface($content);
        }
        if ($atcdb['ifsign'] < 2) {
            $content = str_replace("\n", '<br />', $content);
        }
        if ($postdata->data['ifwordsfb'] == 0) {
            $wordsfb = L::loadClass('FilterUtil', 'filter');
            $content = addslashes($wordsfb->convert(stripslashes($content)));
        }
        $creditnames = pwCreditNames();
        if ($atcdb['attachs']) {
            $attachShow = new attachShow($pwpost->isGM || pwRights($pwpost->isBM, 'delattach'), $pwforum->forumset['uploadset']);
            $attachShow->setData($atcdb['attachs']);
            $attachShow->parseAttachs($pid, $content, $winduid == $atcdb['authorid']);
        }
        $alterinfo && ($content .= "<div id=\"alert_{$pid}\" style=\"color:gray;margin-top:30px\">[ {$alterinfo} ]</div>");
        $atcdb['icon'] = $atcdb['icon'] ? "<img src=\"{$imgpath}/post/emotion/{$atcdb['icon']}.gif\" align=\"left\" border=\"0\" />" : '';
        echo "success\t" . stripslashes($atc_title) . "\t" . str_replace(array("\r", "\t"), array("", ""), stripslashes($content));
        ajax_footer();
    }
} elseif ($a == 'join') {
    define('F_M', true);
    $groupid == 'guest' && Showmsg('not_login');
    if (($return = $newColony->checkJoinStatus($winduid)) !== true) {
        Showmsg($return);
    }
    S::gp(array('frombbs'));
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:m_group.php


示例5: pwEscape

     $S_sql = $J_sql = '';
 }
 $tpcarray = $db->get_one("SELECT t.tid,t.fid,t.locked,t.ifcheck,t.author,t.authorid,t.postdate,t.lastpost,t.ifmail,t.special,t.subject,t.type,t.ifshield,t.anonymous,t.ptable,t.replies,t.tpcstatus {$S_sql} FROM pw_threads t {$J_sql} WHERE t.tid=" . pwEscape($tid));
 $pw_posts = GetPtable($tpcarray['ptable']);
 $tpcarray['openIndex'] = getstatus($tpcarray['tpcstatus'], 2);
 if ($tpcarray['fid'] != $fid) {
     wap_msg('illegal_tid', $rurl);
 }
 if ($pwforum->forumset['lock'] && !$pwpost->isGM && $timestamp - $tpcarray['postdate'] > $pwforum->forumset['lock'] * 86400 && !pwRights($pwpost->isBM, 'replylock')) {
     $forumset['lock'] = $pwforum->forumset['lock'];
     wap_msg('forum_locked', $rurl);
 }
 if (!$pwpost->isGM && !$tpcarray['ifcheck'] && !pwRights($pwpost->isBM, 'viewcheck')) {
     wap_msg('reply_ifcheck', $rurl);
 }
 if (!$pwpost->isGM && $tpcarray['locked'] % 3 != 0 && !pwRights($pwpost->isBM, 'replylock')) {
     wap_msg('reply_lockatc', $rurl);
 }
 InitGP(array('subject', 'content'), 'P', 0);
 checkWapPost(0);
 require_once R_P . 'lib/forum/replypost.class.php';
 $replypost = new replyPost($pwpost);
 $replypost->setTpc($tpcarray);
 $replypost->check();
 !empty($pwpost->errMsg) && wap_msg($pwpost->errMsg);
 require_once R_P . 'require/bbscode.php';
 $replypost->setTpc($tpcarray);
 $content = $content . "\r\n\r\n[size=2][color=#a5a5a5]内容来自[/color][color=#4f81bd][url=" . $db_bbsurl . "/m/index.php][手机版][/url][/color] [/size]";
 $postdata = new replyPostData($pwpost);
 $postdata->setTitle(wap_cv($subject, false));
 $postdata->setContent(wap_cv($content, false));
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:post.php


示例6: exit

<?php

!defined('P_W') && exit('Forbidden');
InitGP(array('id'), null, 2);
InitGP(array('record'));
$rt = $db->get_one("SELECT tid,fid FROM pw_pinglog WHERE ifhide=0 AND id=" . S::sqlEscape($id));
if (empty($rt) || !$rt['fid']) {
    Showmsg('data_error');
}
L::loadClass('forum', 'forum', false);
$pwforum = new PwForum($rt['fid']);
$isGM = CkInArray($windid, $manager);
if (!$isGM && !pwRights($pwforum->isBM($windid), 'pingcp', $rt['fid'])) {
    Showmsg('mawhole_right');
}
//$db->update("UPDATE pw_pinglog SET record=" . S::sqlEscape($record) . " WHERE id=" . S::sqlEscape($id));
pwQuery::update('pw_pinglog', 'id=:id', array($id), array('record' => $record));
echo "success";
# memcache reflesh
if ($db_memcache) {
    //* $threads = L::loadClass('Threads', 'forum');
    //* $threads->delThreads($rt['tid']);
    Perf::gatherInfo('changeThreadWithThreadIds', array('tid' => $rt['tid']));
}
ajax_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:25,代码来源:savepinglog.php


示例7: array

        $showfield[] = $key;
    }
}
!empty($showfield) && ($fieldinfo .= ',mi.customdata');
$fieldinfo && ($tableinfo = 'LEFT JOIN pw_memberinfo mi ON mi.uid=m.uid');
/**************************************/
//帖子浏览及管理权限
$isGM = $isBM = $admincheck = $managecheck = $pwPostHide = $pwSellHide = $pwEncodeHide = 0;
$pwSystem = array();
if ($groupid != 'guest') {
    $isGM = S::inArray($windid, $manager);
    $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
    $admincheck = $isGM || $isBM ? 1 : 0;
    if (!$isGM) {
        #非创始人权限获取
        $pwSystem = pwRights($isBM);
        if ($pwSystem && ($pwSystem['tpccheck'] || $pwSystem['digestadmin'] || $pwSystem['lockadmin'] || $pwSystem['pushadmin'] || $pwSystem['coloradmin'] || $pwSystem['downadmin'] || $pwSystem['delatc'] || $pwSystem['moveatc'] || $pwSystem['copyatc'] || $pwSystem['topped'] || $pwSystem['unite'] || $pwSystem['pingcp'] || $pwSystem['areapush'])) {
            $managecheck = 1;
        }
        $pwPostHide = $pwSystem['posthide'];
        $pwSellHide = $pwSystem['sellhide'];
        $pwEncodeHide = $pwSystem['encodehide'];
    } else {
        $managecheck = $pwPostHide = $pwSellHide = $pwEncodeHide = 1;
    }
}
//版块查看权限
if ($foruminfo['allowread'] && !$admincheck && !allowcheck($foruminfo['allowread'], $groupid, $winddb['groups'])) {
    Showmsg('forum_read_right');
}
if (!$admincheck) {
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:addfloor.php


示例8: array

             $credit->addLog("topic_{$creditOpKey}", $creditset[$creditOpKey], array('uid' => $tpcData['authorid'], 'username' => $tpcData['author'], 'ip' => $onlineip, 'fname' => strip_tags($foruminfo['name']), 'operator' => $windid));
             $credit->sets($tpcData['authorid'], $creditset[$creditOpKey], false);
         }
         $credit->runsql();
         require_once R_P . 'require/msg.php';
         foreach ($msgdb as $key => $val) {
             pwSendMsg($val);
         }
         $delarticle->delTopic($readdb);
         # memcache refresh
         $threadList = L::loadClass("threadlist");
         $threadList->refreshThreadIdsByForumId($fid);
         refreshto("forumcp.php?action=edit&type={$type}&fid={$fid}", 'operate_success');
     }
 } elseif ($type == 'pcheck') {
     if (!$isGM && !pwRights($isBM, 'viewcheck')) {
         Showmsg('not_forumadmin');
     }
     if (empty($_POST['step'])) {
         InitGP(array('starttime', 'endtime', 'username', 'ptable'));
         InitGP(array('page'), 'GP', 2);
         $page < 1 && ($page = 1);
         $limit = pwLimit(($page - 1) * $db_perpage, $db_perpage);
         $sql = $url_a = '';
         $_POST['starttime'] && ($starttime = PwStrtoTime($starttime));
         $_POST['endtime'] && ($endtime = PwStrtoTime($endtime));
         if ($username) {
             $sql .= ' AND author=' . pwEscape($username);
             $url_a .= "username=" . rawurlencode($username) . "&";
         }
         if ($starttime) {
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:forumcp.php


示例9: array

                //$db->update("UPDATE pw_threads SET locked='$s' WHERE tid=".S::sqlEscape($rt['tid']));
                pwQuery::update('pw_threads', "tid=:tid", array($rt['tid']), array("locked" => $s));
                if ($ifmsg) {
                    $msgdb[] = array('toUser' => $rt['author'], 'title' => getLangInfo('writemsg', 'unlock_title'), 'content' => getLangInfo('writemsg', 'unlock_content', array('manager' => $windid, 'fid' => $fid, 'tid' => $rt['tid'], 'subject' => $rt['subject'], 'postdate' => get_date($rt['postdate']), 'forum' => strip_tags($forum[$fid]['name']), 'admindate' => get_date($timestamp), 'reason' => stripslashes($atc_content))));
                }
                $logdb[] = array('type' => 'locked', 'username1' => $rt['author'], 'username2' => $windid, 'field1' => $fid, 'field2' => $rt['tid'], 'field3' => '', 'descrip' => 'unlock_descrip', 'timestamp' => $timestamp, 'ip' => $onlineip, 'tid' => $rt['tid'], 'subject' => substrs($rt['subject'], 28), 'forum' => $forum[$fid]['name'], 'reason' => stripslashes($atc_content));
            }
        }
        sendMawholeMessages($msgdb);
        foreach ($logdb as $key => $val) {
            writelog($val);
        }
        refreshto("apps.php?q=group&a=thread&cyid={$cyid}", 'lock_success');
    }
} elseif ($action == 'pushtopic') {
    $pushtime_top = (int) pwRights(false, 'pushtime');
    if (empty($_POST['step'])) {
        require_once PrintEot('m_topicadmin');
        footer();
    } else {
        PostCheck();
        S::gp(array('ifmsg', 'nextto', 'pushtime'));
        if (!is_numeric($pushtime)) {
            Showmsg('mawhole_erropushtime');
        }
        if ($pushtime_top && $pushtime > $pushtime_top) {
            Showmsg('mawhole_beyondpushtime');
        }
        $msgdb = $logdb = array();
        $query = $db->query("SELECT tid,fid,postdate,author,authorid,subject FROM pw_threads WHERE tid IN(" . S::sqlImplode($selids) . ")");
        while ($rt = $db->fetch_array($query)) {
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:m_topicadmin.php


示例10: editlog

 function editlog()
 {
     if ($this->post->uid != $this->atcdb['authorid'] && ($this->post->isGM || pwRights($this->post->isBM, 'deltpcs'))) {
         /**
          * 管理员编辑帖子的安全日记
          */
         global $timestamp, $onlineip;
         require_once R_P . 'require/writelog.php';
         $log = array('type' => 'edit', 'username1' => $this->atcdb['author'], 'username2' => $this->post->username, 'field1' => $this->forum->fid, 'field2' => '', 'field3' => '', 'descrip' => 'edit_descrip', 'timestamp' => $timestamp, 'ip' => $onlineip, 'tid' => $this->tid, 'forum' => $this->forum->name, 'subject' => substrs($this->data['title'], 28), 'reason' => 'edit article');
         writelog($log);
     }
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:12,代码来源:postmodify.class.php


示例11: Showmsg

    if ($bandb['type'] == 3) {
        Showmsg('ban_info3');
    } else {
        Cookie('force', '', 0);
    }
}
$userlastptime = $groupid != 'guest' ? $winddb['lastpost'] : GetCookie('userlastptime');
/**
* 灌水预防
*/
$tdtime >= $winddb['lastpost'] && ($winddb['todaypost'] = 0);
$montime >= $winddb['lastpost'] && ($winddb['monthpost'] = 0);
if ($_G['postlimit'] && $winddb['todaypost'] >= $_G['postlimit']) {
    Showmsg('post_gp_limit');
}
if (!empty($_POST['step']) && !$pwpost->isGM && $_G['postpertime'] && $timestamp >= $userlastptime && $timestamp - $userlastptime <= $_G['postpertime'] && !pwRights($pwpost->isBM, 'postpers')) {
    Showmsg('post_limit');
}
list($postq, $showq) = explode("\t", $db_qcheck);
$_G['uploadtype'] && ($db_uploadfiletype = $_G['uploadtype']);
$db_uploadfiletype = !empty($db_uploadfiletype) ? is_array($db_uploadfiletype) ? $db_uploadfiletype : unserialize($db_uploadfiletype) : array();
empty($db_sellset['type']) && ($db_sellset['type'] = array('money'));
empty($db_enhideset['type']) && ($db_enhideset['type'] = array('rvrc'));
if (empty($_POST['step'])) {
    require_once R_P . 'require/credit.php';
    $editor = getstatus($winddb['userstatus'], PW_USERSTATUS_EDITOR) ? 'wysiwyg' : 'textmode';
    !is_numeric($db_attachnum) && ($db_attachnum = 1);
    $htmlsell = $pwforum->foruminfo['allowsell'] && $_G['allowsell'] ? '' : 'disabled';
    $htmlhide = $pwforum->forumset['allowencode'] && $_G['allowencode'] ? '' : 'disabled';
    $htmlpost = $attachHide = $pwforum->foruminfo['allowhide'] && $_G['allowhidden'] ? '' : 'disabled';
    $ifanonymous = $pwpost->isGM || $pwforum->forumset['anonymous'] && $_G['anonymous'] ? '' : 'disabled';
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:post.php


示例12: array

        $lastpost = $rt['subject'] . "\t" . $rt['author'] . "\t" . $rt['postdate'] . "\t" . "read.php?tid={$rt['tid']}&ds=1&page=e#a";
        //* $db->update("UPDATE pw_forumdata SET topic=topic+'1',article=article+'1',tpost=tpost+'1',lastpost=".S::sqlEscape($lastpost,false)." WHERE fid='$fid'");
        $db->update(pwQuery::buildClause("UPDATE :pw_table SET topic=topic+'1',article=article+'1',tpost=tpost+'1',lastpost=:lastpost WHERE fid=:fid", array('pw_forumdata', $lastpost, $fid)));
        //更新审核日志
        $db->update(pwQuery::buildClause("UPDATE :pw_table SET state=1,assessor=:assessor WHERE tid=:tid", array('pw_filter', $windid, $rt[tid])));
    }
    Showmsg('operate_success');
} elseif ($action == 'inspect') {
    $forumset = $foruminfo['forumset'];
    if (empty($forumset['inspect'])) {
        Showmsg('undefined_action');
    }
    S::gp(array('pid', 'page', 'p', 'nextto'));
    $pid = (int) $pid;
    $page = (int) $page;
    if (!empty($foruminfo['t_type']) && ($isGM || pwRights($isBM, 'tpctype'))) {
        $iftypeavailable = 1;
    }
    $rt = $db->get_one('SELECT inspect FROM pw_threads WHERE tid=' . S::sqlEscape($tid) . " AND fid=" . S::sqlEscape($fid));
    empty($rt) && Showmsg('undefined_action');
    list($lou) = explode("\t", $rt['inspect']);
    $pid >= intval($lou) && ($lou = $pid);
    $inspect = $lou . "\t" . addslashes($windid);
    //$db->update('UPDATE pw_threads SET inspect='.S::sqlEscape($inspect).' WHERE tid='.S::sqlEscape($tid));
    pwQuery::update('pw_threads', 'tid=:tid', array($tid), array('inspect' => $inspect));
    delfcache($fid, $db_fcachenum);
    if (!empty($nextto)) {
        if (!defined('AJAX')) {
            refreshto("mawhole.php?action={$nextto}&fid={$fid}&seltid={$tid}", 'operate_success');
        } else {
            $selids = $tid;
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:masingle.php


示例13: list

//title
list($guidename, $forumtitle) = $pwforum->getTitle();
if (!$replytitle) {
    $atc_title = "Re:{$read['subject']}";
    //$forumtitle = "$atc_title|$forumtitle";
} else {
    $atc_title = "Re:{$replytitle}";
    //$forumtitle = "$atc_title|$tpcarray[subject]|$forumtitle";
}
//time
list($postTime) = getLastDate($atcarray['postdate']);
$atc_title = substrs(str_replace('&nbsp;', ' ', $atc_title), $db_titlemax - 3);
//quote
if ((!$tpc_locked || $SYSTEM['replylock']) && ($admincheck || $pwforum->allowreply($winddb, $groupid))) {
    if (!$admincheck && !$foruminfo['allowrp'] && !$_G['allowrp']) {
        quickPostMessage('reply_group_right');
    }
    require_once PrintEot('quickpost');
    ajax_footer();
}
if (!$isGM && $tpc_locked && !pwRights($isBM, 'replylock')) {
    //locked
    quickPostMessage('reply_lockatc');
}
quickPostMessage('reply_group_right');
function quickPostMessage($message)
{
    $message = getLangInfo('msg', $message);
    echo $message;
    ajax_footer();
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:quickpost.php


示例14: getAdminRight

 /**
  * 返回报名列表管理/浏览权限
  * @param int $authorid 发起人id
  * @return bool
  * @access private
  */
 function getAdminRight($authorid)
 {
     global $groupid, $manager, $foruminfo, $windid;
     $isGM = S::inArray($windid, $manager);
     //是否是创始人
     $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
     //是否有管理权限
     if (!$isGM) {
         #非创始人权限获取
         $pwSystem = pwRights($isBM);
         if ($pwSystem && $pwSystem['activitylist']) {
             $isBM = 1;
         } else {
             $isBM = 0;
         }
     }
     if ($groupid == 3 || $isGM || $isBM || $authorid == $this->winduid) {
         return true;
     }
     return false;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:27,代码来源:activityforbbs.class.php


示例15: substrs

 if (!$replytitle) {
     $atc_title = "Re:{$tpcarray['subject']}";
     $forumtitle = "{$atc_title}|{$forumtitle}";
 } else {
     $atc_title = "Re:{$replytitle}";
     $forumtitle = "{$atc_title}|{$tpcarray['subject']}|{$forumtitle}";
 }
 $atc_title = substrs(str_replace('&nbsp;', ' ', $atc_title), $db_titlemax - 3);
 $db_metakeyword = str_replace(array('|', ' - '), ',', $forumtitle) . 'phpwind';
 require_once R_P . 'require/header.php';
 $msg_guide = $pwforum->headguide($guidename);
 $post_reply = '';
 $review_reply = '';
 if ($db_showreplynum > 0) {
     $wordsfb = L::loadClass('FilterUtil', 'filter');
     $pwAnonyHide = $pwpost->isGM || pwRights($pwpost->isBM, 'anonyhide');
     $query = $db->query("SELECT p.pid,p.author,p.authorid,p.subject,p.postdate,p.content,p.anonymous,p.ifconvert,p.ifwordsfb,p.ifshield,m.uid,m.groupid,m.userstatus FROM {$pw_posts} p LEFT JOIN pw_members m ON p.authorid=m.uid WHERE tid=" . S::sqlEscape($tid) . "AND ifcheck='1' ORDER BY postdate DESC LIMIT 0,{$db_showreplynum}");
     while ($rt = $db->fetch_array($query)) {
         $tpc_author = $rt['anonymous'] && !$pwAnonyHide && $windid != $rt['author'] ? $db_anonymousname : $rt['author'];
         $tpc_pid = $rt['pid'];
         if ($rt['ifshield']) {
             $groupid != '3' && ($rt['content'] = shield($rt['ifshield'] == '1' ? 'shield_article' : 'shield_del_article'));
         } elseif ($groupid != 3 && $db_shield && $pwforum->forumBan($rt)) {
             $rt['content'] = shield('ban_article');
         } else {
             if (!$wordsfb->equal($rt['ifwordsfb'])) {
                 $rt['content'] = $wordsfb->convert($rt['content']);
             }
             $rt['ifconvert'] == 2 && ($rt['content'] = convert($rt['content'], $db_windpost));
             if (strpos($rt['content'], '[p:') !== false || strpos($rt['content'], '[s:') !== false) {
                 $rt['content'] = showface($rt['content']);
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:postreply.php


示例16: getThreadLevel

 function getThreadLevel($type, $fid)
 {
     if (!in_array($type, array('thread', 'special'))) {
         return array('', '', '');
     }
     global $windid, $manager, $SYSTEM;
     /* thread level */
     $isGM = S::inArray($windid, $manager);
     $isGM ? $admincheck = 1 : 0;
     if (!$admincheck && $fid) {
         $_forumsService = L::loadClass('forums', 'forum');
         $foruminfo = $_forumsService->getForum($fid);
         $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
         $pwSystem = pwRights($isBM, false, $fid);
         if ($pwSystem && ($pwSystem['tpccheck'] || $pwSystem['digestadmin'] || $pwSystem['lockadmin'] || $pwSystem['pushadmin'] || $pwSystem['coloradmin'] || $pwSystem['downadmin'] || $pwSystem['delatc'] || $pwSystem['moveatc'] || $pwSystem['copyatc'] || $pwSystem['topped'])) {
             $admincheck = 1;
         }
     }
     $superdelete = $SYSTEM['superright'] && $SYSTEM['delatc'] ? true : false;
     $superedit = $SYSTEM['superright'] && $SYSTEM['deltpcs'] ? true : false;
     return array($admincheck, $superdelete, $superedit);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:22,代码来源:searcher.php


示例17: Showmsg

} else {
    $admincheck = 0;
}
if ($foruminfo['allowread'] && !$admincheck && !allowcheck($foruminfo['allowread'], $groupid, $winddb['groups'])) {
    Showmsg('forum_read_right');
}
if (!$admincheck && !$foruminfo['allowvisit']) {
    forum_creditcheck();
}
if (!$admincheck && $foruminfo['forumsell']) {
    forum_sell($fid);
}
if ($read['ifcheck'] == 0 && !$isGM && $windid != $read['author'] && !pwRights($isBM, 'viewcheck')) {
    Showmsg('read_check');
}
if ($read['locked'] % 3 == 2 && !$isGM && !pwRights($isBM, 'viewclose')) {
    Showmsg('read_locked');
}
$db_metakeyword = substr($read['tags'], 0, strpos($read['tags'], "\t"));
$db_metakeyword = (empty($db_metakeyword) ? $subject : $db_metakeyword) . ',' . $forumtitle;
$db_metakeyword = trim(str_replace(array('|', ' - ', "\t", ' ', ',,,', ',,'), ',', $db_metakeyword), ',');
if ($groupid == 'guest' && !$read['ifshield'] && !isban($read, $fid)) {
    if ($read['ifconvert'] == 2) {
        $metadescrip = stripWindCode($read['content']);
        $metadescrip = strip_tags($metadescrip);
    } else {
        $metadescrip = strip_tags($read['content']);
    }
    $metadescrip = str_replace(array('"', "\n", "\r", '&nbsp;', '&amp;', '&lt;', '', '&#160;'), '', $metadescrip);
    $metadescrip = substrs($metadescrip, 255, false);
    if ($read['ifwordsfb'] != $db_wordsfb) {
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:mod_read.php


示例18: InitGP

 $schedid = '';
 InitGP(array('sid', 'seekfid', 'page', 'ptable'));
 $f_fid = (int) $f_fid;
 !$seekfid && ($seekfid = empty($f_fid) || $f_fid == 'all' ? 'all' : $f_fid);
 if ($seekfid != 'all') {
     $seekfid = (int) $seekfid;
 }
 $admincheck = $total = 0;
 $isGM = CkInArray($windid, $manager);
 if ($seekfid != 'all') {
     if ($isGM) {
         $admincheck = 1;
     } else {
         $foruminfo = $db->get_one("SELECT forumadmin,fupadmin FROM pw_forums WHERE fid=" . pwEscape($seekfid));
         $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
         $pwSystem = pwRights($isBM, false, $seekfid);
         if ($pwSystem && ($pwSystem['tpccheck'] || $pwSystem['digestadmin'] || $pwSystem['lockadmin'] || $pwSystem['pushadmin'] || $pwSystem['coloradmin'] || $pwSystem['downadmin'] || $pwSystem['delatc'] || $pwSystem['moveatc'] || $pwSystem['copyatc'] || $pwSystem['topped'])) {
             $admincheck = 1;
         }
     }
 }
 $superRight = $SYSTEM['superright'] && $SYSTEM['delatc'] ? true : false;
 /*超级删除权限*/
 $superEdit = $SYSTEM['superright'] && $SYSTEM['deltpcs'] ? true : false;
 /*超级编辑权限*/
 unset($f_fid);
 if ($db_sphinx['isopen'] == 1 && $keyword) {
     require_once R_P . 'require/sphinxsearch.php';
 } else {
     require_once R_P . 'require/normalsearch.php';
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:search.php


示例19: checkReply

 /**
  * 
  * @param $tid
  */
 function checkReply($tid)
 {
     global $timestamp, $groupid, $winddb, $winduid, $_time;
     $this->hours =& $_time['hours'];
     $tpcarray = $this->db->get_one("SELECT tid,fid,locked,ifcheck,postdate,ptable,tpcstatus FROM pw_threads WHERE tid=" . S::sqlEscape($tid));
     if (empty($tpcarray)) {
         return false;
     }
     L::loadClass('forum', 'forum', false);
     L::loadClass('post', 'forum', false);
     $pwforum = new PwForum($tpcarray['fid']);
     $pwpost = new PwPost($pwforum);
     if (getstatus($tpcarray['tpcstatus'], 7)) {
         $robbuildService = L::loadClass('RobBuild', 'forum');
         /* @var $robbuildService PW_RobBuild */
         $robbuild = $robbuildService->getByTid($tid);
         if ($robbuild['starttime'] > $timestamp) {
             return false;
         }
     }
     if (!$pwforum->foruminfo['allowrp'] && !$pwpost->admincheck && $GLOBALS['_G']['allowrp'] == 0) {
         return 'reply_group_right';
     } elseif ($pwforum->forumset['lock'] && !$pwpost->isGM && $timestamp - $tpcarray['postdate'] > $pwforum->forumset['lock'] * 86400 && !pwRights($pwpost->isBM, 'replylock')) {
         return 'forum_locked';
     } elseif (!$pwpost->isGM && !$tpcarray['ifcheck'] && !pwRights($pwpost->isBM, 'viewcheck')) {
         return 'reply_ifcheck';
     } elseif (!$pwpost->isGM && $tpcarray['locked'] % 3 != 0 && !pwRights($pwpost->isBM, 'replylock')) {
         return 'reply_lockatc';
     } elseif (!$pwpost->isGM && !$pwpost->forum->allowtime($this->hours) && !pwRights($pwpost->isBM, 'allowtime')) {
         return 'forum_allowtime';
     } else {
         if ($groupid == 6 || getstatus($winddb['userstatus'], PW_USERSTATUS_BANUSER)) {
             $bandb = array();
             $query = $this->db->query("SELECT * FROM pw_banuser WHERE uid=" . S::sqlEscape($winduid));
             while ($rt = $this->db->fetch_array($query)) {
                 if ($rt['fid'] == 0 || $rt['fid'] == $tpcarray['fid']) {
                     $bandb[$rt['fid']] = $rt;
                 }
             }
             if ($bandb) {
                 return 'ban_info3';
             }
         }
         L::loadClass('replypost', 'forum', false);
         $replypost = new replyPost($pwpost);
         $replypost->setTpc($tpcarray);
         $pwpost->errMode = true;
         $replypost->check();
         if ($pwpost->errMsg && ($msg = reset($pwpost->errMsg))) {
             return $msg;
         }
         return true;
     }
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:58,代码来源:ping.class.php


示例20: userSystemRight

/**
 * 判断用户所在用户组对版块的管理权限
 *
 * @param string $name 用户名
 * @param bool $isBM  是否为版主
 * @param string $type 例如:$pwSystem权限,deltpcs编辑权限
 * @return bool
 */
function userSystemRight($name, $isBM, $type)
{
    $isGM = isGM($name);
    $pwSystem = pwRights($isBM);
    if ($isGM || $pwSystem[$type]) {
        return true;
    }
    return false;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:17,代码来源:common.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pwSqlMulti函数代码示例发布时间:2022-05-15
下一篇:
PHP pwOutPut函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap