Subversion Repositories taios

Rev

Rev 485 | 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
522 muzer 13
write('<p>Tim32 is a ' . (date("Y") - 2000) . '-year-old laptop running Ubuntu Server Edition 14.04.</p>');
485 muzer 14
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>');
483 muzer 15
?>
484 muzer 16
<p>By using this website, you hereby accept cookies being stored on your computer.</p>
169 tom 17
<br />
18
 
393 tom 19
<h3 title="Take the Tim32 challenge: http://tim32.org/challenge/">Latest Blog Posts</h3>
427 tom 20
<p><a href="blog/rss.php">Rss Feed</a></p>
169 tom 21
 
22
<?php
23
 
483 muzer 24
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1 AND Category != "Drafts" ORDER BY DatePosted DESC');
417 tom 25
for ($i = 0; $i < 4 && $i < count($ids); $i++)
169 tom 26
{
27
    $id = $ids[$i];
28
    $post = $page->getBlogPost($id);
476 tom 29
 
30
    $comment_count = 0;
484 muzer 31
    $ids2 = $page->findIDs('BlogPosts', 'WHERE ParentID="' . $id . '"');
476 tom 32
 
522 muzer 33
    write('<a href="blog/post.php?id=' . $id . '"><h3>' . htmlentities($post->title, ENT_QUOTES). '</h3></a>');
34
    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>');
175 tom 35
    write('<p>' . $page->replaceBBCode($post->content) . '</p>');
477 tom 36
    write('<h5 style="color: #666666;">' . count($ids2) . ' Comments</h5>');
169 tom 37
    write('<br />');
38
}
39
 
40
$page->drawFooter();
41
 
42
?>