Project

General

Profile

« Previous | Next » 

Revision 1792

Added by Dietmar almost 12 years ago

! all changes in folder account, Signup with confirmation Mail
! frontend.css now included by account script

View differences:

preferences.php
15 15
 *
16 16
 */
17 17

  
18
require_once('../config.php');
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
}
19 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

  
20 31
if(!FRONTEND_LOGIN) {
21
		header('Location: '.WB_URL.'/index.php');
22
		exit(0);
23
//	if(INTRO_PAGE) {
24
//		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
25
//		exit(0);
26
//	} else {
27
//		header('Location: '.WB_URL.'/index.php');
28
//		exit(0);
29
//	}
32
	$wb->send_header('Location: '.WB_URL.'/');
33
	exit(0);
30 34
}
31 35

  
32
require_once(WB_PATH.'/framework/class.frontend.php');
33

  
34
$wb_inst = new wb();
35
if ($wb_inst->is_authenticated()==false) {
36
	header('Location: '.WB_URL.'/account/login.php');
36
if ($wb->is_authenticated()==false) {
37
	$wb->send_header('Location: '.WB_URL.'/account/login.php');
37 38
	exit(0);
38 39
}
40
$page_id = defined('REFERRER_ID') ? REFERRER_ID : isset($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
39 41

  
40
$page_id = !empty($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
41

  
42 42
// Required page details
43
/* */
44
// $page_id = 0;
45 43
$page_description = '';
46 44
$page_keywords = '';
45
// Work out level
46
$level = ($page_id > 0 )? level_count($page_id): $page_id;
47
// Work out root parent
48
$root_parent = ($page_id > 0 )? root_parent($page_id): $page_id;
49

  
47 50
define('PAGE_ID', $page_id);
48
define('ROOT_PARENT', 0);
51
define('ROOT_PARENT', $root_parent);
49 52
define('PARENT', 0);
50
define('LEVEL', 0);
53
define('LEVEL', $level);
51 54

  
52 55
define('PAGE_TITLE', $MENU['PREFERENCES']);
53 56
define('MENU_TITLE', $MENU['PREFERENCES']);
......
55 58
define('VISIBILITY', 'public');
56 59

  
57 60
define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
61

  
58 62
// Include the index (wrapper) file
59 63
require(WB_PATH.'/index.php');

Also available in: Unified diff