Subversion Repositories taios

Rev

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

Rev Author Line No. Line
278 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Edit Category', '../');
6
 
7
$page->checkLoggedIn();
8
 
9
$id = $page->getPostID();
10
 
11
$title = $_POST['title'];
12
$description = $_POST['description'];
13
 
14
if ($page->isUserAdmin($page->getLoggedInUser()))
15
{
16
    if (empty($title))
17
    {
18
        $page->redirect('edit-category.php?error=No Title Specified');
19
    }
20
 
279 tom 21
    $page->query('UPDATE ForumCategories SET Title = "' . $title . '", Description = "' . $description . '" WHERE ID = ' . $id);
278 tom 22
    $page->redirect('index.php');
23
}
24
else
25
{
26
    $page->drawError('You do not have permission to access this page.');
27
}
28
 
29
?>
30