summaryrefslogtreecommitdiff
path: root/all.php
diff options
context:
space:
mode:
Diffstat (limited to 'all.php')
-rw-r--r--all.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/all.php b/all.php
index 2588a38..c8bbc75 100644
--- a/all.php
+++ b/all.php
@@ -1,12 +1,6 @@
-<?php include_once 'header.php';?>
+<?php
-<table>
-<tr>
- <th class="left">Latest Threads</th>
- <th class="right">Latest Post</th>
-</tr>
-
-<?php
+include_once 'header.php';
include_once 'includes/db_inc.php';
include_once 'includes/functions_inc.php';
@@ -15,14 +9,14 @@ $sql = "SELECT thread_id, thread_subject, thread_date, user_id, user_name, cat_i
$result = mysqli_query($dbc, $sql);
if (!$result) {
- die('Error trying to display threads: ' . mysqli_error($dbc));
+ die('<section>Failed to fetch threads from server! <br>' . mysqli_error($dbc) . '</section>');
}
+echo '<table><tr><th class="left">Latest Threads</th><th class="right">Latest Post</th></tr>';
+
display_threads($dbc, $result, true);
mysqli_free_result($result);
-?>
-
-</table>
+echo '</table>';
-<?php include_once 'footer.php';?> \ No newline at end of file
+include_once 'footer.php';