-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
34 lines (25 loc) · 890 Bytes
/
index.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
<?php
// core.php holds pagination variables
include_once 'config/core.php';
// include database and object files
include_once 'config/database.php';
include_once 'objects/product.php';
include_once 'objects/category.php';
// instantiate database and product object
$database = new Database();
$db = $database->getConnection();
$product = new Product($db);
$category = new Category($db);
$page_title = "Read Products";
include_once "layout_header.php";
// query products
$stmt = $product->readAll($from_record_num, $records_per_page);
// specify the page where paging is used
$page_url = "index.php?";
// count total rows - used for pagination
$total_rows=$product->countAll();
// read_template.php controls how the product list will be rendered
include_once "read_template.php";
// layout_footer.php holds our javascript and closing html tags
include_once "layout_footer.php";
?>