diff options
author | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-07 21:43:29 -0600 |
---|---|---|
committer | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-07 21:43:29 -0600 |
commit | cbda5f04202771699339bf417dc0f08ce95bbca7 (patch) | |
tree | d90d19e5db9a3833545ddc1b7c42d25a7a1996fe | |
parent | 1eccc6053bfdfb535b9533eba2366a4b9cedc1b4 (diff) |
Nicer search results
-rw-r--r-- | search.php | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -37,17 +37,20 @@ switch ($_GET['type']) { case 'thread': $threads = get_all_threads($dbc); - foreach ($threads as $thread) { - echo '<p><b>' . $thread->subject . '</b> by <b>' . $thread->author->name . '</b></p>'; + echo '<p>'; + echo '<td><b><a href="viewthread.php?id=' . $thread->id . '">' . $thread->subject . '</a></b>'; + echo '<small> created by <b><a href="viewuser.php?id=' . $thread->author->id . '">' . $thread->author->name . '</a></b> on ' . date('M d, Y', strtotime($thread->date_created)) . '</small></td>'; + echo '</p>'; } break; case 'post': $posts = get_all_posts($dbc); foreach ($posts as $post) { - echo '<h4>From ' . $post->thread->subject . '</h4>'; + echo '<h3>From <a href="viewthread.php?id=' . $post->thread->id . '">' . $post->thread->subject . '</a></h3>'; $post->display_content($dbc); + echo '<hr>'; } break; case 'user': |