Exemplo n.º 1
0
     $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
     }
 }
 $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);