$category->createBoard($currentUser, clean($_POST["title"], true), clean($_POST["editableContent"], true))->save($con); } $printContent .= $category->printCategory($currentUser); } } } } if (empty($printContent)) { header("Location: forum.php"); die; } } else { if ($_GET["a"] == "new" && $_POST["title"]) { $category = new Category(-1, clean($_POST["title"]), -1, false); $category->save($con); } $printContent .= Category::printAll($currentUser, $con); } if ($currentUser->hasPermission($create_categories)) { $newCategory .= "\r\n <span class='forum_menu'>\r\n <form action='{$_SERVER['PHP_SELF']}?a=new' method='post'>\r\n <input type='text' name='title'>\r\n <input type='submit' value='Add Category'>\r\n </form>\r\n </span>"; } $content = "\r\n <div class='forum'>\r\n <div id='forum_notifications' class='notification'></div>\r\n <span>Current Time: " . date("F j, Y, g:i a", time()) . "</span>\r\n {$newCategory}\r\n <div style='clear'></div><br />\r\n " . $printContent . "\r\n </div>\t\t\t\r\n <br/><br/>\r\n <div id='fade' class='black_overlay' onclick=\"closeLightBox()\"></div>"; /** * Include this in your header. */ $head = "\r\n\t\t\r\n <link href=\"forum/css/button.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n <link href=\"forum/css/breadcrum.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n <link href=\"forum/css/pagination.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n <link href=\"forum/css/forum.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n \t\t<script type='text/javascript' src='{$jquery_path}'></script>\r\n \t\t<script type='text/javascript' src='{$editor_js_path}'></script>\r\n \t\t<script type='text/javascript' src='forum/js/forum.js'></script>"; /** * Echo the variable $head in your head and $content in the place where you have your main body. */ require_once "template.php"; mysql_close($con);