<?php include "layouts/menu.php"; ?> 
    <?php $hpl=$_REQUEST['hpl'];?>
  <?php $name=$_REQUEST['name'];?>
  <!--  page-wrapper -->
         <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header  alert alert-info">Updates</h1>
                </div>
                <!--end page header -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Details
                        </div>
                        <div class="panel-body">
                            <div class="row">
        <div id="mydiv">
  <input type="button" value="Print" onclick="PrintElem('#mydiv')"  style="margin:20px;">
     <div class="alert alert-info">Customer Details Deletion</div>
  
                    <form name="form1" method="post" action="" enctype="multipart/form-data">
						<?php
						$qry=mysqli_query($conn, "select * from vnet2 where mfin='$mfin' &&  hpl='$hpl'");
						?>
					<?php 
					$row=mysqli_fetch_array($qry)
					?>
					<table class="table table-striped" >
					<col width="150px">
					<tbody style="color:#FF0080;background:white;">
					    <tr>
						<td style="background-color:#FFAAAA;">Photo</td>
						<td style="background-color:#FFD4FF;"><img src="user/<?php echo $row['uimg'];?>" width="120" height="120"/></td>
						</tr>
      					<tr>
						<td style="background-color:#FFAAAA;">Hpl</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['hpl'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Name</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['name'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">H.P Date</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['duedate'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Interest</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['dueamount'];?></td>
						</tr>
						
						<tr>
						<td style="background-color:#FFAAAA;">H.P Amount</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['dueamt'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Interest</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['amt'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Total</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['tot'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Recipt No</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['rno'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Pay Date</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['paydate'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Delete</td>						
						<td style="background-color:#FFD4FF;"><button type="submit" class="btn btn-default" name="s1">Delete</button></td>
						</tr>
						
						
							<div class="alert alert-warning">
							<?php
							if(isset($_POST['s1']))
							{
								extract($_POST);
								$qry=mysqli_query($conn, "select * from vnet2 where mfin='$mfin' &&  hpl='$hpl'");
								$n=mysqli_num_rows($qry);
								if($n==0)
									{
										echo"Already Deleted";
									}
								else		
									{
										$delete=mysqli_query($conn, "delete from vnet2 where mfin='$mfin' &&  hpl='$hpl'");
										if($delete)
										{
										echo"Deleted";
										}
										else
										{
										echo "Try Again";
										}
									}
							}			
							
						   
								
?>							</div>
													<div class="alert alert-warning">
							<?php
							if(isset($_POST['s2']))
							{
								extract($_POST);
								$qry=mysqli_query($conn, "select * from duedate where mfin='$mfin' &&  hpl='$hpl'");
								$n=mysqli_num_rows($qry);
								if($n==0)
									{
										echo"Already Deleted";
									}
								else		
									{
										$delete=mysqli_query($conn, "delete from duedate where mfin='$mfin' &&  hpl='$hpl'");
										if($delete)
										{
										echo"Deleted";
										}
										else
										{
										echo "Try Again";
										}
									}
							}			
							
						   
								
?>							</div>
						
																
					</tbody>
					<?php
					
				
			?>			
					</table>
					</form>
</div>
</div></div>
</div></div></div> <?php include "layouts/footer.php"; ?> </body></html>