(root)/forums/add-category-do.php - Rev 446
Rev 268 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$page = new Taios_Page
('Add Category', '../');
$page->checkLoggedIn();
$parentID = $_POST['parentID'];
if (empty($parentID))
{
$parentID = -1;
}
$title = $_POST['title'];
$description = $_POST['description'];
if ($page->isUserAdmin($page->getLoggedInUser()))
{
if (empty($title))
{
$page->redirect('add-category.php?error=No Title Specified');
}
$page->query('INSERT INTO ForumCategories VALUES (0, ' . $parentID . ', "' . $title . '", "' . $description . '")');
$page->redirect('index.php?parentID=' . $parentID);
}
else
{
$page->drawError('You do not have permission to access this page.');
}
?>