Rev 287 |
Rev 291 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$page = new Taios_Page
('Forum Post', '../');
$page->drawHeader();
$page->drawMiddle();
$id = $page->getGetID();
$forumPost = $page->getForumPost($id);
write
('<p class="bold"><a href="index.php?parentID=' . $forumPost->category->ID . '">Back to Topics</a></p><br />');
write
('<h3>' . $forumPost->title . '</h3>');
write
('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $forumPost->datePosted) . ' by ' . $forumPost->author->name . ' (' . $forumPost->author->username . ')</h5>');
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 ASC');
for ($i = 0; $i < count($ids); $i++)
{
$forumPost = $page->getForumPost($ids[$i]);
write
('<h4>' . $forumPost->title . '</h4>');
write
('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $forumPost->datePosted) . ' by ' . $forumPost->author->name . ' (' . $forumPost->author->username . ')</h5>');
write
('<p>' . $page->replaceBBCode($forumPost->content) . '</p>');
write
('<br />');
}
$page->drawFooter();
?>