//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); } $sm->display("adminboard.tpl"); } elseif ($_GET['a'] == "x") {