Revision 2098
Added by darkviper over 11 years ago
| browse.php | ||
|---|---|---|
| 24 | 24 |
require($config_file); |
| 25 | 25 |
} |
| 26 | 26 |
} |
| 27 |
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
|
|
| 28 |
|
|
| 27 |
//if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
|
|
| 28 |
$oTrans = Translate::getInstance(); |
|
| 29 |
$oTrans->enableAddon('admin\\media');
|
|
| 29 | 30 |
$admin = new admin('Media', 'media', false);
|
| 30 | 31 |
|
| 31 | 32 |
$starttime = explode(" ", microtime());
|
| ... | ... | |
| 35 | 36 |
if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
|
| 36 | 37 |
include ('parameters.php');
|
| 37 | 38 |
|
| 38 |
// check if theme language file exists for the language set by the user (e.g. DE, EN) |
|
| 39 |
if(!file_exists(THEME_PATH .'/languages/'.LANGUAGE .'.php')) {
|
|
| 40 |
// no theme language file exists for the language set by the user, include default theme language file EN.php |
|
| 41 |
require_once(THEME_PATH .'/languages/EN.php'); |
|
| 42 |
} else {
|
|
| 43 |
// a theme language file exists for the language defined by the user, load it |
|
| 44 |
require_once(THEME_PATH .'/languages/'.LANGUAGE .'.php'); |
|
| 45 |
} |
|
| 39 |
//// check if theme language file exists for the language set by the user (e.g. DE, EN)
|
|
| 40 |
//if(!file_exists(THEME_PATH .'/languages/'.LANGUAGE .'.php')) {
|
|
| 41 |
// // no theme language file exists for the language set by the user, include default theme language file EN.php
|
|
| 42 |
// require_once(THEME_PATH .'/languages/EN.php');
|
|
| 43 |
//} else {
|
|
| 44 |
// // a theme language file exists for the language defined by the user, load it
|
|
| 45 |
// require_once(THEME_PATH .'/languages/'.LANGUAGE .'.php');
|
|
| 46 |
//}
|
|
| 46 | 47 |
|
| 47 | 48 |
// Byte convert for filesize |
| 48 | 49 |
function byte_convert($bytes) {
|
| ... | ... | |
| 127 | 128 |
$template = new Template(dirname($admin->correct_theme_source('media_browse.htt')));
|
| 128 | 129 |
$template->set_file('page', 'media_browse.htt');
|
| 129 | 130 |
$template->set_block('page', 'main_block', 'main');
|
| 130 |
|
|
| 131 |
$template->set_var($oTrans->getLangArray()); |
|
| 131 | 132 |
// Get the current dir |
| 132 | 133 |
//$currentHome = $admin->get_home_folder(); |
| 133 | 134 |
$currentHome = (defined('HOME_FOLDERS') && HOME_FOLDERS) ? $admin->get_home_folder() : '';
|
| ... | ... | |
| 164 | 165 |
// Check to see if it contains ../ |
| 165 | 166 |
if (!check_media_path($directory)) {
|
| 166 | 167 |
// $admin->print_header(); |
| 167 |
$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH']);
|
|
| 168 |
$admin->print_error($oTrans->MESSAGE_MEDIA_DIR_DOT_DOT_SLASH);
|
|
| 168 | 169 |
} |
| 169 | 170 |
|
| 170 | 171 |
if(!file_exists(WB_PATH.MEDIA_DIRECTORY.$directory)) {
|
| 171 | 172 |
// $admin->print_header(); |
| 172 |
$admin->print_error($MESSAGE['MEDIA_DIR_DOES_NOT_EXIST']);
|
|
| 173 |
$admin->print_error($oTrans->MESSAGE_MEDIA_DIR_DOES_NOT_EXIST);
|
|
| 173 | 174 |
} |
| 174 | 175 |
|
| 175 | 176 |
// Check to see if the user wanted to go up a directory into the parent folder |
| ... | ... | |
| 358 | 359 |
// Insert language text and messages |
| 359 | 360 |
$template->set_var(array( |
| 360 | 361 |
'MEDIA_DIRECTORY' => MEDIA_DIRECTORY, |
| 361 |
'TEXT_CURRENT_FOLDER' => $TEXT['CURRENT_FOLDER'], |
|
| 362 |
'TEXT_RELOAD' => $TEXT['RELOAD'], |
|
| 363 |
'TEXT_RENAME' => $TEXT['RENAME'], |
|
| 364 |
'TEXT_DELETE' => $TEXT['DELETE'], |
|
| 365 |
'TEXT_SIZE' => $TEXT['SIZE'], |
|
| 366 |
'TEXT_DATE' => $TEXT['DATE'], |
|
| 367 |
'TEXT_NAME' => $TEXT['NAME'], |
|
| 368 |
'TEXT_TYPE' => $TEXT['TYPE'], |
|
| 369 |
'TEXT_UP' => $TEXT['UP'], |
|
| 370 |
'NONE_FOUND' => $MESSAGE['MEDIA_NONE_FOUND'], |
|
| 371 |
'CHANGE_SETTINGS' => $TEXT['MODIFY_SETTINGS'], |
|
| 372 |
'CONFIRM_DELETE' => $MESSAGE['MEDIA_CONFIRM_DELETE'] |
|
| 362 |
'NONE_FOUND' => $oTrans->MESSAGE_MEDIA_NONE_FOUND, |
|
| 363 |
'CHANGE_SETTINGS' => $oTrans->TEXT_MODIFY_SETTINGS, |
|
| 364 |
'CONFIRM_DELETE' => $oTrans->MESSAGE_MEDIA_CONFIRM_DELETE |
|
| 373 | 365 |
) |
| 374 | 366 |
); |
| 375 | 367 |
|
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