Display comments from the database.

This commit is contained in:
Jozef Selesi
2008-11-11 20:54:12 +00:00
parent dd9058ada4
commit 752459c64c
5 changed files with 69 additions and 45 deletions
@@ -0,0 +1,15 @@
<? defined("SYSPATH") or die("No direct script access."); ?>
<ul id="gCommentThread">
<? foreach (array_reverse($comments) as $index => $comment): ?>
<li id="gComment-<?= $index; ?>" class="gComment <?= $index % 2 ? 'odd' : 'even' ?>">
<p>
<a href="#" class="gAuthor"><?= $comment->author ?></a>
said <?= round((time() - $comment->datetime)/60) ?> minutes ago
<span class="understate"><?= strftime('%c', $comment->datetime) ?></span>
</p>
<div>
<?= $comment->text ?>
</div>
</li>
<? endforeach; ?>
</ul>