From d61a18a93bc1b39d91725497ebb2fe85c4785ead Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Wed, 7 Apr 2021 11:44:11 -0600 Subject: Update links, rename files --- viewcategory.php | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 viewcategory.php (limited to 'viewcategory.php') diff --git a/viewcategory.php b/viewcategory.php new file mode 100644 index 0000000..ebdc03f --- /dev/null +++ b/viewcategory.php @@ -0,0 +1,69 @@ +get_from_database($_GET['id'], $dbc); + if ($result == 0) { + http_response_code(404); + include_once 'templates/404.php'; + die(); + } +} +?> + + + + <?php echo $current->name; ?> - cflip.net forum + + + +

name; ?>

+

description; ?>

+ thread_count . ' threads, ' . $current->post_count . ' posts'; ?> +

Threads

+ + + + + + date_lastpost); + $db = strtotime($b->date_lastpost); + + if ($da == $db) return 0; + + return ($da > $db) ? -1 : 1; + } + + $threads = $current->get_threads($dbc); + usort($threads, "cmp"); + + foreach ($threads as $thread) { + $latest_post = $thread->get_latest_post($dbc); + + echo ''; + echo ''; + + if (!is_null($latest_post)) { + echo ''; + } else { + echo ''; + } + + echo ''; + } + ?> +
Thread NameLatest Post
' . $thread->subject . ''; + echo ' by ' . $thread->author->name . ' on ' . date('M d, Y', strtotime($thread->date_created)) . 'by ' . $latest_post->author->name . ' on ' . $latest_post->date . 'No posts yet!
+ + -- cgit v1.2.3