Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
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: preferences.php 1796 2012-10-24 14:12:02Z Luisehahne $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/account/preferences.php $
14
 * @lastmodified    $Date: 2012-10-24 16:12:02 +0200 (Wed, 24 Oct 2012) $
15
 *
16
 */
17

    
18
// 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

    
25
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
$permission = new admin('##skip##');
31

    
32
if(!FRONTEND_LOGIN) {
33
	$wb->send_header('Location: '.WB_URL.'/');
34
	exit(0);
35
}
36

    
37
if ($wb->is_authenticated()==false) {
38
	$wb->send_header('Location: '.WB_URL.'/account/login.php');
39
	exit(0);
40
}
41

    
42
if ($permission->get_permission('preferences')==false) {
43
	$wb->send_header('Location: '.WB_URL.'/');
44
	exit(0);
45
}
46

    
47
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
48

    
49
// Required page details
50
$page_description = '';
51
$page_keywords = '';
52
// 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
define('PAGE_ID', $page_id);
58
define('ROOT_PARENT', $root_parent);
59
define('PARENT', 0);
60
define('LEVEL', $level);
61

    
62
define('PAGE_TITLE', $MENU['PREFERENCES']);
63
define('MENU_TITLE', $MENU['PREFERENCES']);
64
define('MODULE', '');
65
define('VISIBILITY', 'public');
66

    
67
define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
68

    
69
// Include the index (wrapper) file
70
require(WB_PATH.'/index.php');
(16-16/22)