diff options
author | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-07 11:44:11 -0600 |
---|---|---|
committer | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-07 11:44:11 -0600 |
commit | d61a18a93bc1b39d91725497ebb2fe85c4785ead (patch) | |
tree | 20403b00b2672c2183966989173d9dec2f4523dc /index.php | |
parent | 6dd221f59e4b8fd0c824ee9831b6efdbecb3aee7 (diff) |
Update links, rename files
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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> |