forked from Rezgo/rezgo-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
27 lines (18 loc) · 829 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
<?php
// any new page must start with the page_header, it will include the correct files
// so that the rezgo parser classes and functions will be available to your templates
require('rezgo/include/page_header.php');
// start a new instance of RezgoSite
$site = new RezgoSite();
if($_REQUEST['search'] == 'restore' && $_COOKIE['rezgo_search']) {
$site->sendTo($_COOKIE['rezgo_search']);
}
// some code to handle the pagination
if(!$_REQUEST['pg']) $_REQUEST['pg'] = 1;
$start = ($_REQUEST['pg'] - 1) * REZGO_RESULTS_PER_PAGE;
// we only want 11 responses, starting at our page number times item number
$site->setTourLimit(REZGO_RESULTS_PER_PAGE + 1, $start);
?>
<?php echo $site->getTemplate('frame_header')?>
<?php echo $site->getTemplate('index')?>
<?php echo $site->getTemplate('frame_footer')?>