Subversion Repositories taios

Compare Revisions

Ignore whitespace Rev 277 → Rev 280

/forums/edit-category.php
2,7 → 2,7
 
require '../_taios.php';
 
$page = new Taios_Page('Add Category', '../');
$page = new Taios_Page('Edit Category', '../');
$page->drawHeader();
$page->drawMiddle();
 
/forums/edit-category-do.php
0,0 → 1,30
<?php
 
require '../_taios.php';
 
$page = new Taios_Page('Edit Category', '../');
 
$page->checkLoggedIn();
 
$id = $page->getPostID();
 
$title = $_POST['title'];
$description = $_POST['description'];
 
if ($page->isUserAdmin($page->getLoggedInUser()))
{
if (empty($title))
{
$page->redirect('edit-category.php?error=No Title Specified');
}
$page->query('UPDATE ForumCategories SET Title = "' . $title . '", Description = "' . $description . '" WHERE ID = ' . $id);
$page->redirect('index.php');
}
else
{
$page->drawError('You do not have permission to access this page.');
}
 
?>