<script type="text/javascript" src="<?= VIS_PATH_SCRIPT; ?>datatables/data-tables/DT_bootstrap.js"></script>
<?  
	global $vis_language;
	
	if($post_details!=-1){ ?>
	
		<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><? echo $vis_language['TXTCLIENT']; ?></th>
					
					<th><? echo $vis_language['TXTEMAIL']; ?></th>
					
					<th><? echo $vis_language['TXTCONTACTNUMBER']; ?></th>
					
					<th><? echo $vis_language['TXTORGANIZATION']; ?></th>
					
				</tr>

			</thead>
			
			<tbody>
			<? 
				foreach($post_details as $details) {
					
					if($details['contact_number']!=''){
						$contact_number = $details['contact_number'];
					}else{
						$contact_number = '-';
					}
					
					echo '<tr>';
					
					echo '<td class="txt_nowrap">'.$details['first_name'].' '.$details['last_name'].'</a></td>';
					
					echo '<td class="txt_nowrap">'.$details['email'].'</td>';
					
					echo '<td class="txt_nowrap">'.$contact_number.'</td>';
					
					echo '<td class="txt_nowrap">'.$details['group_name'].'</td>';
					
					echo '</tr>';
				}
			?>
			</tbody>
			
		</table>
		
		<script>

		 	$("#vis_export_rpt_<?= $operation['vis_operation'] ?>").show(); 

			$("#vis_export_rpt_<?= $operation['vis_operation'] ?>").html('<a href="javascript:void(0);" class="vis_button_export btn btn-primary btn-sm" data-toggle="ajaxModal" data-modal-arguments="vis_module=report&vis_operation=add_report_inqueue&vis_static_area=vis_open_new_dialog&domain_id=<? echo $data['domain_id'];?>&group_id=<? echo $data['group_id'];?>&report_type=81" onclick="" type="button"><? echo $vis_language['TXTEXPORT']; ?></a>');	

			$("#vis_schedule_rpt_<?= $operation['vis_operation'] ?>").show(); 

			$("#vis_schedule_rpt_<?= $operation['vis_operation'] ?>").html('<a href="javascript:void(0);" class="vis_button_export btn btn-primary btn-sm" data-toggle="ajaxModal" data-modal-arguments="vis_module=report&vis_operation=add_schedule_report_inqueue&vis_static_area=vis_open_new_dialog&domain_id=<? echo $data['domain_id'];?>&group_id=<? echo $data['group_id'];?>&report_type=81" onclick="" type="button"><? echo $vis_language['TXTSCHEDULE']; ?></a>');		

		</script>
		
		<? 
		
	}
	else
	{
		$operation['no_record']=1;
		
		include(VIS_PATH_TEMPLATE.'no_record_yet.php');
		
		?>
		
		<script>
		
			$("#vis_export_rpt_<?= $operation['vis_operation'] ?>").hide();
			
			$("#vis_schedule_rpt_<?= $operation['vis_operation'] ?>").hide();
			
		</script>
		
		<?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 },	

			{ "bSortable": true }

		]

	});
});	

</script>