-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfaqbook.php
68 lines (65 loc) · 1.42 KB
/
faqbook.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
56
57
58
59
60
61
62
63
64
65
66
67
68
<?
// support.php - A support center :)
unset( $_SESSION['ingame'] );
include "includes/utility.inc.php";
include "includes/header.php";
$fquery = $db->query( "SELECT * FROM faqbook ORDER BY id ASC" );
$fquery2 = $db->query( "SELECT * FROM faqbook ORDER BY id ASC" ); // Why? Because fetch_array aparently isn't reuseable.
if ( $db->getRowCount( $fquery ) == 0 )
{
?>
<div class="title">
<div style="margin-left: 10px;">Red Republic FAQ Book</div>
</div>
<div class="content">
<p>There were no questions found in the FAQ Book database.</p>
</div>
<?
} else {
?>
<div class="title">
<div style="margin-left: 10px;">Table of Contents</div>
</div>
<div class="content">
<p>
<ul>
<?
while ( $cont = $db->fetch_array( $fquery ) )
{
?>
<li><?=$cont['question'];?></li>
<?
}
?>
</ul>
</p>
</div>
<div class="title">
<div style="margin-left: 10px;">FAQ Book</div>
</div>
<div class="content"><p>
<?
while ( $faq = $db->fetch_array( $fquery2 ) )
{
?>
<div class="row">
<div style="margin-left: 10px;"><font color='red'><?=$faq['question'];?></font></div>
</div>
<div class="content"><font color='#295374'>
<p>
<?
$content = str_replace( chr( 13 ), "<br />", $faq['answer'] );
print( $content );
if ( strlen( $faq['credit'] ) > 0 ) print("<br /><br />Credited: " . $faq['credit'] );
?>
</p>
</font>
</div>
<?
}
?></p>
</div>
<?
}
include "includes/footer.php";
?>