(root)/index.php @ 67 - Rev 522
Rev 485 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
<?php
require '_taios.php';
$page = new Taios_Page
('Home');
$page->drawHeader();
$page->drawMiddle();
?>
<p class="bold">Welcome to Tim32!</p>
<?php
write
('<p>Tim32 is a ' . (date("Y") - 2000) . '-year-old laptop running Ubuntu Server Edition 14.04.</p>');
write
('<p>On the other hand, Tim36 (which is serving this page) is a ' . (date("Y") - 2007) . '-year-old laptop running Ubuntu Server Edition 10.04.</p>');
?>
<p>By using this website, you hereby accept cookies being stored on your computer.</p>
<br />
<h3 title="Take the Tim32 challenge: http://tim32.org/challenge/">Latest Blog Posts</h3>
<p><a href="blog/rss.php">Rss Feed</a></p>
<?php
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1 AND Category != "Drafts" ORDER BY DatePosted DESC');
for ($i = 0; $i < 4 && $i < count($ids); $i++)
{
$id = $ids[$i];
$post = $page->getBlogPost($id);
$comment_count = 0;
$ids2 = $page->findIDs('BlogPosts', 'WHERE ParentID="' . $id . '"');
write
('<a href="blog/post.php?id=' . $id . '"><h3>' . htmlentities($post->title, ENT_QUOTES). '</h3></a>');
write
('<h5 style="color: #666666;">Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . htmlentities($post->user->name, ENT_QUOTES) . ' (' . htmlentities($post->user->username, ENT_QUOTES) . ')</h5>');
write
('<p>' . $page->replaceBBCode($post->content) . '</p>');
write
('<h5 style="color: #666666;">' . count($ids2) . ' Comments</h5>');
write
('<br />');
}
$page->drawFooter();
?>