<?  global $vis_language;
if(count($teamviewer_sessions['sessions'])>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['TXTLANGUAGECODE']; ?></th>   
		 <th class="txt_nowrap"><? echo $vis_language['TXTSTATE'];?></th>
		 <th class="txt_nowrap"><? echo $vis_language['TXTGROUPID'];?></th>		
	     <th class="txt_nowrap"><? echo $vis_language['TXTONLINE'];?></th>		          
		 <!--<th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>-->
	  </tr>
   </thead>
   <tbody>
	  <?
		  for($i=0;$i<count($teamviewer_sessions['sessions']);$i++) { // echo $teamviewer_meetings['meetings'][$i]['id'];	
			  echo '<tr>';
   			  echo '<td ><a href="#/remoteaccess/teamviewer_session_details/'.$vis_domain.'/'.$teamviewer_sessions['sessions'][$i]['code'].'">'.$teamviewer_sessions['sessions'][$i]['code'].'</a></td>';	
			  echo '<td class="txt_nowrap">'.$teamviewer_sessions['sessions'][$i]['state'].'</a></td>';
			  echo '<td class="txt_nowrap">'.$teamviewer_sessions['sessions'][$i]['groupid'].'</a></td>';
			  if($teamviewer_sessions['sessions'][$i]['online']!=1){  echo '<td class="txt_nowrap">false</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 }
		]
	});
});	
</script>
<?
}
else
{if(isset($operation['vis_filter_enable'])) echo '<script> $("#view_action").hide(); </script>';
 include(VIS_PATH_TEMPLATE.'no_record_yet.php');
} ?>
