$colonyNums = PwColony::calculateCredit($colony); $udb = $uids = $newvisit = array(); $indexModel = array('thread' => array(), 'galbum' => array(), 'write' => array()); //话题区开始 if ($groupRight['modeset']['thread']['ifopen'] && $groupRight['layout']['thread']['ifopen']) { $colony['count'] = 0; if ($colony['tnum'] > 0 && ($colony['ifopen'] || $ifadmin || $colony['ifcyer'])) { $_sql_where = $digest == 1 ? " AND a.digest=1" : ''; $threadLimit = $groupRight['layout']['thread']['num'] > 0 ? intval($groupRight['layout']['thread']['num']) : 20; $argdb = $newColony->getArgument($_sql_where, 0, $threadLimit); $colony['count'] = $newColony->getArgumentCount($_sql_where); foreach ($argdb as $key => $rt) { $rt['postdate'] = get_date($rt['postdate'], 'm-d H:m:s'); $rt['lastpost'] = get_date($rt['lastpost']); $rt['sub_subject'] = substrs($rt['subject'], 48, 'Y'); $rt['sub_subject'] = $newColony->styleFormat($rt['sub_subject'], $rt['titlefont']); $indexModel['thread'][] = $rt; $uids[] = $rt['authorid']; $lastposter[] = $rt['lastposter']; } } } //相册区模块 if ($groupRight['modeset']['galbum']['ifopen'] && $groupRight['layout']['galbum']['ifopen']) { if ($colony['photonum'] > 0) { $galbumLimit = $groupRight['layout']['galbum']['num'] > 0 ? intval($groupRight['layout']['galbum']['num']) : 8; $_sql_sel = !($colony['ifcyer'] && $colony['ifadmin'] != '-1') ? " AND ca.private='0'" : ''; $query = $db->query("SELECT cp.pid,cp.path,cp.ifthumb,m.groupid FROM pw_cnalbum ca LEFT JOIN pw_cnphoto cp ON ca.aid=cp.aid LEFT JOIN pw_members m ON cp.uploader=m.username WHERE ca.atype='1'" . $_sql_sel . " AND ca.ownerid=" . S::sqlEscape($cyid) . ' ORDER BY cp.pid DESC' . S::sqlLimit($galbumLimit)); while ($rt = $db->fetch_array($query)) { if (!$rt['pid']) { continue;