Beispiel #1
0
         $folder = trim($_POST['foldernew']);
         if ($name == "") {
             THdie("You must provide a valid board name!");
         }
         if ($folder == "") {
             THdie("You must provide a valid folder name!");
         }
         // Make sure we don't have a folder name conflict
         $folder_exists = $db->getboardnumber($folder);
         if ($folder_exists != null) {
             THdie("An existing board already has a folder named \"" . $folder . "\"!");
         }
         $about = $_POST['aboutnew'];
         $rules = $_POST['rulesnew'];
         // This will return the last insert ID.
         $id = $db->makeboard($name, $folder, $_POST['aboutnew'], $_POST['rulesnew']);
         $actionstring = "Board add\tid:" . $id;
         writelog($actionstring, "admin");
         if ($_POST['nextaction'] == "edit") {
             $location = THurl . "admin.php?a=b&boardselect=" . $folder;
         } else {
             $location = THurl . "admin.php?a=b";
         }
     }
 }
 //print_r($boards);
 $sm->clear_all_cache();
 $sm->clear_compiled_tpl();
 rebuild_filters();
 rebuild_capcodes();
 rebuild_htaccess();