Project

General

Profile

« Previous | Next » 

Revision 1035

Added by Matthias almost 15 years ago

- Added new functions to admin dir (Thanks Argos and Ruud)

- Updated install and upgrade-script

- Adapted wb_theme and classic_theme to changed admin dir files

View differences:

index.php
27 27
require('../../config.php');
28 28
require_once(WB_PATH.'/framework/class.admin.php');
29 29
$admin = new admin('Media', 'media');
30
include ('parameters.php');
30 31

  
31 32
// Setup template object
32 33
$template = new Template(THEME_PATH.'/templates');
......
41 42

  
42 43
// Insert values
43 44
$template->set_block('main_block', 'dir_list_block', 'dir_list');
44
foreach(directory_list(WB_PATH.MEDIA_DIRECTORY) AS $name) {
45
$dirs = directory_list(WB_PATH.MEDIA_DIRECTORY);
46
$array_lowercase = array_map('strtolower', $dirs);
47
array_multisort($array_lowercase, SORT_ASC, SORT_STRING, $dirs);
48
foreach($dirs AS $name) {
45 49
	if(!isset($home_folders[str_replace(WB_PATH.MEDIA_DIRECTORY, '', $name)])) {
46 50
		$template->set_var('NAME', str_replace(WB_PATH, '', $name));
47 51
		$template->parse('dir_list', 'dir_list_block', true);
......
55 59
if($admin->get_permission('media_upload') != true) {
56 60
	$template->set_var('DISPLAY_UPLOAD', 'hide');
57 61
}
62
if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global']['admin_only']) { // Only show admin the settings link
63
	$template->set_var('DISPLAY_SETTINGS', 'hide');
64
}
58 65

  
59 66
// Insert language headings
60 67
$template->set_var(array(
......
67 74
$template->set_var(array(
68 75
								'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
69 76
								'TEXT_NAME' => $TEXT['TITLE'],
77
								'TEXT_RELOAD' => $TEXT['RELOAD'],
70 78
								'TEXT_TARGET_FOLDER' => $TEXT['TARGET_FOLDER'],
71 79
								'TEXT_OVERWRITE_EXISTING' => $TEXT['OVERWRITE_EXISTING'],
72 80
								'TEXT_FILES' => $TEXT['FILES'],
73 81
								'TEXT_CREATE_FOLDER' => $TEXT['CREATE_FOLDER'],
74 82
								'TEXT_UPLOAD_FILES' => $TEXT['UPLOAD_FILES'],
83
								'CHANGE_SETTINGS' => $TEXT['MODIFY_SETTINGS'],
84
								'OPTIONS' => $TEXT['OPTION'],
75 85
								'TEXT_UNZIP_FILE' => $TEXT['UNZIP_FILE'],
76 86
								'TEXT_DELETE_ZIP' => $TEXT['DELETE_ZIP']
77 87
								)

Also available in: Unified diff