<? global $vis_language; 
if(count($all_magento_client)==0){   
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
 } else { ?>
 <?php foreach($all_magento_client as $magento_clients){ ?>
<div  class="col-lg-12">
   <form name="vis_impact_form" id="vis_impact_form">
	   
		  <section class="panel">
				<div class="panel-heading">
				   <h4 class="m-b-xs text-black"><?= $magento_clients['integration_details']['billing_url'];?></h4>
				</div> <!-- /.panel-heading -->
		 
			<div class="panel-body">
			 <div class="table-responsive scroll-x">
				<table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
				   <thead class="table_head">
     					<tr>
							<th><? echo $vis_language['TXTNAME']; ?></th>
							<th class="txt_nowrap"><? echo $vis_language['TXTEMAIL']; ?></th>
							<th class="txt_nowrap"><? echo $vis_language['TXTCREATEDAT']; ?></th>
						</tr>
				   </thead>
				   <tbody>
					  <?
					    foreach($magento_clients['client'] as $client_info){
							$url ='$(\'#vis_workpanel_div\').visExecution(\'load_module\',\''.$client_info['firstname'].' '.$client_info['lastname'].'\',{\'vis_module\':\'client\',\'vis_operation\':\'magento_client\', \'customer_id\':\''.$client_info['customer_id'].'\', \'integration_id\':\''.$magento_clients['integration_details']['integration_id'].'\', \'customer_name\':\''.$client_info['firstname'].' '.$client_info['lastname'].'\'});';
							
							echo '<tr style="cursor: pointer;"><td><a onclick="'.$url.'">'.$client_info['firstname'].' '.$client_info['lastname'].'</a></td>';
							echo '<td><a onclick="'.$url.'">'.$client_info['email'].'</a></td>';
							echo '<td><a onclick="'.$url.'">'.format_datetime(strtotime($client_info['created_at'])).'</a></td></tr>';
						}?>
				   </tbody>
				</table>
			 </div>
			 </div>
		  </section>
	  
   </form>
</div> 
<?php }?>
<script src="<?= VIS_PATH_SCRIPT; ?>dropdown_dropup.js"></script><? } ?>
<script type="text/javascript">
   $(".selectpicker").selectpicker(); 
   $(document).ready(function() {	
   $('[data-ride="datatables"]').dataTable({		
          "bPaginate" : false,	
   		"sDom": 't', "bAutoWidth": false,
   		"aoColumns": [
   			{ "bSortable": false },
   		  	{ "bSortable": false },
   			{ "bSortable": false }
   		]
   	});
   });
</script>
