Rev 134 | Rev 136 | 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('Home'); |
||
6 | $page->drawHeader(); |
||
7 | write('<h3>Pages</h3>'); |
||
8 | $page->drawMenuItem('Biggles', '/~biggles/'); |
||
9 | $page->drawMenuItem('Freddie', '/~freddie/'); |
||
10 | $page->drawMenuItem('Muzer', '/~muzer/'); |
||
11 | $page->drawMenuItem('Sh4rk', '/~szabot/'); |
||
12 | $page->drawMenuItem('Tom', '/~tom/'); |
||
13 | $page->drawMiddle(); |
||
14 | |||
15 | ?> |
||
16 | |||
17 | <p class="bold">Welcome to Tim32!</p> |
||
18 | <p>Tim32 is a 10 year-old laptop running Ubuntu Server Edition 10.04.</p> |
||
19 | <br /> |
||
20 | |||
21 | <h3>Latest Blog Posts</h3> |
||
22 | |||
23 | <?php |
||
24 | |||
135 | tom | 25 | $ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1 AND ORDER BY DatePosted DESC'); |
1 | tom | 26 | for ($i = 0; $i < 5 && $i < count($ids); $i++) |
27 | { |
||
28 | $id = $ids[$i]; |
||
29 | $post = $page->getBlogPost($id); |
||
30 | |||
31 | write('<h4>' . $post->title. '</h4>'); |
||
32 | write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>'); |
||
33 | write('<p>' . $post->content . '</p>'); |
||
34 | write('<br />'); |
||
35 | } |
||
36 | |||
37 | $page->drawFooter(); |
||
38 | |||
39 | ?> |