Subversion Repositories taios

Rev

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

Rev Author Line No. Line
255 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Forum Post', '../');
6
$page->drawHeader();
7
$page->drawMiddle();
8
 
9
$id = $page->getGetID();
10
$forumPost = $page->getForumPost($id);
256 tom 11
write('<p class="bold"><a href="index.php?parentID=' . $forumPost->category->ID . '">Back to Topics</a></p><br />');
12
 
13
write('<h3>' . $forumPost->title . '</h3>');
257 tom 14
write('<p>' . $page->replaceBBCode($forumPost->content) . '</p>');
286 tom 15
if ($page->isLoggedIn())
16
{
17
    write('<p class="bold"><a href="add-post.php?parentID=' . $id . '">Post Reply</a></p>');
18
}
255 tom 19
write('<br />');
20
 
287 tom 21
$ids = $page->findIDs('ForumPosts', 'WHERE ParentID = ' . $id . ' ORDER BY DatePosted ASC');
255 tom 22
for ($i = 0; $i < count($ids); $i++)
23
{
24
    $forumPost = $page->getForumPost($ids[$i]);
25
write('<h4>' . $forumPost->title . '</h4>');
257 tom 26
write('<p>' . $page->replaceBBCode($forumPost->content) . '</p>');
255 tom 27
write('<br />');
28
}
29
 
30
$page->drawFooter();
31
 
32
?>
33