From efd7a7418ed94e26566ea97e23be9b00048e0c7f Mon Sep 17 00:00:00 2001
From: cflip <36554078+cflip@users.noreply.github.com>
Date: Sun, 21 Mar 2021 20:18:19 -0600
Subject: Start work on search page
---
all-posts.php | 28 ------------------------
search.php | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++
templates/header.php | 6 +++---
3 files changed, 64 insertions(+), 31 deletions(-)
delete mode 100644 all-posts.php
create mode 100644 search.php
diff --git a/all-posts.php b/all-posts.php
deleted file mode 100644
index fabeb3c..0000000
--- a/all-posts.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- All posts - cflip.net forum
-
-
-
- All Posts
-
-
-
\ No newline at end of file
diff --git a/search.php b/search.php
new file mode 100644
index 0000000..d90d0e6
--- /dev/null
+++ b/search.php
@@ -0,0 +1,61 @@
+
+
+
+
+ Search - cflip.net forum
+
+
+
+ Search cflip.net forum
+
+
+ ' . $thread->subject . ' by ' . $thread->author->name . '';
+ }
+ break;
+ case 'post':
+ $posts = get_all_posts($dbc);
+
+ foreach ($posts as $post) {
+ echo 'From ' . $post->thread->subject . '
';
+ $post->display_content();
+ }
+ break;
+ case 'user':
+ break;
+ default:
+ echo 'Could not search: Invalid type!
';
+ break;
+ }
+ }
+ ?>
+
+
\ No newline at end of file
diff --git a/templates/header.php b/templates/header.php
index 526f63b..d7b8b78 100644
--- a/templates/header.php
+++ b/templates/header.php
@@ -1,14 +1,14 @@
cflip.net forumbeta
[Home]
-[All Threads]
-[All Posts]
+[All Threads]
+[All Posts]
[Create a thread]
' . $_SESSION['user_name'] . '\'s Profile] [Log out]';
} else {
- echo 'Sign in or Register an account';
+ echo '[Sign in] or [Register an account]';
}
?>
\ No newline at end of file
--
cgit v1.2.3