Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 404.shtml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ a {

<body>
<div class="container text-center" id="error">
<div><a href = "/">Back to Home</a></div>
<svg height="100" width="100">
<polygon points="50,25 17,80 82,80" stroke-linejoin="round" style="fill:none;stroke:#ff8a00;stroke-width:8" />
<text x="42" y="74" fill="#ff8a00" font-family="sans-serif" font-weight="900" font-size="42px">!</text>
Expand Down
Binary file modified images/unavailable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions pages/Interesting.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

session_start();

Expand All @@ -15,7 +15,7 @@
<div class = "col-sm-10">
<h1>Interesting Questions</h1>

<?php
<?php

define('DISPLAY', 10);

Expand All @@ -26,7 +26,7 @@
$q = "SELECT topic_id FROM `followed-topics` WHERE user_id = {$_SESSION['id']}";
$r = mysqli_query($dbc, $q);
$followedtopics = [];
while ($followrow = mysqli_fetch_array($r, MYSQLI_NUM))
while ($followrow = mysqli_fetch_array($r, MYSQLI_NUM))
$followedtopics[] = $followrow[0];

$following = join("\",\"", $followedtopics);
Expand Down Expand Up @@ -69,7 +69,7 @@
T1.msg_id = T2.parent_id
WHERE T1.topic_id IN ("' . $following . '")
ORDER BY
' . $order_by . ' LIMIT ' . $start . ', ' . DISPLAY;
' . $order_by . ' LIMIT ' . $start . ', ' . DISPLAY;
} else {
$q = 'SELECT
T1.votes AS votes, T1.msg_id AS msg_id, T1.subject AS subject, T1.date_posted AS date_posted, T1.topic_id, T1.name AS topic_name, IFNULL(T2.answers, 0) AS answers
Expand Down Expand Up @@ -109,7 +109,7 @@
WHERE T1.topic_id IN ("' . $following . '") AND T2.answers IS NULL
ORDER BY date_posted LIMIT ' . $start . ', ' . DISPLAY;
}
echo $q;

$result = mysqli_query($dbc, $q);
?>

Expand All @@ -120,7 +120,7 @@
<a class = "<?php echo $sort == 'unanswered' ? 'active': ''; ?>"href = "/Questions/Interesting?sort=unanswered">Unanswered</a>
</div>

<?php
<?php
echo "<table class = 'question-list'>";
while ($row = @mysqli_fetch_array($result, MYSQLI_ASSOC)) { // Loop through the records in an associative array
$timeelapsed = $row['date_posted'] . " days ago";
Expand Down Expand Up @@ -159,4 +159,3 @@

@include_once('includes/footer.html');
?>