 <form action="" method="post">

<div class="col-md-12 well" style="margin-bottom:10px;">
            <div class="col-md-3">
			<?php
			
            $rowcount=mysqli_num_rows($res);

if($rowcount==0)
{
	echo '<label>No Customers Record Found</label>';
}
				
$today = date("d/m/y", strtotime($today));
echo '<label>Total '.$rowcount.' Customers</label>';

?>
</div>
            
             
				
                <div class="col-md-3">
                <a href="new_customers.php" class="btn btn-info btn-sm>">Add New Customer</a>
                </div> 
                <div class="col-md-3">
   
    <input name="delete_company" type="submit" class="btn btn-sm btn-danger" value="Delete"/>
  
	</div>
                </div>
<table style="font-size:16px; color:#000000;" id="companies" class="table table list_jobs table-hover table-bordered table-striped table-info" cellspacing="0" border="1">

        
			
            
           <thead>    
            <tr class="btn-primary" style="padding:10px;">

                            <th>Sr. No.</th>
                            <th>Customer</th>
                            <th>Phone</th>
                            <th>Email</th>
                            <th>Address</th>
							<th>Edit</th>
                           
                            <th>Select<input type="checkbox" id="select_all" /></th>
                           
                         
                           
          </tr>

        </thead>

        <tfoot>

            <tr class="btn-primary">
                            <th>Sr. No.</th>
                            <th>Customer</th>
                            <th>Phone</th>
                            <th>Email</th>
                            <th>Address</th>
							<th>Update</th>
                            <th></th>
                            
                          
            </tr>

        </tfoot>

        <tbody>
        
        <?php
					$i=1;
                while($job=mysqli_fetch_assoc($res))
				 {
					  $i;
			     ?>      
                 <tr class="update_job" row-id="<?php echo $job['id'];?>">
                 <input type="hidden" name="id[]" value=<?php echo $job['id'];?>>
				 		  <td><?php echo $i;?></td>
                 		  <td><?php echo strtoupper($job['first_name']);?></td>
                          <td><?php echo $job['phone'];?></td>
                          <td><?php echo $job['email'];?></td>
                          <td><?php echo strtoupper($job['address']."<br>".$job['post_code']);?></td>
                          <td><a href="edit_supplier.php?company_id=<?php echo $job['id'];?>">edit<i class="fa fa-pencil-square-o"></i></a></td>
                          <td style="text-align:right;"><input name="selected_company[]" type="checkbox" class="checkbox selected_company" value=<?php echo $job['id'];?>></td>
                        </tr>
				 <?php 
                 $i++;
                 } ?>
   		              </tbody>
			   </table>
            </form>

<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Success</h4>
      </div>
      <div class="modal-body">
        <p>Records Updated Succesfully.</p>
      </div>
      <div class="modal-footer">
        <button id="close_me" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>

  </div>
</div>
<?php /////////// if Delete is Pressed //

 if(isset($_POST['delete_company']))
			{
		
		/*		
			echo "<pre>";
  				 print_r($_POST);
			echo "</pre>";
		exit;
		*/
		$bookingIds = $_POST;
		$count=count($_POST['selected_company']);
		for ($i=0;$i<$count;$i++){
			$counter=1+$i;
			$index = array_search($_POST['selected_company'][$i] ,$bookingIds['id']);
			
		    $id=$con->real_escape_string($_POST['selected_company'][$i]);
		
		
		     $DELETE_booking="DELETE FROM employees WHERE id=$id";
					  //echo $DELETE_booking;
					  if (!mysqli_query($con,$DELETE_booking)) {
							echo $update_booking;
							die('DELETE 3 INTO Bookings -Error: ' . mysqli_error($con));
							exit;
						 }
					  
		   }
		echo '<script>alert("Record Deleted");var url11 = "list_suppliers.php?"+new Date().getTime(); window.location.replace(url11);</script>';
		}
?>

	<script type="text/javascript">
$(document).ready(function(){
    $('#select_all').on('click',function(){
        if(this.checked){
            $('.checkbox').each(function(){
                this.checked = true;
            });
        }else{
             $('.checkbox').each(function(){
                this.checked = false;
            });
        }
    });
    
    $('.checkbox').on('click',function(){
        if($('.checkbox:checked').length == $('.checkbox').length){
            $('#select_all').prop('checked',true);
        }else{
            $('#select_all').prop('checked',false);
        }
    });
});

  $(document).ready(function() {
    $('#companies1').DataTable( {
        dom: 'Bfrtip',
		"cache": false,
        buttons: [
            'copyHtml5',
            'excelHtml5',
            'csvHtml5',
            'pdfHtml5',
			'print'
			        ]
    } );
} );

</script>