<? global $vis_language;?>    
<table class="table table-hover b-t b-light m-b-none m-t" data-ride="datatables">
	<thead class="table_head">
		<tr>         
			<th><? echo $vis_language['TXTTICKETITEM']; ?></th>
			<th><? echo $vis_language['TXTNAME']; ?></th>
			<th><? echo $vis_language['TXTSIZE']; ?></th>
			<th><? echo $vis_language['TXTTYPE']; ?></th>
		</tr>
	</thead>
	<tbody>
     <?
        for($i=0; $i<count($ticket_attachment_info); $i++) {
				
	if($ticket_attachment_info[$i]['file_type']=='text/plain') { 
     $link_type='<i class="vh vh-file-text text-muted" style="font-size:400%"></i>';
      }
      else if($ticket_attachment_info[$i]['file_type']=='image/jpeg') { 
       $link_type='<img src="'.VIS_PATH_FILES.$ticket_attachment_info[$i]['content'].'" alt="'.VIS_PATH_FILES.$ticket_attach_info[$i]['content'].'" width="50" height="50"/>';
      }
      else if($ticket_attachment_info[$i]['file_type']=='application/vnd.ms-excel') {
      $link_type='<i class="vh vh-file-spreadsheet vh-file-spreadsheet-color" style="font-size:400%"></i>';
      }
      else if($ticket_attachment_info[$i]['file_type']=='image/png') { 
       $link_type='<img src="'.VIS_PATH_FILES.$ticket_attachment_info[$i]['content'].'" alt="'.VIS_PATH_FILES.$ticket_attach_info[$i]['content'].'" width="50" height="50"/>';
       } 
       else if($ticket_attachment_info[$i]['file_type']=='application/pdf') { 
     $link_type='<i class="vh vh-file-pdf vh-file-pdf-color" style="font-size:400%"></i>';
       }
       else if($ticket_attachment_info[$i]['file_type']=='application/vnd.openxmlformats-officedocument.wordprocessingml.document') { 
     $link_type='<i class="vh vh-file-word vh-file-word-color" style="font-size:400%"></i>';
        }
        else if($ticket_attachment_info[$i]['file_type']=='text/csv') { 
     $link_type='<i class="vh vh-file-spreadsheet vh-file-spreadsheet-color" style="font-size:400%"></i>';
       } 
        else if($ticket_attachment_info[$i]['file_type']=='message/rfc822') { 
     $link_type='<i class="vh vh-file-text text-muted" style="font-size:400%"></i>';
       }
         else if(($ticket_attachment_info[$i]['file_type']=='application/zip') || ($ticket_attach_info[$i]['file_type']=='application/octet-stream')) { 
     $link_type='<i class="vh vh-file-zip vh-file-zip-color" style="font-size:400%"></i>';
        }
        else if($ticket_attachment_info[$i]['file_type']=='application/vnd.openxmlformats-officedocument.presentationml.presentation') { 
    $link_type='<i class="vh vh-file-presentation vh-file-presentation-color" style="font-size:400%"></i>';
        } else
        {
		$link_type='<i class="vh vh-file vh-info" style="font-size:400%"></i>';
		}
				
        echo '<tr>
        <td>'.$link_type.'</td>
        <td><a href="'.$ticket_attachment_info[$i]['domain_url'].'manage/?vis_module=export&vis_operation=get_attachment&vis_attachment='.$ticket_attachment_info[$i]['attachment_id'].'&'.VIS_STAFF_COOKIE.'='.$_COOKIE[VIS_STAFF_COOKIE].'" class="link">'.substr($ticket_attachment_info[$i]['file_name'],0,50).'</a></td>
        <td>'.$ticket_attachment_info[$i]['file_size'].' KiB</td>
        <td>'.$ticket_attachment_info[$i]['file_type'].'</td></tr>';
    } ?>
   </tbody>
</table>
