

<div class="modal fade" id="userdelete<?php echo $id ?>" tabindex="-1" role="form" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> Cancel &times;</button>
                <h4  class="modal-title" id="myModalLabel">Confirm User Delete&nbsp;&nbsp;&nbsp;
				Name: <?php echo $Fname." ". $Lname ?> &nbsp;&nbsp; Groups: &nbsp;<?php echo $numrows  ?> </h4> 
					 
            </div>
			 <form name="form1" data-parsley-validate class="form-horizontal form-label-left" method="post" action="" onsubmit="return validate()" >
				<div class="modal-body">
				   <input type="hidden" name="uid" id="uid" value="<?php echo $id ?> "/>
				
				       <p> 
					    <b style="text-align:center;color:red;"> Note: Deleting this user will also delete everything else related to this user!</b>
					   </p>
						<div class="form-group">
							<label> <b>Are you sure you want to delete this User? </b> </label>
						</div>
					   	
				</div>
            <div class="modal-footer">
			     <input type="submit" name="submit" class="btn btn-info"  value="Delete User"  />
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
		</form>
        </div>
    </div>
</div>

<?php 
   if(isset($_POST['submit'])){
	   $cid = $_POST['uid'];
				
				mysql_query("delete from airtime_groups where customer_id='$cid' ");
				
				mysql_query("delete from airtime_contacts where customer_id='$cid' ");
				
				mysql_query("delete from airtime_topup_requests where customer_id='$cid' ");
				
				 $sql=mysql_query("delete from airtime_customer where customer_id='$cid' ") or die (mysql_error());
     }



?>
