Subversion Repositories taios

Rev

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

Rev Author Line No. Line
284 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Add Category', '../');
6
 
7
$page->checkLoggedIn();
8
 
9
$parentID = $_POST['parentID'];
10
if (empty($parentID))
11
{
12
    $parentID = -1;
13
}
14
$categoryID = $_POST['categoryID'];
15
if (empty($categoryID))
16
{
17
    $parentID = -1;
18
}
19
 
20
$title = $_POST['title'];
21
$content = $_POST['content'];
22
 
23
if (empty($title))
24
{
25
    $page->redirect('add-post.php?error=No Title Specified');
26
}
27
if (empty($title))
28
{
29
    $page->redirect('add-post.php?error=No Content Specified');
30
}
31
 
285 tom 32
$page->query('INSERT INTO ForumPosts VALUES (0, ' .$page->getLoggedInUser()->ID  . ', ' . $categoryID . ', ' . $parentID . ', "' . $title . '", "' . $content . '", NOW(), FALSE)');
284 tom 33
$page->redirect('index.php?parentID=' . $categoryID);
34
 
35
?>
36