summaryrefslogtreecommitdiff
path: root/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'search.php')
-rw-r--r--search.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/search.php b/search.php
index 0732129..e5ef9db 100644
--- a/search.php
+++ b/search.php
@@ -27,7 +27,8 @@
</form>
<hr>
<?php
-include_once './includes/db_inc.php';
+include_once './includes/functions_thread.php';
+include_once './includes/functions_post.php';
include_once './includes/model/Thread.php';
include_once './includes/model/Post.php';
@@ -36,7 +37,7 @@ if (!isset($_GET['type'])) {
} else {
switch ($_GET['type']) {
case 'thread':
- $threads = get_all_threads($dbc);
+ $threads = get_all_threads();
foreach ($threads as $thread) {
echo '<p>';
echo '<td><b><a href="viewthread.php?id=' . $thread->id . '">' . $thread->subject . '</a></b>';
@@ -45,11 +46,11 @@ if (!isset($_GET['type'])) {
}
break;
case 'post':
- $posts = get_all_posts($dbc);
+ $posts = get_all_posts();
foreach ($posts as $post) {
echo '<h3>From <a href="viewthread.php?id=' . $post->thread->id . '">' . $post->thread->subject . '</a></h3>';
- $post->display_content($dbc);
+ echo get_post_content($post);
echo '<hr>';
}
break;