From 6c9369ad85f2fb3dc61234b54db7e7079cdc0c4e Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Fri, 23 Apr 2021 18:43:12 -0600 Subject: Refactoring part 1 --- viewcategory.php | 68 +++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 35 deletions(-) (limited to 'viewcategory.php') diff --git a/viewcategory.php b/viewcategory.php index e10797a..70733da 100644 --- a/viewcategory.php +++ b/viewcategory.php @@ -1,6 +1,6 @@ get_from_database($_GET['id'], $dbc); if ($result == 0) { http_response_code(404); - include_once 'templates/404.php'; + include('includes/templates/404.php'); die(); } } ?> - +
-= $current->description; ?>
- - = $current->thread_count . ' threads, ' . $current->post_count . ' posts'; ?> - -Thread Name | -Latest Post | -
---|
Thread Name | +Latest Post | +|
---|---|---|
' . $thread->subject . ''; - echo ' by ' . $thread->author->name . ' on ' . date('M d, Y', strtotime($thread->date_created)) . ' | '; + echo '||
' . $thread->subject . ''; + echo ' by ' . $thread->author->name . ' on ' . date('M d, Y', strtotime($thread->date_created)) . ' | '; - if (!is_null($latest_post)) { - echo 'by ' . $latest_post->author->name . ' on ' . $latest_post->date_created . ' | '; - } else { - echo 'No posts yet! | '; - } - - echo 'by ' . $latest_post->author->name . ' on ' . $latest_post->date_created . ' | '; + } else { + echo 'No posts yet! | '; } - ?> -