Revision 2098
Added by darkviper over 11 years ago
| setparameter.php | ||
|---|---|---|
| 23 | 23 |
require($config_file); |
| 24 | 24 |
} |
| 25 | 25 |
} |
| 26 |
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
|
|
| 26 |
//if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
|
|
| 27 |
$oTrans = Translate::getInstance(); |
|
| 28 |
$oTrans->enableAddon('admin\\access');
|
|
| 27 | 29 |
|
| 28 | 30 |
$admin = new admin('Media', 'media', false);
|
| 29 | 31 |
// Include the WB functions file |
| 30 | 32 |
if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
|
| 31 | 33 |
|
| 32 |
// check if theme language file exists for the language set by the user (e.g. DE, EN) |
|
| 33 |
if(!file_exists(THEME_PATH .'/languages/'.LANGUAGE .'.php')) {
|
|
| 34 |
// no theme language file exists for the language set by the user, include default theme language file EN.php |
|
| 35 |
require_once(THEME_PATH .'/languages/EN.php'); |
|
| 36 |
} else {
|
|
| 37 |
// a theme language file exists for the language defined by the user, load it |
|
| 38 |
require_once(THEME_PATH .'/languages/'.LANGUAGE .'.php'); |
|
| 39 |
} |
|
| 34 |
//// check if theme language file exists for the language set by the user (e.g. DE, EN)
|
|
| 35 |
//if(!file_exists(THEME_PATH .'/languages/'.LANGUAGE .'.php')) {
|
|
| 36 |
// // no theme language file exists for the language set by the user, include default theme language file EN.php
|
|
| 37 |
// require_once(THEME_PATH .'/languages/EN.php');
|
|
| 38 |
//} else {
|
|
| 39 |
// // a theme language file exists for the language defined by the user, load it
|
|
| 40 |
// require_once(THEME_PATH .'/languages/'.LANGUAGE .'.php');
|
|
| 41 |
//}
|
|
| 40 | 42 |
// Get the current homedir |
| 41 | 43 |
$currentHome = WB_PATH.MEDIA_DIRECTORY.$admin->get_home_folder(); |
| 42 | 44 |
$currentHome = str_replace(WB_PATH, '', $currentHome); |
| ... | ... | |
| 96 | 98 |
$template = new Template(dirname($admin->correct_theme_source('setparameter.htt')));
|
| 97 | 99 |
$template->set_file('page', 'setparameter.htt');
|
| 98 | 100 |
$template->set_block('page', 'main_block', 'main');
|
| 101 |
$template->set_var($oTrans->getLangArray()); |
|
| 99 | 102 |
if ($_SESSION['GROUP_ID'] != 1) {
|
| 100 | 103 |
$template->set_var('DISPLAY_ADMIN', 'hide');
|
| 101 | 104 |
} |
| 102 | 105 |
$template->set_var(array( |
| 103 |
'TEXT_HEADER' => $TEXT['TEXT_HEADER'],
|
|
| 104 |
'SAVE_TEXT' => $TEXT['SAVE'],
|
|
| 105 |
'BACK' => $TEXT['BACK'],
|
|
| 106 |
)
|
|
| 107 |
);
|
|
| 106 |
'TEXT_HEADER' => $oTrans->TEXT_TEXT_HEADER,
|
|
| 107 |
'SAVE_TEXT' => $oTrans->TEXT_SAVE,
|
|
| 108 |
'BACK' => $oTrans->TEXT_BACK,
|
|
| 109 |
)
|
|
| 110 |
); |
|
| 108 | 111 |
|
| 109 | 112 |
$template->set_block('main_block', 'list_block', 'list');
|
| 110 | 113 |
$row_bg_color = ''; |
| ... | ... | |
| 131 | 134 |
$row_bg_color = ($row_bg_color == '#dedede') ? '#fff' : '#dedede'; |
| 132 | 135 |
|
| 133 | 136 |
$template->set_var(array( |
| 134 |
'ADMIN_URL' => ADMIN_URL,
|
|
| 135 |
'THEME_URL' => THEME_URL,
|
|
| 136 |
'PATH_NAME' => $relative,
|
|
| 137 |
'WIDTH' => $TEXT['WIDTH'],
|
|
| 138 |
'HEIGHT' => $TEXT['HEIGHT'],
|
|
| 139 |
'FIELD_NAME_W' => $safepath.'-w',
|
|
| 140 |
'FIELD_NAME_H' => $safepath.'-h',
|
|
| 141 |
'CAN_EDIT_CLASS' => ($bPathCanEdit==false) ? '' : 'bold',
|
|
| 142 |
'SHOW_EDIT_CLASS' => ($bPathCanEdit==false) ? 'hide' : '',
|
|
| 143 |
'READ_ONLY_DIR' => ($bPathCanEdit==false) ? ' readonly="readonly"' : '',
|
|
| 144 |
'CUR_HEIGHT' => $cur_height,
|
|
| 145 |
'CUR_WIDTH' => $cur_width,
|
|
| 146 |
'SETTINGS' => $TEXT['SETTINGS'],
|
|
| 147 |
'ADMIN_ONLY' => $TEXT['ADMIN_ONLY'],
|
|
| 148 |
'ADMIN_ONLY_SELECTED' => isset($pathsettings['global']['admin_only']) ? $pathsettings['global']['admin_only']:'',
|
|
| 149 |
'NO_SHOW_THUMBS' => $TEXT['NO_SHOW_THUMBS'],
|
|
| 150 |
'NO_SHOW_THUMBS_SELECTED' => isset($pathsettings['global']['show_thumbs']) ? $pathsettings['global']['show_thumbs']:'',
|
|
| 151 |
'ROW_BG_COLOR' => $row_bg_color,
|
|
| 152 |
'FTAN' => $admin->getFTAN()
|
|
| 153 |
)
|
|
| 154 |
);
|
|
| 137 |
'ADMIN_URL' => ADMIN_URL,
|
|
| 138 |
'THEME_URL' => THEME_URL,
|
|
| 139 |
'PATH_NAME' => $relative,
|
|
| 140 |
'WIDTH' => $oTrans->TEXT_WIDTH,
|
|
| 141 |
'HEIGHT' => $oTrans->TEXT_HEIGHT,
|
|
| 142 |
'FIELD_NAME_W' => $safepath.'-w',
|
|
| 143 |
'FIELD_NAME_H' => $safepath.'-h',
|
|
| 144 |
'CAN_EDIT_CLASS' => ($bPathCanEdit==false) ? '' : 'bold',
|
|
| 145 |
'SHOW_EDIT_CLASS' => ($bPathCanEdit==false) ? 'hide' : '',
|
|
| 146 |
'READ_ONLY_DIR' => ($bPathCanEdit==false) ? ' readonly="readonly"' : '',
|
|
| 147 |
'CUR_HEIGHT' => $cur_height,
|
|
| 148 |
'CUR_WIDTH' => $cur_width,
|
|
| 149 |
'SETTINGS' => $oTrans->TEXT_SETTINGS,
|
|
| 150 |
'ADMIN_ONLY' => $oTrans->TEXT_ADMIN_ONLY,
|
|
| 151 |
'ADMIN_ONLY_SELECTED' => isset($pathsettings['global']['admin_only']) ? $pathsettings['global']['admin_only']:'',
|
|
| 152 |
'NO_SHOW_THUMBS' => $oTrans->TEXT_NO_SHOW_THUMBS,
|
|
| 153 |
'NO_SHOW_THUMBS_SELECTED' => isset($pathsettings['global']['show_thumbs']) ? $pathsettings['global']['show_thumbs']:'',
|
|
| 154 |
'ROW_BG_COLOR' => $row_bg_color,
|
|
| 155 |
'FTAN' => $admin->getFTAN()
|
|
| 156 |
)
|
|
| 157 |
);
|
|
| 155 | 158 |
$template->parse('list', 'list_block', true);
|
| 156 | 159 |
} |
| 157 | 160 |
|
Also available in: Unified diff
! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate