Project

General

Profile

« Previous | Next » 

Revision 1508

Added by Dietmar about 13 years ago

fixed print_error exit in frontend account

View differences:

preferences.php
28 28
	}
29 29
}
30 30

  
31
require_once(WB_PATH.'/framework/class.wb.php');
31
require_once(WB_PATH.'/framework/class.frontend.php');
32 32
$wb_inst = new wb();
33 33
if ($wb_inst->is_authenticated()==false) {
34 34
	header('Location: '.WB_URL.'/account/login.php');
35 35
	exit(0);
36 36
}
37 37

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

  
38 40
// Required page details
39
$page_id = 0;
41
/* */
42
// $page_id = 0;
40 43
$page_description = '';
41 44
$page_keywords = '';
42
define('PAGE_ID', 0);
45
define('PAGE_ID', $page_id);
43 46
define('ROOT_PARENT', 0);
44 47
define('PARENT', 0);
45 48
define('LEVEL', 0);
49

  
46 50
define('PAGE_TITLE', $MENU['PREFERENCES']);
47 51
define('MENU_TITLE', $MENU['PREFERENCES']);
48 52
define('MODULE', '');
49 53
define('VISIBILITY', 'public');
50 54

  
51
// Set the page content include file
52
if(isset($_POST['current_password']) AND isset($_POST['new_password'])) {
53
	define('PAGE_CONTENT', WB_PATH.'/account/password.php');
54
} elseif(isset($_POST['current_password']) AND isset($_POST['email'])) {
55
	define('PAGE_CONTENT', WB_PATH.'/account/email.php');
56
} elseif(isset($_POST['display_name'])) {
57
	define('PAGE_CONTENT', WB_PATH.'/account/details.php');
58
} else {
59
	define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
60
}
61

  
55
define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
62 56
// Include the index (wrapper) file
63 57
require(WB_PATH.'/index.php');

Also available in: Unified diff