Exemple #1
0
         }
         $brds = $db->getindex(array('full' => true), $sm);
         $sm->assign("boards", $brds);
     }
     $sm->display("adminboard.tpl");
 } elseif ($_GET['a'] == "x") {
     if (THdbtype == null) {
         //Can't access this unless the database is set up.
         THdie("ADdbfirst");
     }
     //Ban config
     if (isset($_GET['banselect'])) {
         //Edit a specific ban
         $sm->assign("banselect", $_GET['banselect']);
         // Get the individual ban in question
         $single_ban_assoc = $db->getbanfromid($_GET['banselect']);
         $sm->assign("ban", $single_ban_assoc, $sm);
         // Next we fetch all history for the ban.
         // Substitute in 0 for the subnets
         $ip3 = 0;
         if ($single_ban_assoc['ip_octet3'] > -1) {
             $ip3 = $single_ban_assoc['ip_octet3'];
         }
         $ip4 = 0;
         if ($single_ban_assoc['ip_octet4'] > -1) {
             $ip4 = $single_ban_assoc['ip_octet4'];
         }
         $ip = ip2long($single_ban_assoc['ip_octet1'] . "." . $single_ban_assoc['ip_octet2'] . "." . $ip3 . "." . $ip4);
         // Get history for the IP
         $rawhist = $db->getiphistory($ip);
         if ($rawhist != null) {