Revision 16
Added by stefan about 19 years ago
preferences.php | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
// $Id: preferences.php,v 1.4 2005/04/02 06:25:37 rdjurovich Exp $
|
|
3 |
// $Id$ |
|
4 | 4 |
|
5 | 5 |
/* |
6 | 6 |
|
... | ... | |
25 | 25 |
|
26 | 26 |
require('../config.php'); |
27 | 27 |
|
28 |
// Start a session |
|
29 |
if(!defined('SESSION_STARTED')) { |
|
30 |
session_name(APP_NAME.'_session_id'); |
|
31 |
session_start(); |
|
32 |
define('SESSION_STARTED', true); |
|
33 |
} |
|
34 |
|
|
35 |
// Get users language if it is not already set |
|
36 |
if(!defined('LANGUAGE')) { |
|
37 |
if(isset($_SESSION['LANGUAGE']) AND $_SESSION['LANGUAGE'] != '') { |
|
38 |
define('LANGUAGE', $_SESSION['LANGUAGE']); |
|
39 |
} else { |
|
40 |
define('LANGUAGE', DEFAULT_LANGUAGE); |
|
41 |
} |
|
42 |
} |
|
43 |
|
|
44 |
// Load the language file |
|
45 |
if(!file_exists(WB_PATH.'/languages/'.LANGUAGE.'.php')) { |
|
46 |
exit('Error loading language file '.LANGUAGE.', please check configuration'); |
|
47 |
} else { |
|
48 |
require_once(WB_PATH.'/languages/'.LANGUAGE.'.php'); |
|
49 |
} |
|
50 |
|
|
51 | 28 |
// Required page details |
52 | 29 |
$page_id = 0; |
53 | 30 |
$page_description = ''; |
... | ... | |
75 | 52 |
// Include the index (wrapper) file |
76 | 53 |
require(WB_PATH.'/index.php'); |
77 | 54 |
|
78 |
?> |
|
55 |
?> |
Also available in: Unified diff
Reduced redundant initialization code, removed further 'CVS' occurrences. Made $admin accessible in page_content function.