From 2ae22c4a438dc3c1822b8d909a4b38a211427bee Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Sat, 5 Jun 2021 11:57:12 -0600 Subject: Use different syntax for conditions in HTML --- includes/templates/404.php | 20 +++++---- index.php | 104 ++++++++++++++++++++++----------------------- signin.php | 30 ++++++------- viewcategory.php | 71 +++++++++++++++---------------- viewthread.php | 69 +++++++++++++----------------- 5 files changed, 142 insertions(+), 152 deletions(-) diff --git a/includes/templates/404.php b/includes/templates/404.php index d4d5128..74db2d6 100644 --- a/includes/templates/404.php +++ b/includes/templates/404.php @@ -1,12 +1,14 @@ -
-The page you requested does not exist.
- + +The page you requested does not exist.
+ diff --git a/index.php b/index.php index dadef39..ac2dd3e 100644 --- a/index.php +++ b/index.php @@ -1,55 +1,55 @@ - + - -- This is the beta test of the forum website, so there are lots of features missing. Since there are no moderation - features built into the website, - for the most part I don't care that much about what is posted here. Some links and buttons may not have any - functionality either! -
-- If you notice a problem or have an idea for a feature that is missing, reply to this thread! -
-Category | -Threads | -Posts | -Latest Thread | -|
---|---|---|---|---|
';
- echo '' . $category->name . '';
- echo ' ' . $category->description . ''; - echo ' | ';
- echo '' . $category->thread_count . ' | '; - echo '' . $category->post_count . ' | '; - if ($latest_thread->has_value()) { - echo '' . $latest_thread->subject . ' '; - echo 'by ' . $latest_thread->author->name . ', ' . $latest_thread->date_created . ' | ';
- } else {
- echo 'No threads yet! | '; - } - echo '
+ This is the beta test of the forum website, so there are lots of features missing. Since there are no moderation + features built into the website, + for the most part I don't care that much about what is posted here. Some links and buttons may not have any + functionality either! +
++ If you notice a problem or have an idea for a feature that is missing, reply to this thread! +
+Category | +Threads | +Posts | +Latest Thread | +|
---|---|---|---|---|
+ = $category->name ?>
+ = $category->description ?> + |
+ = $category->thread_count ?> | += $category->post_count ?> | +get_latest_thread(); if ($latest_thread->has_value()): ?> +
+ = $latest_thread->subject ?>
+ + by = $latest_thread->author->name ?>, = $latest_thread->date_created ?> + |
+
+ No threads yet! | + +
= $current->description; ?>
-= $current->thread_count . ' threads, ' . $current->post_count . ' posts'; ?> -Thread Name | -Latest Post | -|
---|---|---|
' . $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 '
= $current->description; ?>
+ = $current->thread_count . ' threads, ' . $current->post_count . ' posts'; ?> +Thread | +Author | +Date | +Latest Post | +|
---|---|---|---|---|
+ = $thread->subject ?> + | += $thread->author->name ?> | += $thread->date_created ?> | +get_latest_post(); if ($latest_post->has_value()): ?> +by = $latest_post->author->name ?> on = $latest_post->date_created ?> | + +No posts yet! | + +