-
Notifications
You must be signed in to change notification settings - Fork 0
/
browse.php
executable file
·59 lines (34 loc) · 1.59 KB
/
browse.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
<table cellspacing="2" cellpadding="0" align="center" border="0" width="99%">
<tr>
<td>
<h1>Browse Quotes</h1>
<?
$numquote = getstatnum(stat_appr);
$numpage = ceil($numquote / qlim);
$lastpage = ceil($numpage);
$navlim = 4;
// printf("NQ: %s<br>NP: %s<br>QL: %s<br>LP: %s<br>", $numquote, $numpage, qlim, $lastpage);
include("browsenav.php");
// calculate offset
$os = ($currpage - 1) * qlim;
// go get those quotes, baby
$res = getbrowsequote($os);
if(is_array($res)) {
for($i=0; $i < count($res); $i++) {
?>
<p class="quote"><a class="quote" href="/?<?=$res[$i][col_qid] ?>">#<?=$res[$i][col_qid] ?></a> <a class="nlquote" href="/?markdn&q=<?=$res[$i][col_qid] ?>">-</a> (<?=$res[$i][col_score] ?>) <a class="nlquote" href="/?markup&q=<?=$res[$i][col_qid] ?>">+</a> [<a class="quote" href="/?markbd&q=<?=$res[$i][col_qid] ?>">sucks</a>]<br />
<br/>
<?=formatentry($res[$i][col_qtext]) ?>
</p>
<?
}
} else {
?>
<p>No quotes to be found! :/</p>
<?
}
include("browsenav.php");
?>
</td>
</tr>
</table>