Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         search
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
9
 * @link            http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12
 * @requirements    PHP 5.2.2 and higher
13
 * @version         $Id: index.php 2 2017-07-02 15:14:29Z Manuela $
14
 * @filesource        $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/search/index.php $
15
 * @lastmodified    $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
16
 *
17
 */
18

    
19
// Include the config file
20
//require('../config.php');
21
if ( !defined( 'WB_PATH' ) ){ require(dirname(__DIR__).'/config.php'); }
22
if ( !class_exists('frontend')) { require(WB_PATH.'/framework/class.frontend.php');  }
23
// Create new frontend object
24
if (!isset($wb) || !($wb instanceof frontend)) { $wb = new frontend(); }
25

    
26
// Required page details
27
$page_id = 0;
28
$page_id = @$_SESSION['PAGE_ID'] ?: 0;
29
$page_description = '';
30
$page_keywords = '';
31
define('PAGE_ID', 0);
32
define('ROOT_PARENT', 0);
33
define('PARENT', 0);
34
define('LEVEL', 0);
35
define('PAGE_TITLE', $TEXT['SEARCH']);
36
define('MENU_TITLE', $TEXT['SEARCH']);
37
define('MODULE', '');
38
define('VISIBILITY', 'public');
39
define('PAGE_CONTENT', 'search.php');
40

    
41
// Find out what the search template is
42
// $database = new database();
43
$query_template = $database->query("SELECT `value` FROM `".TABLE_PREFIX."search` WHERE `name` = 'template' LIMIT 1");
44
$fetch_template = $query_template->fetchRow(MYSQLI_ASSOC);
45
$template = $fetch_template['value'];
46
if($template != '') {
47
    define('TEMPLATE', $template);
48
}
49
unset($template);
50

    
51
//Get the referrer page ID if it exists
52
if(isset($_REQUEST['referrer']) && is_numeric($_REQUEST['referrer']) && intval($_REQUEST['referrer']) > 0) {
53
    define('REFERRER_ID', intval($_REQUEST['referrer']));
54
} else {
55
    define('REFERRER_ID', 0);
56
}
57

    
58
// Include index (wrapper) file
59
require(WB_PATH.'/index.php');
60

    
(1-1/5)