Revision 1041
Added by Matthias over 15 years ago
browse.php | ||
---|---|---|
30 | 30 |
|
31 | 31 |
// Include the WB functions file |
32 | 32 |
require_once(WB_PATH.'/framework/functions.php'); |
33 |
include ('parameters.php'); |
|
33 | 34 |
|
34 | 35 |
// Byte convert for filesize |
35 | 36 |
function byte_convert($bytes) { |
36 |
$symbol = array('B', 'KB', 'MB', 'GB', 'TB');
|
|
37 |
$symbol = array(' bytes', ' KB', ' MB', ' GB', ' TB');
|
|
37 | 38 |
$exp = 0; |
38 | 39 |
$converted_value = 0; |
39 | 40 |
if( $bytes > 0 ) { |
... | ... | |
90 | 91 |
exit(0); |
91 | 92 |
} |
92 | 93 |
|
94 |
if ($_SESSION['GROUP_ID'] != 1 && $pathsettings['global']['admin_only']) { // Only show admin the settings link |
|
95 |
$template->set_var('DISPLAY_SETTINGS', 'hide'); |
|
96 |
} |
|
97 |
|
|
93 | 98 |
// Workout the parent dir link |
94 | 99 |
$parent_dir_link = ADMIN_URL.'/media/browse.php?dir='.$directory.'&up=1'; |
95 | 100 |
// Workout if the up arrow should be shown |
... | ... | |
142 | 147 |
'LINK' => "browse.php?dir=$directory/$link_name", |
143 | 148 |
'LINK_TARGET' => '', |
144 | 149 |
'ROW_BG_COLOR' => $row_bg_color, |
150 |
'FT_ICON' => THEME_URL.'/images/folder_16.png', |
|
145 | 151 |
'FILETYPE_ICON' => THEME_URL.'/images/folder_16.png', |
146 | 152 |
'MOUSEOVER' => '', |
147 | 153 |
'IMAGEDETAIL' => '', |
... | ... | |
179 | 185 |
$imgdetail = ''; |
180 | 186 |
$icon = THEME_URL.'/images/blank.gif'; |
181 | 187 |
$tooltip = ''; |
182 |
$pathsettings['global']['show_thumbs'] = ''; |
|
188 |
|
|
189 |
|
|
183 | 190 |
if (!$pathsettings['global']['show_thumbs']) { |
184 | 191 |
$info = getimagesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name); |
185 | 192 |
if ($info[0]) { |
186 |
$imgdetail = fsize(filesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name)).', '.$info[0].'x'.$info[1].'px';
|
|
193 |
$imgdetail = fsize(filesize(WB_PATH.MEDIA_DIRECTORY.$directory.'/'.$name)).'<br /> '.$info[0].' x '.$info[1].' px';
|
|
187 | 194 |
$icon = 'thumb.php?t=1&img='.$directory.'/'.$name; |
188 |
$tooltip = ShowTip('thumb.php?t=2&img='.$directory.'/'.$name,$imgdetail);
|
|
195 |
$tooltip = ShowTip('thumb.php?t=2&img='.$directory.'/'.$name); |
|
189 | 196 |
} |
190 | 197 |
} |
191 | 198 |
$template->set_var(array( |
... | ... | |
195 | 202 |
'LINK' => WB_URL.MEDIA_DIRECTORY.$directory.'/'.$name, |
196 | 203 |
'LINK_TARGET' => '_blank', |
197 | 204 |
'ROW_BG_COLOR' => $row_bg_color, |
198 |
'ICON' => $icon, |
|
205 |
'FT_ICON' => $icon,
|
|
199 | 206 |
'FILETYPE_ICON' => THEME_URL.'/images/files/'.$filetypeicon.'.png', |
200 | 207 |
'MOUSEOVER' => $tooltip, |
201 | 208 |
'IMAGEDETAIL' => $imgdetail, |
... | ... | |
255 | 262 |
function ShowTip($name,$detail='') { |
256 | 263 |
$ext = strtolower(end(explode(".", $name))); |
257 | 264 |
if (strpos('.gif.jpg.jpeg.png.bmp.',$ext) ) |
258 |
return 'onmouseover="overlib(\'<img src=\\\''.$name.'\\\' width=\\\'200\\\'><br/><center>'.$detail.'</center>\',VAUTO, WIDTH, 200)" onmouseout="nd()" ' ;
|
|
265 |
return 'onmouseover="overlib(\'<img src=\\\''.$name.'\\\' maxwidth=\\\'200\\\' maxheight=\\\'200\\\'>\',VAUTO, WIDTH)" onmouseout="nd()" ' ;
|
|
259 | 266 |
else |
260 | 267 |
return ''; |
261 | 268 |
} |
262 | 269 |
|
263 | 270 |
function fsize($size) { |
264 | 271 |
if($size == 0) return("0 Bytes"); |
265 |
$filesizename = array(" Bytes", "kB", "MB", "GB", "TB");
|
|
272 |
$filesizename = array(" bytes", " kB", " MB", " GB", " TB");
|
|
266 | 273 |
return round($size/pow(1024, ($i = floor(log($size, 1024)))), 1) . $filesizename[$i]; |
267 | 274 |
} |
268 | 275 |
?> |
Also available in: Unified diff
- Fixed some minor bugs in argos_theme (Thanks to Argos)
- Fixed bugs in admin additons for argos_theme (Thanks to Argos)