$posthistory = array(); $banhistory = array(); $banselect = array(); $reports = array(); $boards = array(); // Perform some IP lookup things if requested if (isset($_GET['action']) && $_GET['action'] == "iplookup") { $single_ip = trim($_GET['ip']); if ($single_ip != "") { $longip = ip2long($single_ip); // 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 }