1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
|
$modpostcount = 0;
if (checkAdminPermissions("a_can_threads_moderate_posts",0)) {
// is super mod?
if($wbbuserdata['m_is_supermod']==0) {
if ($boardids=="") {
$result=$db->query("SELECT boardid FROM bb".$n."_moderators WHERE userid='".$wbbuserdata['userid']."'");
while($row=$db->fetch_array($result)) $boardids .= ",".$row['boardid'];
}
list($modpostcount)=$db->query_first("SELECT count(p.postid) FROM bb".$n."_posts p, bb".$n."_threads t WHERE t.threadid=p.threadid AND t.visible=1 AND p.visible=0 AND t.boardid IN (0".$boardids.") ORDER BY posttime DESC");
}
else list($modpostcount)=$db->query_first("SELECT count(p.postid) FROM bb".$n."_posts p, bb".$n."_threads t WHERE t.threadid=p.threadid AND t.visible=1 AND p.visible=0 ORDER BY posttime DESC");
}
|