diff options
Diffstat (limited to 'includes/functions_display.php')
-rw-r--r-- | includes/functions_display.php | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/includes/functions_display.php b/includes/functions_display.php index 479648f..bf9ed64 100644 --- a/includes/functions_display.php +++ b/includes/functions_display.php @@ -86,14 +86,9 @@ function add_quote($dbc, $thread_id, $matches) { } } -function display_posts($dbc, $sql_result) { - echo '<table>'; - $post_index = 1; - $thread_id = $_GET['id']; - +function display_posts($dbc, $thread_id, $sql_result) { while ($row = mysqli_fetch_assoc($sql_result)) { - echo '<tr><th></th><th>' . $post_index . '</th></tr>'; - echo '<tr class="post" id=' . $post_index . '><td>Posted by <a href="user.php?id='. $row['user_id'] .'">' . $row['user_name'] . '</a><br><small>' . date('m/d/Y g:ia', strtotime($row['post_date'])) . '</small></td>'; + echo '#' . $row['post_id'] . ' Posted by <a href="user.php?id='. $row['user_id'] .'">' . $row['user_name'] . '</a> on ' . date('m/d/Y g:ia', strtotime($row['post_date'])) . '<br>'; $post_content = $row['post_content']; @@ -110,9 +105,6 @@ function display_posts($dbc, $sql_result) { // Replace other URLs with links. $post_content = preg_replace('@\b(http(s)?://)([^\s]*?(?:\.[a-z\d?=/_-]+)+)(?![^<]*?(?:</\w+>|/?>))@i', '<a href="http$2://$3">$0</a>', $post_content); - echo '<td class="post-content">' . $post_content . '</td></tr>'; - - $post_index++; + echo $post_content; } - echo '</table>'; }
\ No newline at end of file |