<? global $vis_language; 
if($log_details==-1 || $log_details[0] == ''){ 
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
	echo '<script> $("#view_action").hide(); $("#vis_gateway_log_form .panel-footer").hide(); $("#vis_transactionlog_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
 } else { ?>
<script> $("#view_action").show(); $("#vis_gateway_log_form .panel-footer").show(); $("#vis_transactionlog_list").show(); </script>
 <table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
               <thead class="table_head">		   
                  <tr>
                     <th>
                        <div class="btn-group">
                           <label class="checkbox m-n m-r-sm i-checks"  style="float: left;"><input type="checkbox"><i></i></label>		
                        </div>
                     </th>
                     <th class="txt_nowrap"><? echo "#" . $vis_language['TXTINVOICE']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTGATEWAY']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTDATE']; ?></th>				 
                  </tr>
               </thead>		   
               <tbody>		   
                  <?
                        if($log_details != -1) for($i=0; $i<count($log_details); $i++) {  
							switch( $log_details[$i]['gateway_id'] )
							{
								case 1: $gateway = 'Paypal';
								break;
								case 2: $gateway = 'Authorize.net';
								break;
                                case 3: $gateway = 'Stripe';
								break;
							}  						    
                         echo '<tr><td width="30" id="checkbox_data"><label class="checkbox m-n i-checks"><input type="checkbox" name="vis_global_mass_chk_'.$i.'" id="vis_global_mass_chk_'.$i.'" value="'.$log_details[$i]['log_id'].'" /><i></i></label></td>';
						 echo '<td><a href="#/setting/gateway_transaction_details/'.$vis_language['MSGGATEWAYTRANSACTIONDETAILS'].'/'.$log_details[$i]['log_id'].'">'.$log_details[$i]['invoice_hash'].'</a></td>';
                         echo '<td><a href="#/setting/gateway_transaction_details/'.$vis_language['MSGGATEWAYTRANSACTIONDETAILS'].'/'.$log_details[$i]['log_id'].'">'.$gateway.'</a></td>';
                         echo '<td><a href="#/setting/gateway_transaction_details/'.$vis_language['MSGGATEWAYTRANSACTIONDETAILS'].'/'.$log_details[$i]['log_id'].'">'.$log_details[$i]['gateway_status'].'</a></td>';
						 echo '<td><a href="#/setting/gateway_transaction_details/'.$vis_language['MSGGATEWAYTRANSACTIONDETAILS'].'/'.$log_details[$i]['log_id'].'">'.format_datetime($log_details[$i]['entry_date']).'</a></td>';
						 echo '</tr>';
                     } ?>
               </tbody>
            </table>			<? } ?>
<script type="text/javascript">
	$(".selectpicker").selectpicker();
   $(document).ready(function() {	
   $('[data-ride="datatables"]').dataTable({
   	 "bPaginate" : false,				
          "paginate": false,
   		"sDom": 't', "bAutoWidth": false,
   		"aoColumns": [
   			{ "bSortable": false },
   		  	null,
   		  	null,
   		  	null,
   		  	null
   		]
   	});
   });  
</script>
