Project

General

Profile

« Previous | Next » 

Revision 1425

Added by Dietmar almost 14 years ago

redefined wrong admin backlinks

View differences:

details.php
19 19
// Must include code to stop this file being access directly
20 20
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
21 21

  
22
// Create a javascript back link
23
$js_back = WB_URL.'/account/preferences.php';
24

  
25
if (!$wb->checkFTAN())
26
{
27
	$wb->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $js_back);
28
	exit();
29
}
30

  
22 31
// Get and sanitize entered values
23 32
$display_name = $wb->add_slashes(strip_tags($wb->get_post('display_name')));
24 33
$language = strtoupper($wb->get_post('language'));
......
43 52
$time_format = ($time_format == 'system_default' ? '' : $time_format);
44 53
unset($TIME_FORMATS);
45 54

  
46
if (!$wb->checkFTAN())
47
{
48
	$wb->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], WB_URL);
49
	exit();
50
}
51

  
52
// Create a javascript back link
53
$js_back = "javascript: history.go(-1);";
54

  
55 55
// Update the database
56 56
// $database = new database();
57 57
$query = "UPDATE ".TABLE_PREFIX."users SET display_name = '$display_name', language = '$language', timezone = '$timezone', date_format = '$date_format', time_format = '$time_format' WHERE user_id = '".$wb->get_user_id()."'";
58 58
$database->query($query);
59 59
if($database->is_error()) {
60
	$wb->print_error($database->get_error,'index.php',false);
60
	$wb->print_error($database->get_error,$js_back,false);
61 61
} else {
62
	$wb->print_success($MESSAGE['PREFERENCES']['DETAILS_SAVED'], WB_URL.'/account/preferences.php');
62
	$wb->print_success($MESSAGE['PREFERENCES']['DETAILS_SAVED'] );
63 63
	$_SESSION['DISPLAY_NAME'] = $display_name;
64 64
	$_SESSION['LANGUAGE'] = $language;
65 65
	// Update date format

Also available in: Unified diff