Revision 1319
Added by Luisehahne over 15 years ago
| index.php | ||
|---|---|---|
| 9 | 9 |
* @link http://www.websitebaker2.org/ |
| 10 | 10 |
* @license http://www.gnu.org/licenses/gpl.html |
| 11 | 11 |
* @platform WebsiteBaker 2.8.x |
| 12 |
* @requirements PHP 4.4.9 && higher
|
|
| 12 |
* @requirements PHP 4.4.9 and higher
|
|
| 13 | 13 |
* @version $Id$ |
| 14 | 14 |
* @filesource $HeadURL$ |
| 15 | 15 |
* @lastmodified $Date$ |
| ... | ... | |
| 29 | 29 |
$template = new Template( THEME_PATH.'/templates' ); |
| 30 | 30 |
$template->set_file( 'page', 'preferences.htt' ); |
| 31 | 31 |
$template->set_block( 'page', 'main_block', 'main' ); |
| 32 |
// read user-info from table users && assign it to template
|
|
| 32 |
// read user-info from table users and assign it to template
|
|
| 33 | 33 |
$sql = 'SELECT `display_name`, `username`, `email` FROM `'.TABLE_PREFIX.'users` '; |
| 34 | 34 |
$sql .= 'WHERE `user_id` = '.(int)$admin->get_user_id(); |
| 35 | 35 |
if( $res_user = $database->query($sql) ) |
| ... | ... | |
| 42 | 42 |
$template->set_var('ADMIN_URL', ADMIN_URL);
|
| 43 | 43 |
} |
| 44 | 44 |
} |
| 45 |
// read available languages from table addons && assign it to the template
|
|
| 45 |
// read available languages from table addons and assign it to the template
|
|
| 46 | 46 |
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` '; |
| 47 | 47 |
$sql .= 'WHERE `type` = "language" ORDER BY `directory`'; |
| 48 | 48 |
if( $res_lang = $database->query($sql) ) |
| ... | ... | |
| 76 | 76 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
| 77 | 77 |
$template->set_var( 'VALUE', ($format != 'system_default' ? $format : 'system_default') ); |
| 78 | 78 |
$template->set_var( 'NAME', $title ); |
| 79 |
if( (DATE_FORMAT == $format && !isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) ||
|
|
| 80 |
('system_default' == $format && isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) )
|
|
| 79 |
if( (DATE_FORMAT == $format AND !isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) OR
|
|
| 80 |
('system_default' == $format AND isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) )
|
|
| 81 | 81 |
{
|
| 82 | 82 |
$template->set_var('SELECTED', ' selected="selected"');
|
| 83 | 83 |
}else {
|
| ... | ... | |
| 93 | 93 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
| 94 | 94 |
$template->set_var('VALUE', $format != 'system_default' ? $format : 'system_default' );
|
| 95 | 95 |
$template->set_var('NAME', $title);
|
| 96 |
if( (TIME_FORMAT == $format && !isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) ||
|
|
| 97 |
('system_default' == $format && isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) )
|
|
| 96 |
if( (TIME_FORMAT == $format AND !isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) OR
|
|
| 97 |
('system_default' == $format AND isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) )
|
|
| 98 | 98 |
{
|
| 99 | 99 |
$template->set_var('SELECTED', ' selected="selected"');
|
| 100 | 100 |
} else {
|
| ... | ... | |
| 129 | 129 |
'TEXT_CURRENT_PASSWORD' => $TEXT['CURRENT_PASSWORD'], |
| 130 | 130 |
'TEXT_NEW_PASSWORD' => $TEXT['NEW_PASSWORD'], |
| 131 | 131 |
'TEXT_RETYPE_NEW_PASSWORD' => $TEXT['RETYPE_NEW_PASSWORD'], |
| 132 |
'TEXT_NEW_PASSWORD' => $TEXT['NEW_PASSWORD'], |
|
| 133 |
'TEXT_RETYPE_NEW_PASSWORD' => $TEXT['RETYPE_NEW_PASSWORD'], |
|
| 134 |
'TEXT_NEED_CURRENT_PASSWORD' => $TEXT['NEED_CURRENT_PASSWORD'], |
|
| 132 | 135 |
'EMPTY_STRING' => '' |
| 133 | 136 |
) |
| 134 | 137 |
); |
Also available in: Unified diff
Ticket #974 Usability bug in /preferences