コード例 #1
0
ファイル: reports.php プロジェクト: kamilpacaq/drydock
     $reports = $db->gettopreports($boardid);
 } else {
     $board_folder = "";
     // Clear $board if the getboardnumber call failed
     $reports = $db->gettopreports();
 }
 // Populate each report with post and image information as well
 foreach ($reports as $report) {
     // Basic post information
     $report['post'] = $db->getsinglepost($report['postid'], $report['board']);
     // Add in the thread location (globalid)
     if ($report['post']['thread'] == 0) {
         $report['post']['thread_globalid'] = $report['post']['globalid'];
     } else {
         // Get the thread globalid
         $loc_array = $db->getpostlocation($report['post']['thread']);
         $report['post']['thread_globalid'] = $loc_array['thread_loc'];
     }
     // Add in images
     $report['post']['images'] = $db->getimgs($report['post']['imgidx']);
     // Round off report information
     $report['category'] = round($report['avg_category']);
     $processed_reports[] = $report;
 }
 // Get the boards array, to show a list for filtering
 $boards = array();
 $boards = $db->getboard();
 // No parameters means everything gets fetched
 $sm = sminit("adminreports.tpl", null, "_admin", true);
 // Admin mode means NO caching. (and we provided a null id anyway)
 // These can be pretty big, so we're going to assign by reference.