<?  global $vis_language;
if(count($teamviewer_meetings['meetings'])>0){ 
?> 
<script> $("#view_action").show();</script>
<table cellpadding="0" cellspacing="0" border="0" class="table table-hover b-t b-light m-b-none" id="datatable">
   <thead class="table_head">
	  <tr>
		 <th class="txt_nowrap"><? echo $vis_language['TXTSUBJECT']; ?></th>   
		 <th class="txt_nowrap"><? echo $vis_language['TXTSTARTDATE'];?></th>
		 <th class="txt_nowrap"><? echo $vis_language['TXTENDDATE'];?></th>		
	     <th class="txt_nowrap"><? echo $vis_language['TXTMEETINGID'];?></th>
		 <th class="txt_nowrap"><? echo $vis_language['TXTWEBLINK'];?></th> 
		 <th></th>            
		 <!--<th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>-->
	  </tr>
   </thead>
   <tbody>
	  <? 
		  for($i=0;$i<count($teamviewer_meetings['meetings']);$i++) {  			  	 
			  echo '<tr>';
   			  echo '<td ><a href="#/remoteaccess/teamviewer_details/'.$vis_domain.'/'.$teamviewer_meetings['meetings'][$i]['id'].'">'.$teamviewer_meetings['meetings'][$i]['subject'].'</a></td>';					
			  echo '<td class="txt_nowrap">'.format_datetime(strtotime($teamviewer_meetings['meetings'][$i]['start'])).'</a></td>';
			  echo '<td class="txt_nowrap">'.format_datetime(strtotime($teamviewer_meetings['meetings'][$i]['end'])).'</a></td>';
			  echo '<td class="txt_nowrap">'.$teamviewer_meetings['meetings'][$i]['id'].'</a></td>';
			  echo '<td class="txt_nowrap">'.$teamviewer_meetings['meetings'][$i]['participant_web_link'].'</a></td>';
			  echo '<td align="center"> <a class="text-muted" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=remoteaccess&vis_operation=get_teamviewer_meeting_delete&vis_meeting_id='.$teamviewer_meetings['meetings'][$i]['id'].'&vis_domain='.$vis_domain.'&vis_static_area=vis_meeting_delete_form" title="'.$vis_language['TXTDELETE'].'"><i class="vh vh-delete-round"></a></td>';
				echo '</tr>';
			
		  } ?>    
   </tbody>
</table>
<script>
$(document).ready(function() {	
$('#datatable').dataTable({		
       "bPaginate" : true,
       "aaSorting": [[ 2, "desc" ]],
        "iDisplayLength": <?php echo SECURITY_DATA_PER_PAGE;?>,
		"sDom": 'ltipr',
		"bLengthChange": false,
		"bInfo": false,
		"aoColumns": [
			{ "bSortable": false },
		  	{ "bSortable": false },
		  	{ "bSortable": false },
		  	{ "bSortable": false },
			{ "bSortable": false },
		  	{ "bSortable": false }
		]
	});
});	
</script>
<?
}
else
{
 if(isset($operation['vis_filter_enable'])) echo '<script> $("#view_action").hide(); </script>';
 include(VIS_PATH_TEMPLATE.'no_record_yet.php');
} ?>
