|
|
|
@ -2,15 +2,14 @@ |
|
|
|
|
<?php |
|
|
|
|
$count = 1; |
|
|
|
|
|
|
|
|
|
$thumbnailBaseUrl = appendQueryString(CONFIG_URL_IMG_THUMBNAIL, 'path='.base64_decode($_REQUEST['path'])); |
|
|
|
|
$thumbnailBaseUrl = CONFIG_URL_IMG_THUMBNAIL; |
|
|
|
|
|
|
|
|
|
foreach($fileList as $file) { |
|
|
|
|
foreach ($fileList as $file) { |
|
|
|
|
|
|
|
|
|
///First step for hidden some type of Chamilo files and folders |
|
|
|
|
//Juan Carlos Ra<EFBFBD>a |
|
|
|
|
|
|
|
|
|
//hidden files and folders deleted by Chamilo. Hidde folders css, hotpotatoes, chat, certificates |
|
|
|
|
|
|
|
|
|
$deleted_by_chamilo_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php |
|
|
|
|
$deleted_by_chamilo_folder='_DELETED_'; |
|
|
|
|
$css_folder_chamilo='css'; |
|
|
|
@ -37,56 +36,49 @@ foreach($fileList as $file) { |
|
|
|
|
|
|
|
|
|
///Second step: hiding as the case |
|
|
|
|
//Juan Carlos Ra<EFBFBD>a |
|
|
|
|
if((!ereg($deleted_by_chamilo_file, $file['name']) && !ereg($deleted_by_chamilo_folder, $file['path'])) && !ereg($css_folder_chamilo, $file['path']) && !ereg($hotpotatoes_folder_chamilo, $file['path']) && !ereg($chat_files_chamilo, $file['path']) && !ereg($certificates_chamilo, $file['path']) && $show_doc_group && $file['name'][0]!='.') |
|
|
|
|
{ |
|
|
|
|
if ((!ereg($deleted_by_chamilo_file, $file['name']) && |
|
|
|
|
!ereg($deleted_by_chamilo_folder, $file['path'])) && |
|
|
|
|
!ereg($css_folder_chamilo, $file['path']) && |
|
|
|
|
!ereg($hotpotatoes_folder_chamilo, $file['path']) && |
|
|
|
|
!ereg($chat_files_chamilo, $file['path']) && |
|
|
|
|
!ereg($certificates_chamilo, $file['path']) && $show_doc_group && $file['name'][0]!='.') { |
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
<dl class="thumbnailListing" id="dl<?php echo $count; ?>">
|
|
|
|
|
<?php |
|
|
|
|
if(preg_match('/shared_folder/', basename($file['path']))) |
|
|
|
|
{ //add icon into ajaxfilemanager if sharedfolder is in Chamilo |
|
|
|
|
if(preg_match('/shared_folder/', basename($file['path']))) { |
|
|
|
|
//add icon into ajaxfilemanager if sharedfolder is in Chamilo |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' || empty($file['file']) || empty($file['subdir'])?'folderShared':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
|
|
|
|
|
<?php |
|
|
|
|
} |
|
|
|
|
elseif(preg_match('/sf_user_/', basename($file['path']))) |
|
|
|
|
{ |
|
|
|
|
} elseif(preg_match('/sf_user_/', basename($file['path']))) { |
|
|
|
|
?> |
|
|
|
|
<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' || empty($file['file']) || empty($file['subdir'])?'unknownUser':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
|
|
|
|
|
<?php |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
} else { |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' && empty($file['file']) && empty($file['subdir'])?'folderEmpty':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
switch($file['cssClass']) |
|
|
|
|
{ |
|
|
|
|
case 'filePicture': |
|
|
|
|
echo '<a id="thumbUrl' . $count . '" rel="thumbPhotos" href="' . $file['public_path'] . '">'; |
|
|
|
|
echo '<img src="' . appendQueryString($thumbnailBaseUrl, 'path=' . base64_encode($file['path'])) . '" id="thumbImg' . $count . '"></a>' . "\n"; |
|
|
|
|
break; |
|
|
|
|
case 'fileFlash': |
|
|
|
|
case 'fileVideo': |
|
|
|
|
case 'fileMusic': |
|
|
|
|
switch($file['cssClass']) { |
|
|
|
|
case 'filePicture': |
|
|
|
|
echo '<a id="thumbUrl' . $count . '" rel="thumbPhotos" href="' . $file['public_path'] . '">'; |
|
|
|
|
echo '<img src="' . appendQueryString($thumbnailBaseUrl, 'path=' . base64_encode($file['path'])) . '" id="thumbImg' . $count . '"></a>' . "\n"; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
echo ' '; |
|
|
|
|
} |
|
|
|
|
if(Security::remove_XSS($_GET['editor'])!='stand_alone'){ |
|
|
|
|
$path_chamilo_file='../'.$file['path'];// fix for makes a good show when pressed next on window preview, don't only one image |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
$path_chamilo_file=$file['path']; |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
case 'fileFlash': |
|
|
|
|
case 'fileVideo': |
|
|
|
|
case 'fileMusic': |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
echo ' '; |
|
|
|
|
} |
|
|
|
|
if(Security::remove_XSS($_GET['editor'])!='stand_alone'){ |
|
|
|
|
$path_chamilo_file='../'.$file['path'];// fix for makes a good show when pressed next on window preview, don't only one image |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
$path_chamilo_file=$file['path']; |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
</dt> |
|
|
|
|
<dd id="dd<?php echo $count; ?>" class="thumbnailListing_info"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>"> </span><input id="cb<?php echo $count; ?>" type="checkbox" name="check[]" <?php echo ($file['is_writable']?'':'disabled'); ?> class="radio" value="<?php echo $file['path']; ?>" />
|
|
|
|
|