forked from Microsheep/2015-NCTU_newcomer_web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQA.php
48 lines (48 loc) · 1.61 KB
/
QA.php
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
<?php
include_once("./header.php");
?>
<br>
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-10">
<?php
if($_GET["id"]<=0||$_GET["id"]>$QA_count){
$id=0;
}
else{
$id=$_GET["id"];
}
if($id!=0){
echo "<img src=./asset/QA/" . $id . ".jpg style=\"width: 100%\">";
}
echo "<br><br>";
echo "<div class=\"panel panel-success\">";
echo "<div class=\"panel-heading\">";
echo "<h3 class=\"panel-title\">" . $QA[$id]["head"] . "</h3>";
echo "</div>";
echo "<div class=\"panel-body\">";
echo "<h4 style=\"line-height: 200%\">" . $QA[$id]["info"] . "</h4>";
echo "</div>";
echo "</div>";
?>
<nav>
<ul class="pager">
<?php
if($id>1 && $id<=($QA_count)){
echo "<li class=\"previous\"><a href=\"./QA.php?id=" . ($id-1) . "\"><span aria-hidden=\"true\">←</span>上一篇精選問題</a></li>";
}
echo "<li class=\"center\"><a href=\"./QA_list.php\">回到精選問題列表</a></li>";
if($id>0 && $id<=($QA_count-1)){
echo "<li class=\"next\"><a href=\"./QA.php?id=" . ($id+1) . "\">下一篇<span aria-hidden=\"true\">→</span></a></li>";
}
?>
</ul>
</nav>
</div>
<div class="col-md-1">
</div>
</div>
<?php
include_once("footer.php");
?>