Project

General

Profile

1 1473 Luisehahne
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6 1719 Luisehahne
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 1473 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 1792 Luisehahne
// Include config file
19
$config_file = realpath('../config.php');
20
if(file_exists($config_file) && !defined('WB_URL'))
21
{
22
	require_once($config_file);
23
}
24 1473 Luisehahne
25 1792 Luisehahne
if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
26
27
require_once(WB_PATH.'/framework/functions.php');
28
29
$wb = new frontend(false);
30 1796 Luisehahne
$permission = new admin('##skip##');
31 1792 Luisehahne
32 1473 Luisehahne
if(!FRONTEND_LOGIN) {
33 1792 Luisehahne
	$wb->send_header('Location: '.WB_URL.'/');
34
	exit(0);
35 1473 Luisehahne
}
36
37 1792 Luisehahne
if ($wb->is_authenticated()==false) {
38
	$wb->send_header('Location: '.WB_URL.'/account/login.php');
39 1473 Luisehahne
	exit(0);
40
}
41 1796 Luisehahne
42
if ($permission->get_permission('preferences')==false) {
43
	$wb->send_header('Location: '.WB_URL.'/');
44
	exit(0);
45
}
46
47 1792 Luisehahne
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
48 1473 Luisehahne
49
// Required page details
50
$page_description = '';
51
$page_keywords = '';
52 1792 Luisehahne
// Work out level
53
$level = ($page_id > 0 )? level_count($page_id): $page_id;
54
// Work out root parent
55
$root_parent = ($page_id > 0 )? root_parent($page_id): $page_id;
56
57 1508 Luisehahne
define('PAGE_ID', $page_id);
58 1792 Luisehahne
define('ROOT_PARENT', $root_parent);
59 1473 Luisehahne
define('PARENT', 0);
60 1792 Luisehahne
define('LEVEL', $level);
61 1508 Luisehahne
62 1473 Luisehahne
define('PAGE_TITLE', $MENU['PREFERENCES']);
63
define('MENU_TITLE', $MENU['PREFERENCES']);
64
define('MODULE', '');
65
define('VISIBILITY', 'public');
66
67 1508 Luisehahne
define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
68 1792 Luisehahne
69 1473 Luisehahne
// Include the index (wrapper) file
70
require(WB_PATH.'/index.php');