Example #1
0
         //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") {
     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);