PageRenderTime 47ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/adminstrator/ajaxfilemanager/_ajax_get_details_listing.php

http://marocmall.googlecode.com/
PHP | 54 lines | 51 code | 1 blank | 2 comment | 6 complexity | 0100b19a024950c3fe92842701e45ed7 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <div id="content">
  2. <table class="tableList" id="tableList" cellpadding="0" cellspacing="0" border="0">
  3. <thead>
  4. <tr>
  5. <th width="5"><a href="#" class="check_all" id="tickAll" title="<?php echo TIP_SELECT_ALL; ?>" onclick="checkAll(this);">&nbsp;</a></th>
  6. <th width="10" class="fileColumns">&nbsp;</th>
  7. <th class="docName"><?php echo LBL_NAME; ?></th>
  8. <th width="70" class="fileColumns"><?php echo LBL_SIZE; ?></th>
  9. <th class="fileColumns"><?php echo LBL_MODIFIED; ?></th>
  10. </tr>
  11. </thead>
  12. <tbody id="fileList">
  13. <?php
  14. $count = 1;
  15. $css = "";
  16. //list all documents (files and folders) under this current folder,
  17. //<?php echo appendQueryString(appendQueryString(CONFIG_URL_FILEnIMAGE_MANAGER, "path=" . $file['path']), makeQueryString(array('path')));
  18. foreach($fileList as $file)
  19. {
  20. $css = ($css == "" || $css == "even"?"odd":"even");
  21. $strDisabled = ($file['is_writable']?"":" disabled");
  22. $strClass = ($file['is_writable']?"left":" leftDisabled");
  23. if ($file['type'] == 'file')
  24. {
  25. ?>
  26. <tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>" >
  27. <td align="center" id="tdz<?php echo $count; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input type="checkbox" name="check[]" id="cb<?php echo $count; ?>" value="<?php echo $file['path']; ?>" <?php echo $strDisabled; ?> />
  28. </td>
  29. <td align="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" target="_blank"><span class="<?php echo $file['cssClass']; ?>">&nbsp;</span></a></td>
  30. <td class="<?php echo $strClass; ?> docName" id="tdnd<?php echo $count; ?>"><?php echo $file['name']; ?></td>
  31. <td class="docInfo" id="tdrd<?php echo $count; ?>"><?php echo transformFileSize($file['size']); ?></td>
  32. <td class="docInfo" id="tdth<?php echo $count; ?>"><?php echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td>
  33. </tr>
  34. <?php
  35. }else
  36. {
  37. ?>
  38. <tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>" >
  39. <td align="center" id="tdz<?php echo $count; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input type="checkbox" name="check[]" id="cb<?php echo $count; ?>" value="<?php echo $file['path']; ?>" <?php echo $strDisabled; ?>/>
  40. </td>
  41. <td lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?> ><span class="<?php echo ($file['file']||$file['subdir']?$file['cssClass']:"folderEmpty"); ?>">&nbsp;</span></a></td>
  42. <td class="<?php echo $strClass; ?> docName" id="tdnd<?php echo $count; ?>"><?php echo $file['name']; ?></td>
  43. <td class="docInfo" id="tdrd<?php echo $count; ?>">&nbsp;</td>
  44. <td class="docInfo" id="tdth<?php echo $count; ?>"><?php echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td>
  45. </tr>
  46. <?php
  47. }
  48. $count++;
  49. }
  50. ?>
  51. </tbody>
  52. </table>
  53. </div>