-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
37 lines (27 loc) · 1.01 KB
/
search.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
<?php
// core.php holds pagination variables
include_once 'config/core.php';
// include database and object files
include_once 'config/database.php';
include_once 'objects/event.php';
include_once 'objects/teks_berjalan.php';
// instantiate database and product object
$database = new Database();
$db = $database->getConnection();
$event = new Event($db);
$teks = new Teks($db);
// get search term
$search_term=isset($_GET['s']) ? $_GET['s'] : '';
$page_title = "Cari \"{$search_term}\"";
include_once "header.php";
// query products
$stmt = $event->search($search_term, $from_record_num, $records_per_page);
// specify the page where paging is used
$page_url="search.php?s={$search_term}&";
// count total rows - used for pagination
$total_rows=$event->countAll_BySearch($search_term);
// read_template.php controls how the product list will be rendered
include_once "konten.php";
// layout_footer.php holds our javascript and closing html tags
include_once "footer.php";
?>