/forums/post.php |
---|
12,6 → 12,10 |
write('<h3>' . $forumPost->title . '</h3>'); |
write('<p>' . $page->replaceBBCode($forumPost->content) . '</p>'); |
if ($page->isLoggedIn()) |
{ |
write('<p class="bold"><a href="add-post.php?parentID=' . $id . '">Post Reply</a></p>'); |
} |
write('<br />'); |
$ids = $page->findIDs('ForumPosts', 'WHERE ParentID = ' . $id . ' ORDER BY DatePosted DESC'); |
/forums/add-post-do.php |
---|
0,0 → 1,36 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Add Category', '../'); |
$page->checkLoggedIn(); |
$parentID = $_POST['parentID']; |
if (empty($parentID)) |
{ |
$parentID = -1; |
} |
$categoryID = $_POST['categoryID']; |
if (empty($categoryID)) |
{ |
$parentID = -1; |
} |
$title = $_POST['title']; |
$content = $_POST['content']; |
if (empty($title)) |
{ |
$page->redirect('add-post.php?error=No Title Specified'); |
} |
if (empty($title)) |
{ |
$page->redirect('add-post.php?error=No Content Specified'); |
} |
$page->query('INSERT INTO ForumPosts VALUES (0, ' .$page->getLoggedInUser()->ID . ', ' . $categoryID . ', ' . $parentID . ', "' . $title . '", "' . $content . '", NOW(), FALSE)'); |
$page->redirect('index.php?parentID=' . $categoryID); |
?> |
/forums/add-post.php |
---|
2,7 → 2,7 |
require '../_taios.php'; |
$page = new Taios_Page('Add Category', '../'); |
$page = new Taios_Page('Add Post', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
40,7 → 40,7 |
</tr> |
<tr> |
<td class="bold">Content: </td> |
<td><input type="text" name="content" /></td> |
<td><textarea name="content"></textarea></td> |
</tr> |
<tr> |
<td></td> |