-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathread_users.php
43 lines (30 loc) · 943 Bytes
/
read_users.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
<?php
// core configuration
include_once "../config/core.php";
// check if logged in as admin
include_once "login_checker.php";
// include classes
include_once '../config/database.php';
include_once '../objects/user.php';
// get database connection
$database = new Database();
$db = $database->getConnection();
// initialize objects
$user = new User($db);
// set page title
$page_title = "Users";
// include page header HTML
include_once "layout_head.php";
echo "<div class='col-md-12'>";
// read all users from the database
$stmt = $user->readAll($from_record_num, $records_per_page);
// count retrieved users
$num = $stmt->rowCount();
// to identify page for paging
$page_url="read_users.php?";
// include products table HTML template
include_once "read_users_template.php";
echo "</div>";
// include page footer HTML
include_once "layout_foot.php";
?>