<script type="text/javascript" src="<?= VIS_PATH_SCRIPT; ?>datatables/data-tables/DT_bootstrap.js"></script>
<? 
    global $vis_language;
    $start=0;
	if(!empty($online_staff)) { ?>
			<table cellpadding="0" cellspacing="0" border="0" class="table table-hover b-t b-light m-b-none" id="datatable" style="top:100px;">
 			 <?        
			 	echo '<thead class="table_head">					
						<tr>
							<th>'.$vis_language['TXTSTAFF'].'</th>	
							<th>'.$vis_language['TXTPOINTS'].'</th>
							<th>'.$vis_language['TXTBADGE'].'</th>
						</tr>
					 </thead>';  
				for($i=0;$i<count($online_staff);$i++) 
				{
				   $points = ($online_staff[$i]['staff_point']!='')?$online_staff[$i]['staff_point']:'0';
				   $badge = ($online_staff[$i]['image_path']!='')?'<div class="'.$online_staff[$i]['image_path'].'"></div>':$vis_language['MSGNOBADGE'];
				   echo '<tr><td>'.$online_staff[$i]['first_name'].' '.$online_staff[$i]['last_name'].' </td>
					     <td>'.$points.'</td>
					     <td>'.$badge.'</td></tr>';
				} ?>
               
            </table>
        <?
    }
    else  {
	$operation['no_record']=1;
       include(VIS_PATH_TEMPLATE.'no_record_yet.php');
    } ?>
	
	<script>
$(document).ready(function() {	
$('#datatable').dataTable({		
       "bPaginate" : true,
       "aaSorting":  [],
       "iDisplayLength": <?php echo SECURITY_DATA_PER_PAGE;?>,		
	   "sDom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>', 		
	   "bFilter" : false,
	   "bLengthChange": false,
	   "bInfo": false,
	   "aoColumns": [
			{ "bSortable": true },
			{ "bSortable": true },
		  	{ "bSortable": true }
		]
	});
	
});	

</script>
