-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoff-topic.php
More file actions
78 lines (62 loc) · 2.61 KB
/
off-topic.php
File metadata and controls
78 lines (62 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
include 'config.php';
echo file_get_contents("head.php");
?>
<?php
echo file_get_contents("header.php");
?>
< <div class="container">
<!-- Jumbotron Header -->
<header class="jumbotron fp-jt">
<h1><i class="fa fa-coffee off-topiccat"></i> Off topic questions</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa, ipsam, eligendi, in quo sunt possimus non incidunt odit vero aliquid similique quaerat nam nobis illo aspernatur vitae fugiat numquam repellat.</p>
</header>
<hr>
<!-- Title -->
<div class="col-sm-6 col-md-6">
<h3 class="no-mg-top">Questions</h3>
</div>
<div class="col-sm-6 col-md-6 text-right">
<span class="inline">Sort by: </span>
<div class="btn-group inline" role="group" aria-label="filter">
<a href="#" class="btn btn-primary">Newest</a>
<a href="#" class="btn btn-danger">Highest rated</a>
<a href="#" class="btn btn-success">Most replies</a>
</div>
</div>
<div class="question-container col-sm-12">
<?php
$sql = "SELECT `id`,`title`, `category`, `question`, `author`, `date` FROM r_question WHERE category ='3' ORDER BY `date`";
$result = $dbc->query($sql);
if($result){
while($row = $result->fetch_assoc()){
echo '<div class="question col-md-12">';
echo "<div class=\"title off-topiccat\"><a href=\"ranswer.php?id=$row[id]\"><h3>$row[title]</h3></a></div>";
echo "Author: ";
echo $row["author"];
echo " Date: ";
echo $row["date"];
echo '</div>';
}
}
/*
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<div class="question codecat col-md-12">';
/* echo "Title: " . $row["title"]. " <br>Question: " . $row["question"]. "<br>";*/
/* echo "<div class=\"title col-sm-12\"><a href=\"rquestion.php?id=$row[id]\"><h2>$row[title]</h2></a></div>";
echo '</div>';
}
} else {
echo "0 results";
}*/
$dbc->close();
?>
</div>
<?php
echo file_get_contents("pagefooter.php");
?>
<?php
echo file_get_contents("footer.php");
?>