Rev 483 | Rev 485 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 169 | tom | 1 | <?php |
| 2 | |||
| 3 | require '_taios.php'; |
||
| 4 | |||
| 5 | $page = new Taios_Page('Home'); |
||
| 6 | $page->drawHeader(); |
||
| 7 | $page->drawMiddle(); |
||
| 8 | |||
| 9 | ?> |
||
| 10 | |||
| 11 | <p class="bold">Welcome to Tim32!</p> |
||
| 483 | muzer | 12 | <?php |
| 13 | write('<p>Tim32 is a ' . (date("Y") - 2000) . '-year-old laptop running Ubuntu Server Edition 10.04.</p>'); |
||
| 14 | ?> |
||
| 484 | muzer | 15 | <p>By using this website, you hereby accept cookies being stored on your computer.</p> |
| 169 | tom | 16 | <br /> |
| 17 | |||
| 393 | tom | 18 | <h3 title="Take the Tim32 challenge: http://tim32.org/challenge/">Latest Blog Posts</h3> |
| 427 | tom | 19 | <p><a href="blog/rss.php">Rss Feed</a></p> |
| 169 | tom | 20 | |
| 21 | <?php |
||
| 22 | |||
| 483 | muzer | 23 | $ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1 AND Category != "Drafts" ORDER BY DatePosted DESC'); |
| 417 | tom | 24 | for ($i = 0; $i < 4 && $i < count($ids); $i++) |
| 169 | tom | 25 | { |
| 26 | $id = $ids[$i]; |
||
| 27 | $post = $page->getBlogPost($id); |
||
| 476 | tom | 28 | |
| 29 | $comment_count = 0; |
||
| 484 | muzer | 30 | $ids2 = $page->findIDs('BlogPosts', 'WHERE ParentID="' . $id . '"'); |
| 476 | tom | 31 | |
| 32 | write('<a href="blog/post.php?id=' . $id . '"><h3>' . $post->title. '</h3></a>'); |
||
| 169 | tom | 33 | write('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')</h5>'); |
| 175 | tom | 34 | write('<p>' . $page->replaceBBCode($post->content) . '</p>'); |
| 477 | tom | 35 | write('<h5 style="color: #666666;">' . count($ids2) . ' Comments</h5>'); |
| 169 | tom | 36 | write('<br />'); |
| 37 | } |
||
| 38 | |||
| 39 | $page->drawFooter(); |
||
| 40 | |||
| 41 | ?> |