This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathfaq.php
55 lines (54 loc) · 1.58 KB
/
faq.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
49
50
51
52
53
54
55
<?
require("include/top.php");
$query="SELECT id,question,answer,category FROM faq ORDER BY category ASC";
$result=mysql_query($query);
while($tmp=mysql_fetch_array($result)) {
$faq[]=$tmp;
}
?>
<br>
<table bgcolor="#000000" cellspacing="1" cellpadding="0" width="75%">
<tr>
<td>
<table bgcolor="#000000" cellspacing="1" cellpadding="2">
<tr>
<th bgcolor="#224488">the always incomplete pouët.net faq</th>
</tr>
<tr>
<td bgcolor="#446688">
<? for($i=0;$i<count($faq);$i++): ?>
<? if($faq[$i]["category"]!=$faq[$i-1]["category"]): ?>
<a href="#<? print($faq[$i]["category"]); ?>"><b><? print($faq[$i]["category"]); ?></b></a><br>
<? endif; ?>
--> <a href="#<? print($faq[$i]["id"]); ?>"><? print($faq[$i]["question"]); ?></a><br>
<? if($faq[$i]["category"]!=$faq[$i+1]["category"]): ?>
<br>
<? endif; ?>
<? endfor; ?>
</td>
</tr>
<? for($i=0;$i<count($faq);$i++): ?>
<? if($faq[$i]["category"]!=$faq[$i-1]["category"]): ?>
<tr>
<th bgcolor="#224488"><a name="<? print($faq[$i]["category"]); ?>"><? print($faq[$i]["category"]); ?></a></th>
</tr>
<? endif; ?>
<tr>
<td bgcolor="#446688">
<a name="<? print($faq[$i]["id"]); ?>"><b>:: <? print($faq[$i]["category"]); ?> :: <? print($faq[$i]["question"]); ?></b></a>
</td>
</tr>
<tr>
<td bgcolor="#557799">
<blockquote>
<? print($faq[$i]["answer"]); ?>
</blockquote>
</td>
</tr>
<? endfor; ?>
</table>
</td>
</tr>
</table>
<br>
<? require("include/bottom.php"); ?>