<? global $vis_language;?>

   <? $status=array($img => ' <i class="vh vh-module"></i>');
   $priority=array(1 => $vis_language['TXTLOW'],2 => $vis_language['TXTMEDIUM'],3 => $vis_language['TXTHIGH']); 
 
 ?>
                   
            	<?if($file_list!=-1)
{  
	for($i=0; $i<$filecount; $i++){
if((!empty($file_list[$i]['mimeType']))&&$file_list[$i]['mimeType']!='Directory') 
{

	$flag=0;

$creation_date=$file_list[$i]['createdDate'];
$date=date(VIS_DATE_FORMAT,strtotime($creation_date));


?>
             
			    <a data-modal-arguments="vis_module=selfhelp&vis_operation=mygoogledrive_details&vis_title=<?=urlencode($file_list[$i]['title']) ?>&vis_date=<?=urlencode($date)?>&vis_owner=<?=urlencode($file_list[$i]['ownername'])?>&vis_thumblink=<?=urlencode($file_list[$i]['thumbnailLink']);?>&vis_mimetype=<?=urlencode($file_list[$i]['mimeType']);?>&vis_size=<?=urlencode($file_list[$i]['fileSize']);?>" data-toggle="ajaxModal" href="javascript:void(0);"> 
				
				
                        <div class="drive-info">
                                <div class="drive-item">
                                        <?  if($file_list[$i]['mimeType']=='text/plain') { ?>
      <i class="vh vh-file-text text-muted"></i>
      <?}
      else if($file_list[$i]['mimeType']=='image/jpeg') { ?>
        <img src="<?=$file_list[$i]['thumbnailLink'];?>" alt="<?=$file_list[$i]['thumbnailLink'];?>" />
      <?}
      else if($file_list[$i]['mimeType']=='application/vnd.ms-excel') { ?>
       <i class="vh vh-file-spreadsheet vh-file-spreadsheet-color"></i>
      <?}
      else if($file_list[$i]['mimeType']=='image/png') { ?>
        <img src="<?=$file_list[$i]['thumbnailLink'];?>" alt="<?=$file_list[$i]['thumbnailLink'];?>" />
       <?} 
       else if($file_list[$i]['mimeType']=='application/pdf') { ?>
      <i class="vh vh-file-pdf vh-file-pdf-color"></i>
       <?}
       else if($file_list[$i]['mimeType']=='application/vnd.openxmlformats-officedocument.wordprocessingml.document') { ?>
      <i class="vh vh-file-word vh-file-word-color"></i>
        <?}
        else if($file_list[$i]['mimeType']=='text/csv') { ?>
      <i class="vh vh-file-spreadsheet vh-file-spreadsheet-color"></i>
        <?} 
        else if($file_list[$i]['mimeType']=='message/rfc822') { ?>
      <i class="vh vh-file-text text-muted"></i>
        <?}
         else if(($file_list[$i]['mimeType']=='application/zip') || ($file_list[$i]['mimeType']=='application/octet-stream')) { ?>
      <i class="vh vh-file-zip vh-file-zip-color"></i>
        <?}
        else if($file_list[$i]['mimeType']=='application/vnd.openxmlformats-officedocument.presentationml.presentation') { ?>
      <i class="vh vh-file-presentation vh-file-presentation-color"></i>
        <?} else
        {?>
			<i class="vh vh-file vh-info"></i>
		<?}
        ?>
                                </div>
                                <div class="drive-item-name">
                                        <small>Name</small>
                                       <?= $file_list[$i]['title']?>
                                </div>
                                <div class="drive-item-owner">
                                        <small>Owner</small>
                                        <?=$file_list[$i]['ownername']?>
                                </div>
                                <div class="drive-item-size">
                                        <small>Size</small>
                                       <?= $file_list[$i]['fileSize']." Bytes";?> 
                                </div>
                                <div class="drive-item-date">
                                        <small>Creation date</small>
                                        <?= $date?>
                                </div>
                        </div>
                </a>
                
             
	<?   }
   }
 
		}?>	
		
		