Exemple #1
0
    //群组管理员
    $ifColonyRight = $SYSTEM['colonyright'];
    //有群组管理权限的用户组
    $ifForumColonyRight = $pwSystem['forumcolonyright'];
    //版主开启群组管理权限
    $colonyManageCheck = $ifColonyAdmin || $ifColonyRight || $isGM || $ifForumColonyRight ? 1 : 0;
    if ($ifColonyAdmin) {
        //根据等级获取群组管理员所具有的权限
        $colonyLevel = $colony['speciallevel'] ? $colony['speciallevel'] : $colony['commonlevel'];
        if ($colonyLevel && ($colonyRights = $db->get_one("SELECT * FROM pw_cnlevel WHERE id=" . S::sqlEscape($colonyLevel)))) {
            $colonyTopicAdmin = $colonyRights['topicadmin'] ? unserialize($colonyRights['topicadmin']) : array();
        }
    }
}
$creditnames = pwCreditNames();
$creditunits = pwCreditUnits();
/**** 帖子排序  版块-帖子*****/
if ($ordertype) {
    /*performance*/
    $cookie_rorder = GetCookie('rorder');
    if ($cookie_rorder && count($cookie_rorder) > 10) {
        Cookie("rorder", '', 0);
    }
    Cookie("rorder[{$tid}]", $ordertype);
    $orderby = $ordertype == 'desc' ? 'desc' : 'asc';
    unset($cookie_rorder);
} else {
    $replayOrder = GetCookie('rorder');
    if ($replayOrder && is_array($replayOrder) && array_key_exists($tid, $replayOrder)) {
        //$replayOrder = GetCookie('rorder');
        $orderby = $replayOrder[$tid] == 'desc' ? 'desc' : 'asc';
Exemple #2
0
 function buildCountCategoryInfo($reward, $num = 1)
 {
     $reward = unserialize($reward);
     $category = $reward['category'];
     switch ($category) {
         case "credit":
             return "共获得 " . pwCreditNames($reward['type']) . " " . $reward['num'] * $num . " " . pwCreditUnits($reward['type']);
             break;
         case "tools":
             $tools = $this->getTools();
             return "共获得道具 " . $tools[$reward['type']] . " " . $reward['num'] * $num . " 个";
             break;
         case "medal":
             $medals = $this->getMedals();
             return "共获得勋章 " . $medals[$reward['type']] . " 有效期 " . $reward['day'] * $num . " 天";
             break;
         case "usergroup":
             list($result, $selects) = $this->getLevels();
             return "成为 " . $selects[$reward['type']] . " 有效期 " . $reward['day'] * $num . " 天";
             break;
         case "invitecode":
             return "共获得邀请注册码 " . $reward['num'] * $num . " 个";
             break;
         default:
             return "";
             break;
     }
 }