0,0 → 1,36 |
<?php |
|
require '../_taios.php'; |
|
$page = new Taios_Page('Add Category', '../'); |
|
$page->checkLoggedIn(); |
|
$parentID = $_POST['parentID']; |
if (empty($parentID)) |
{ |
$parentID = -1; |
} |
$categoryID = $_POST['categoryID']; |
if (empty($categoryID)) |
{ |
$parentID = -1; |
} |
|
$title = $_POST['title']; |
$content = $_POST['content']; |
|
if (empty($title)) |
{ |
$page->redirect('add-post.php?error=No Title Specified'); |
} |
if (empty($title)) |
{ |
$page->redirect('add-post.php?error=No Content Specified'); |
} |
|
$page->query('INSERT INTO ForumPosts VALUES (0, ' .$page->getLoggedInUser()->ID . ', ' . $categoryID . ', ' . $parentID . ', "' . $title . '", "' . $content . '", NOW(), FALSE'); |
$page->redirect('index.php?parentID=' . $categoryID); |
|
?> |
|