Subversion Repositories taios

Rev

Rev 278 | Rev 484 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?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.');
}

?>