-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintPagination.php
More file actions
executable file
·63 lines (55 loc) · 1.44 KB
/
Copy pathintPagination.php
File metadata and controls
executable file
·63 lines (55 loc) · 1.44 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
<?php
class IntPagination
{
public function viewPagination($pagesVector, $baseLink, $currentPage)
{
?>
<div class="center" style="width:248px;"><?php
for($i = 0; $i <= 6; $i++) {
if($pagesVector[$i][0])
$this->link($i, $pagesVector[$i][1], $baseLink, $currentPage);
else
$this->text($i, $pagesVector[$i][1]);
}
?></div>
<?php
}
public function link($position, $page, $baseLink, $currentPage)
{
?>
<a
href="<?php echo $baseLink . "?page=" . $page; ?>"
class="button-square<?php
if(($page == $currentPage) && ($position != 0) && ($position != 6))
echo " button-active"; ?>"
><?php
if($position == 0) echo "«";
else if($position == 6) echo "»";
else echo $page;
?></a>
<?php
}
public function text($position, $page)
{
?>
<p class="button-square button-inactive"><?php
if($position == 0) echo "«";
else if($position == 6) echo "»";
else echo $page;
?></p>
<?php
}
public function viewStats($showing)
{
?>
<div class="center" style="width:260px; text-align:center;">
<span style="font-size: 13px; font-family: Arial, Helvetica, sans-serif, sans-serif;">
Showing results
<b><?php echo $showing[0]; ?></b> to <b><?php echo $showing[1]; ?></b>,
from <b><?php echo $showing[2]; ?></b>.
</span>
</div>
<?php
}
}
?>