Subversion Repositories taios

Rev

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

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