Advertisement
Guest User

Untitled

a guest
Oct 14th, 2014
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.55 KB | None | 0 0
  1. <script>
  2.     $(document).ready(function() {
  3.         $('#fileData').dataTable( {
  4.             "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
  5.             "iDisplayLength": 10,
  6.             "sPaginationType": "full_numbers",         
  7.             "aaSorting": [[ 0, "desc" ]],
  8.             "aoColumns": [ {},{},{},{sClass: "alignCenter"}]
  9.         } );
  10.  
  11.     } );
  12. </script>
  13. <div class="col-md-12 animated" data-animation="fadeInUp" data-animation-delay="900">
  14.     <div class="contentPageWrapper">
  15.         <div class="pageSectionMainFull ui-corner-all">
  16.             <div class="pageSectionMainInternal">
  17.                 <p class="introText">
  18.                     <?php
  19.                     if ($results)
  20.                     {
  21.                         echo '<table id="fileData" class="accountStateTable table table-bordered table-striped" width="100%" cellpadding="0" cellspacing="0">';
  22.                         echo '<thead>';
  23.                         echo '<th class="ui-state-default" style="width: 19px;"></th>';
  24.                         echo '<th class="ui-state-default">'.t('ysm_advsearch_results_filename', 'Filename:').'</th>';
  25.                         echo '<th class="ui-state-default" text-align: center;">'.t('ysm_advsearch_results_file_size', 'Filesize').'</th>';
  26.                         echo '<th class="ui-state-default" text-align: center;">'.t('ysm_advsearch_results_download', 'Download File').'</th>';
  27.                         echo '</thead>';
  28.                         echo '<tbody>';
  29.                         foreach ($results AS $file)
  30.                         {
  31.                             echo '<tr>';
  32.                             echo '<td class="txtCenter">';
  33.                             $fileTypePath = DOC_ROOT.'/themes/'.SITE_CONFIG_SITE_THEME.'/images/file_icons/32px/'.$file['extension'].'.png';
  34.                             if (file_exists($fileTypePath))
  35.                             {
  36.                                 echo '  <img src="'.SITE_IMAGE_PATH.'/file_icons/32px/'.$file['extension'].'.png" width="32" height="32" title="'.$file['extension'].' file"/>';
  37.                             }
  38.                             else
  39.                             {
  40.                                 echo '  <img src="'.SITE_IMAGE_PATH.'/file_icons/32px/_blank.png" width="32" height="32" title="Unknown file type"/>';
  41.                             }
  42.                             echo '</td>';
  43.                             echo '<td title="'.$file['originalFilename'].'">'.$file['originalFilename'].'</td>';
  44.                             echo '<td title="'.coreFunctions::formatSize($file['fileSize']).'">'.coreFunctions::formatSize($file['fileSize']).'</td>';
  45.                             echo '<td title="Download File - '.$file['originalFilename'].'">';
  46.                             echo '<a href="'.file::getFileUrl($file['id']).'" target="_blank">'.t('ysm_advsearch_download_file', '[Download File]').'</a>';
  47.                             echo '</td>';
  48.                             echo '</tr>';
  49.                         }                      
  50.                         echo '</tbody>';
  51.                         echo '</table>';
  52.                     }
  53.                     else
  54.                     {
  55.                         echo t('ysm_advsearch_no_results', 'No files that matched your query was found.');
  56.                     }
  57.                     ?>
  58.                 </p>
  59.                 <div class="clear"></div>
  60.             </div>
  61.         </div>
  62.     </div>
  63. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement