-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusers.php
More file actions
61 lines (56 loc) · 1.99 KB
/
Copy pathusers.php
File metadata and controls
61 lines (56 loc) · 1.99 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
<?php
//error_reporting(E_ALL);
//ini_set('display_errors',1);
require_once 'core/init.php';
$pagination = new Pagination('students');
$users = $pagination->get_data();
$pages = $pagination->get_pagination_number();
//pr($users->results());exit;
?>
<!DOCTYPE html>
<html>
<head>
<title>Pagination PDO Class</title>
<style type="text/css">
.active{
background: rgb(23, 169, 201);
color: white;
}
</style>
</head>
<body>
<table class="table table-bordered">
<thead>
<tr>
<th></th>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">ID</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
foreach($users->results() as $v){?>
<tr>
<td><a href="tex">Edit</a></td>
<th scope="row"><?php echo $i;?></th>
<td><?php echo $v->fname;?></td>
<td><?php echo $v->lname;?></td>
<td><?php echo $v->id;?></td>
<td><a href="tex">Delete</a></td>
</tr>
<?php $i++;}?>
</tbody>
</table>
<hr>
<a href="?page=<?php echo $pagination->prev_page().''.$pagination->check_search();?>"> << </a>
<?php for($i=1; $i<=$pages; $i++): ?>
<?php if($pagination->is_showable($i)):?>
<a class="<?php echo $pagination->is_active_class($i) ?>" href="?page=<?php echo $i.''.$pagination->check_search(); ?>"><?php echo $i;?></a>
<?php endif; ?>
<?php endfor; ?>
<a href="?page=<?php echo $pagination->next_page().''.$pagination->check_search();?>"> >> </a>
</body>
</html>