summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/index.php b/index.php
index dcad956..e27a155 100644
--- a/index.php
+++ b/index.php
@@ -42,16 +42,20 @@
echo '<tr>';
echo '<td>';
- echo '<b><a href="category/' . $category->id . '">' . $category->name . '</a></b>';
+ echo '<b><a href="viewcategory.php?id=' . $category->id . '">' . $category->name . '</a></b>';
echo '<br>' . $category->description;
echo '</td>';
echo '<td>' . $category->thread_count . '</td>';
echo '<td>' . $category->post_count . '</td>';
- echo '<td><b><a href="./thread/' . $latest_thread->id . '">' . $latest_thread->subject . '</a></b><br>';
- echo '<small>by <b><a href="./user/' . $latest_thread->author->name . '">' . $latest_thread->author->name . '</a></b>, ' . $latest_thread->date_created . '</small></td>';
+ if (!is_null($latest_thread)) {
+ echo '<td><b><a href="viewthread.php?id=' . $latest_thread->id . '">' . $latest_thread->subject . '</a></b><br>';
+ echo '<small>by <b><a href="viewuser.php?id=' . $latest_thread->author->id . '">' . $latest_thread->author->name . '</a></b>, ' . $latest_thread->date_created . '</small></td>';
+ } else {
+ echo '<td>No threads yet!</td>';
+ }
echo '</tr>';
}
?>
</table>
</body>
-</html> \ No newline at end of file
+</html>