summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCflip <36554078+cflip@users.noreply.github.com>2021-01-27 23:42:56 -0700
committerCflip <36554078+cflip@users.noreply.github.com>2021-01-27 23:42:56 -0700
commit9a7f1194273e4d3cf540ae7b26cfc831d44e0598 (patch)
tree37a7819a9331e496571050a5b98e73046343275f
parent7ebd3e341eca0eb01c1a93e6f3f2007218c0d8cc (diff)
Minor improvements
-rw-r--r--.gitignore1
-rw-r--r--all.php20
-rw-r--r--header.php2
3 files changed, 9 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..600d2d3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.vscode \ No newline at end of file
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';
diff --git a/header.php b/header.php
index be15ba4..c0ccd5c 100644
--- a/header.php
+++ b/header.php
@@ -11,7 +11,7 @@ session_start();
</head>
<body>
<div id="wrapper">
- <h1 id="title">cflip.net forum<sub style="font-size: small;">beta</sub></h1>
+ <h1 id="title">cflip.net forum<sup style="font-size: small;">beta</sup></h1>
<nav>
<a class="nav_button" href="index.php">Home</a>
<a class="nav_button" href="create_thread.php">Create a thread</a>