2012-05-16 07:31:36 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
function admin_content(&$a) {
|
|
|
|
if(! $_SESSION['uid']) {
|
|
|
|
notice("Permission denied.");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-06-20 01:32:43 +02:00
|
|
|
$r = q("SELECT COUNT(*) FROM `flag` as `ftotal` WHERE 1");
|
2012-05-16 07:31:36 +02:00
|
|
|
if(count($r))
|
|
|
|
$a->set_pager_total($r[0]['ftotal']);
|
|
|
|
|
|
|
|
$r = q("SELECT * FROM `flag` WHERE 1 ORDER BY `total` DESC LIMIT %d, %d ",
|
|
|
|
intval($a->pager['start']),
|
|
|
|
intval($a->pager['itemspage'])
|
|
|
|
);
|
|
|
|
|
|
|
|
if(! count($r)) {
|
|
|
|
notice("No entries.");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(count($r)) {
|
|
|
|
foreach($r as $rr) {
|
|
|
|
if($rr['reason'] == 1)
|
|
|
|
$str = 'censor';
|
|
|
|
if($rr['reason'] == 2)
|
|
|
|
$str = 'dead';
|
|
|
|
$o .= '<a href="' . 'moderate/' . $rr['pid'] . '/' . $str . '">'
|
|
|
|
. $str . ' profile: ' . $rr['pid'] . ' (' . $rr['total'] . ')</a><br />';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$o .= paginate($a);
|
|
|
|
return $o;
|
|
|
|
}
|