Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         search
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @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: index.php 1718 2012-08-29 14:25:15Z Luisehahne $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/search/index.php $
14
 * @lastmodified    $Date: 2012-08-29 16:25:15 +0200 (Wed, 29 Aug 2012) $
15
 *
16
 */
17

    
18
// Include the config file
19
require('../config.php');
20

    
21
$page_id = (isset($_SESSION['PAGE_ID']) && ($_SESSION['PAGE_ID']!='') ? $_SESSION['PAGE_ID'] : 0);
22

    
23
// Required page details
24
$page_description = '';
25
$page_keywords = '';
26
define('PAGE_ID', $page_id);
27
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');
(1-1/5)