Rev 44 |
Rev 60 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '../_taios.php';
$page = new Taios_Page
('Blog Posts', '../');
$page->drawHeader();
write
('<h3>Blog</h3>');
$page->drawMenuItem('Computing', 'index.php?cat=Computing');
$page->drawMiddle();
if ($page->isUserGM($page->getLoggedInUser()))
{
write
('<p class="bold"><a href="add-post.php?id=-1">Add Post</a></p>');
write
('<br />');
}
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1');
for ($i = 0; $i < count($ids); $i++)
{
$id = $ids[$i];
$post = $page->getBlogPost($id);
write
('<a href="post.php?id=' . $ids[$i] . '"><h3>' . $post->title. '</h3></a>');
write
('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>');
write
('<p>' . $post->content . '</p>');
}
$page->drawFooter();
?>