diff options
-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': |