Project

General

Profile

1 1386 Luisehahne
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         search
6 1718 Luisehahne
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 1386 Luisehahne
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17
18
// Include the config file
19
require('../config.php');
20
21 1718 Luisehahne
$page_id = (isset($_SESSION['PAGE_ID']) && ($_SESSION['PAGE_ID']!='') ? $_SESSION['PAGE_ID'] : 0);
22
23 1386 Luisehahne
// Required page details
24
$page_description = '';
25
$page_keywords = '';
26 1718 Luisehahne
define('PAGE_ID', $page_id);
27 1386 Luisehahne
define('ROOT_PARENT', 0);
28
define('PARENT', 0);
29
define('LEVEL', 0);
30
define('PAGE_TITLE', $TEXT['SEARCH']);
31
define('MENU_TITLE', $TEXT['SEARCH']);
32
define('MODULE', '');
33
define('VISIBILITY', 'public');
34
define('PAGE_CONTENT', 'search.php');
35
36
// Find out what the search template is
37
// $database = new database();
38
$query_template = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'template' LIMIT 1");
39
$fetch_template = $query_template->fetchRow();
40
$template = $fetch_template['value'];
41
if($template != '') {
42
	define('TEMPLATE', $template);
43
}
44
unset($template);
45
46
//Get the referrer page ID if it exists
47
if(isset($_REQUEST['referrer']) && is_numeric($_REQUEST['referrer']) && intval($_REQUEST['referrer']) > 0) {
48
	define('REFERRER_ID', intval($_REQUEST['referrer']));
49
} else {
50
	define('REFERRER_ID', 0);
51
}
52
53
// Include index (wrapper) file
54
require(WB_PATH.'/index.php');