_abuse_admin_general

Definition

_abuse_admin_general($status)
abuse/abuse.module, line 384

Code

<?php
function _abuse_admin_general($status) {
  $limit = (empty($_GET['limit'])) ? 10 : $_GET['limit'];
  
  $content = '';
  // $result = db_query("SELECT type, oid FROM {abuse_status} WHERE status=%d ORDER BY changed DESC", $status);
  $result = pager_query("SELECT type, oid FROM {abuse_status} WHERE status = %d ORDER BY changed DESC", $limit, 0, NULL, $status);
  
  $reports = array();
  while ($object = db_fetch_object($result)) {
    $reports[] = _abuse_load($object->type, $object->oid);
  }
  //TODO CREATE A PAGED SOLUTION
  $content = theme('abuse_page', $reports);
  $content .= theme('pager', NULL, $limit, 0);
  return $content;
}
?>