コード例 #1
0
ファイル: lookups.php プロジェクト: taqsuqs/drydock
         // Make sure it's valid
         if ($longip === false) {
             THdie("Invalid IP of '" . $single_ip . "' provided.");
         }
         // Get recent reports
         $reports = $db->recentreportsfromip($longip);
         // Get ban history
         $banhistory = $db->getiphistory($longip);
         // Get current ban information, if any
         $banselect = $db->getban($longip, false);
         // don't clear bans (hence the 2nd parameter)
         // Get recent posts
         $posthistory = $db->recentpostsfromip($longip);
         // Set images for each post
         foreach ($posthistory as $post) {
             $post['images'] = $db->getimgs($post['imgidx']);
         }
         // Get the boards array to show folders
         $boards = $db->getboard();
         // No parameters means everything gets fetched
     }
 }
 $sm = sminit("adminlookup.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.
 $sm->assign_by_ref("posthistory", $posthistory);
 $sm->assign_by_ref("banhistory", $banhistory);
 $sm->assign_by_ref("banselect", $banselect);
 $sm->assign_by_ref("reports", $reports);
 $sm->assign_by_ref("boards", $boards);
 $sm->assign("single_ip", $single_ip);
コード例 #2
0
ファイル: reports.php プロジェクト: kamilpacaq/drydock
     $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.
 $sm->assign_by_ref("reports", $processed_reports);
 $sm->assign_by_ref("boards", $boards);
 $sm->assign("board_folder", $board_folder);
 // name of the folder (for filtering)