From c23ad7cbf42f9590b4e0418b77c333f9dc7730e7 Mon Sep 17 00:00:00 2001 From: Cflip <36554078+cflip@users.noreply.github.com> Date: Sat, 23 Jan 2021 12:25:51 -0700 Subject: Change terminology from topics to threads --- category.php | 10 ++--- create_topic.php | 99 ----------------------------------------------- header.php | 2 +- includes/db_inc.php | 2 +- includes/register_inc.php | 0 includes/reply_inc.php | 6 +-- index.php | 4 +- setup.sql | 22 +++++------ topic.php | 67 -------------------------------- 9 files changed, 23 insertions(+), 189 deletions(-) delete mode 100644 create_topic.php delete mode 100644 includes/register_inc.php delete mode 100644 topic.php diff --git a/category.php b/category.php index b444ef3..fcc7851 100644 --- a/category.php +++ b/category.php @@ -27,21 +27,21 @@ mysqli_free_result($result); echo ''; -$sql = "SELECT topic_id, topic_subject, topic_date, user_name FROM topics LEFT JOIN users ON topic_author = user_id WHERE topic_cat = " . mysqli_real_escape_string($dbc, $_GET['id']) . " ORDER BY topic_id DESC"; +$sql = "SELECT thread_id, thread_subject, thread_date, user_name FROM threads LEFT JOIN users ON thread_author = user_id WHERE thread_cat = " . mysqli_real_escape_string($dbc, $_GET['id']) . " ORDER BY thread_id DESC"; $result = mysqli_query($dbc, $sql); if (!$result) { - die('Error trying to display topics: ' . mysqli_error($dbc)); + die('Error trying to display threads: ' . mysqli_error($dbc)); } // Display table of posts -echo ''; +echo '
TopicLatest Post
'; while ($row = mysqli_fetch_assoc($result)) { echo ''; + echo '

' . $row['thread_subject'] . '

'; + echo 'by ' . $row['user_name'] . ' on ' . date('M d, Y', strtotime($row['thread_date'])) . ''; } echo '
ThreadLatest Post
'; - echo '

' . $row['topic_subject'] . '

'; - echo 'by ' . $row['user_name'] . ' on ' . date('M d, Y', strtotime($row['topic_date'])) . '
by cflip
01-22-2021 9:34
by cflip
01-22-2021 9:34
'; diff --git a/create_topic.php b/create_topic.php deleted file mode 100644 index 278d0fa..0000000 --- a/create_topic.php +++ /dev/null @@ -1,99 +0,0 @@ -

Create a new topic

'; - -if (!isset($_SESSION['signed_in'])) { - die('You must be signed in to create a topic.'); -} -?> - -
" method="post"> -
-
-
- '; - - while ($row = mysqli_fetch_assoc($result)) { - echo ''; - } - - echo '
'; - ?> -
-
- -
- - - - - \ No newline at end of file diff --git a/header.php b/header.php index 9d57fba..6e13d14 100644 --- a/header.php +++ b/header.php @@ -14,7 +14,7 @@ session_start();

cflip.net forumbeta