} // 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); // IP string // Show it! $sm->display("adminlookup.tpl", null);
$sm->assign("THuseSVG", THuseSVG); $sm->assign("THuseSWFmeta", THuseSWFmeta); $sm->assign("THSVGthumbnailer", THSVGthumbnailer); //Assign other template sets $sets = array(); //Read template sets $it = opendir(THpath . "tpl/"); while (($set = readdir($it)) !== false) { if (in_array($set, array(".", "..", "_admin", ".svn", "_compd", "profiles")) == false && is_dir(THpath . "tpl/" . $set)) { $sets[] = $set; } } $sm->assign_by_ref("tplsets", $sets); if (isset($_GET['boardselect'])) { //Configure options for a specific board $boardselect = $db->getboard(0, $_GET['boardselect']); // Should return an array of assoc-arrays (but with only one assoc-array) if ($boardselect) { $sm->assign("boardselect", $db->escape_string($_GET['boardselect'])); $sm->assign("board", $boardselect[0], $sm); } else { THdie("Invalid board ID provided."); } } else { //Board list if (THdbtype == null) { //Can't access this unless the database is set up. THdie("ADdbfirst"); } $brds = $db->getindex(array('full' => true), $sm); $sm->assign("boards", $brds);