4 $page_name = 'Moderator Resources';
5 $level_restriction = MOD
;
6 if ( isset($_GET['phpinfo']) && $userinfo['level'] >= ADMIN
) {
10 require 'top.inc.php';
12 list($total_marks) = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `marks` WHERE `actioned` IS NULL'));
15 <ul class=',colour(),'>
16 <li><a href="markqueue',URL_STRING
,'">Message Queue: ',$total_marks,'</a></li>
17 <li><a href="sendsysnote',URL_STRING
,'">Send sysnotes</a></li>
18 <li><a href="userdir',URL_STRING
,'">User Directory</a></li>
20 <form action="ipinfo',URL_STRING
,'" method="get" style="display: inline"><input type="text" name="ip"/></form></li>
23 <h2>Moderator Activity</h2>
27 <th rowspan="2" scope="col">Moderator</th>
28 <th rowspan="2" scope="col">Marks Handled</th>
29 <th colspan="2">Suggestions Handled</th>
32 <th scope="col">Positive</th>
33 <th scope="col">Negative</th>
39 $tmp = mysql_query('SELECT `user` FROM `users` WHERE `level` >= '.MOD
);
40 while ( list($m) = mysql_fetch_row($tmp) ) {
41 list($na_marks) = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `marks` WHERE `action` = 0 AND `moderator` = '.$m));
42 list($p_marks) = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `marks` WHERE `action` > 0 AND `moderator` = '.$m));
43 list($n_marks) = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `marks` WHERE `action` < 0 AND `moderator` = '.$m));
44 echo '<tr class=',colour(),'><td>',userlink($m),'</td><td>',$na_marks,'</td><td>',$p_marks,'</td><td>',$n_marks,"</td></tr>\n";
46 echo "</tbody>\n</table>\n";
48 if ( $userinfo['level'] < ADMIN
)
51 if ( isset($_GET['purge']) ) {
52 define('FORCE_PURGE', true);
53 include 'thepurge.php';
54 echo '<div class="alert">Purge ran.</div>'."\n";
57 if ( isset($_GET['activate']) ) {
58 $tmp = mysql_query('SELECT `user` FROM `users` WHERE `level` = '.INACTIVE_USER
);
59 while (list($u) = mysql_fetch_row($tmp))
60 if ( mysql_result(mysql_query('SELECT COUNT(*) FROM `messages` WHERE `user` = '.$u), 0) )
61 mysql_query('UPDATE `users` SET `level` = '.NEW_USER
.' WHERE `user` = '.$u);
62 echo '<div class="alert">Users updated.</div>',"\n";
65 echo '<h2>Admin Resources</h2>
69 <li><a href="editboard',URL_STRING
,'">Board Editor</a></li>
70 ',( $userinfo['level'] == ADMIN2 ?
'<li><a href="editlevels'.URL_STRING
.'">Level Editor</a></li>' : '' ),'
71 <li><a href="editthemes',URL_STRING
,'">Themes Editor</a></li>
72 <li><a href="editpoll',URL_STRING
,'">Poll Editor</a></li>
75 <h3>Inactive, suspended and banned users</h3>';
77 $list_criteria = '`level` <= '.INACTIVE_USER
;
78 require 'users.inc.php';
82 <li><a href="',$_SERVER['PHP_SELF'],'?purge=1',URL_APPEND
,'">Manual Purge</a></li>
83 <li><a href="',$_SERVER['PHP_SELF'],'?activate=1',URL_APPEND
,'">Activate all inactive users</a></li>
84 ',( $userinfo['level'] == ADMIN2 ?
'<li><a href="'.$_SERVER['PHP_SELF'].'?phpinfo=1">phpinfo()</a></li>' : '' ),'
85 <li>Image check: ',$cfg['img'][0],$cfg['img'][1],$cfg['img'][2],$cfg['img'][3],'</li>