Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/images.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/images.php,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/images.php 24 Nov 2007 15:35:35 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/images.php 13 May 2008 18:53:49 -0000 1.4 @@ -1,386 +1,391 @@ -processUploads(); - -//process any file renames -$renameStatus=$manager->processRenames(); - -//process paste -$pasteStatus = (isset($_GET['paste'])) ? $manager->processPaste() : false; - -$refreshFile = ($manager->deleteFiles()) ? true : false; - -$refreshDir = false; -//process any directory functions -if($manager->deleteDirs() || $manager->processNewDir() || $pasteStatus || $renameStatus ) - $refreshDir = true; - - -$diskInfo=$manager->getDiskInfo(); - -//check for any sub-directory request -//check that the requested sub-directory exists -//and valid -if(isset($_REQUEST['dir'])) -{ - $path = rawurldecode($_REQUEST['dir']); - if($manager->validRelativePath($path)) - $relative = $path; -} - -$afruViewType = (isset($_REQUEST['viewtype'])) ? $afruViewType=$_REQUEST['viewtype'] : ''; - -if($afruViewType!="thumbview" && $afruViewType!="listview") -{ - $afruViewType=$IMConfig['view_type']; -} -//get the list of files and directories -$list = $manager->getFiles($relative); - - -/* ================= OUTPUT/DRAW FUNCTIONS ======================= */ - - -/** - * Draw folders and files. Changed by Afru - */ -function drawDirs_Files($list, &$manager) -{ - global $relative, $afruViewType, $IMConfig, $insertMode; - - switch ($afruViewType) { - case 'listview': - $maxNameLength = 30; - ?> - - - - - $dir) - { ?> - - - - - - - - - - $file) - { - ?> - - - - - - - - - - -
NameSizeImage SizeDate Modified 
- $maxNameLength) echo substr($dir['entry'],0,$maxNameLength)."..."; else echo $dir['entry']; - ?> - Folder - Trash - - Rename - - - Cut - Copy - -
" alt="" /> onmouseover="showPreview('')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" > - $maxNameLength) echo substr($entry,0,$maxNameLength)."..."; else echo $entry; - ?> - 0){ echo $file['image'][0].'x'.$file['image'][1]; } ?> - 0) { ?> - Edit - - Trash - - Rename - - - Cut - Copy - -
- $dir) - { ?> -
- <?php echo $dir['entry']; ?> - -
- $maxFolderNameLength) - echo substr($dir['entry'], 0, $maxFolderNameLength) . "..."; - else - echo $dir['entry']; ?> -
-
- Trash - - Rename - - - Cut - Copy - -
-
- $file) - { - $afruimgdimensions=$manager->checkImageSize($file['relative']); - $thisFileNameLength = $maxFileNameLength; - ?> -
- - <?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?> - -
- $thisFileNameLength + 3) echo strtolower(substr($entry,0,$thisFileNameLength))."..."; else echo $entry; - ?> -
-
- 0 ) - { ?> - Edit - - Trash - - Rename - - - Cut - Copy - - -
-
- -
No Files Found
- -
Invalid base directory: getImagesDir(); ?>
- - - - - File List - - - - - - - - - - - -isValidBase() == false) { drawErrorBase($manager); } - elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?> - - - - +processUploads(); + +//process any file renames +$renameStatus=$manager->processRenames(); + +//process paste +$pasteStatus = (isset($_GET['paste'])) ? $manager->processPaste() : false; + +$refreshFile = ($manager->deleteFiles()) ? true : false; + +$refreshDir = false; +//process any directory functions +if($manager->deleteDirs() || $manager->processNewDir() || $pasteStatus || $renameStatus ) + $refreshDir = true; + + +$diskInfo=$manager->getDiskInfo(); + +//check for any sub-directory request +//check that the requested sub-directory exists +//and valid +if(isset($_REQUEST['dir'])) +{ + $path = rawurldecode($_REQUEST['dir']); + if($manager->validRelativePath($path)) + $relative = $path; +} + +$afruViewType = (isset($_REQUEST['viewtype'])) ? $afruViewType=$_REQUEST['viewtype'] : ''; + +if($afruViewType!="thumbview" && $afruViewType!="listview") +{ + $afruViewType=$IMConfig['view_type']; +} +//get the list of files and directories +$list = $manager->getFiles($relative); + + +/* ================= OUTPUT/DRAW FUNCTIONS ======================= */ + + +/** + * Draw folders and files. Changed by Afru + */ +function drawDirs_Files($list, &$manager) +{ + global $relative, $afruViewType, $IMConfig, $insertMode,$backend_url_enc; + + switch ($afruViewType) { + case 'listview': + $maxNameLength = 30; + ?> + + + + + $dir) + { ?> + + + + + + + + + $file) + { + ?> + + + + + + + + + +
NameSizeImage SizeDate Modified 
+ + $maxNameLength) echo substr($dir['entry'],0,$maxNameLength)."..."; else echo $dir['entry']; + ?> + Folder + Trash + + Rename + + + Cut + Copy + +
" alt="" /> + onmouseover="showPreview('')" onmouseout="showPreview(window.parent.document.getElementById('f_url').value)" > + $maxNameLength) echo substr($entry,0,$maxNameLength)."..."; else echo $entry; + ?> + 0){ echo $file['image'][0].'x'.$file['image'][1]; } ?> + 0) { ?> + Edit + + Trash + + Rename + + + Cut + Copy + +
+ $dir) + { ?> +
+ <?php echo $dir['entry']; ?> + +
+ $maxFolderNameLength) + echo substr($dir['entry'], 0, $maxFolderNameLength) . "..."; + else + echo $dir['entry']; ?> +
+
+ Trash + + Rename + + + Cut + Copy + +
+
+ $file) + { + $afruimgdimensions=$manager->checkImageSize($file['relative']); + $thisFileNameLength = $maxFileNameLength; + ?> +
+ + <?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?> + +
+ $thisFileNameLength + 3) echo strtolower(substr($entry,0,$thisFileNameLength))."..."; else echo $entry; + ?> +
+
+ 0 ) + { ?> + Edit + + Trash + + Rename + + + Cut + Copy + + +
+
+ +
No Files Found
+ +
Invalid base directory: getImagesDir(); ?>
+ + + + + File List + + + + + + + + + + + +isValidBase() == false) { drawErrorBase($manager); } + elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?> + + + +