Subversion Repositories taios

Rev

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

Rev Author Line No. Line
1 tom 1
<?php
2
 
3
require '../_taios.php';
4
 
5
$page = new Taios_Page('Blog Posts', '../');
6
$page->drawHeader();
7
write('<h3>Blog</h3>');
8
$page->drawMenuItem('Computing', 'index.php?cat=Computing');
9
$page->drawMiddle();
10
 
11
if ($page->isUserGM($page->getLoggedInUser()))
12
{
13
    write('<p class="bold"><a href="add-post.php">Add Post</a></p>');
14
    write('<br />');
15
}
16
 
13 tom 17
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1');
1 tom 18
for ($i = 0; $i < count($ids); $i++)
19
{
20
    $id = $ids[$i];
21
    $post = $page->getBlogPost($id);
22
 
23
    write('<h3>' . $post->title. '</h3>');
24
    write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>');
25
    write('<p>' . $post->content . '</p>');
26
}
27
 
28
$page->drawFooter();
29
 
30
?>