<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">

    <?php $hpl=$_REQUEST['hpl'];?>
  <?php $name=$_REQUEST['name'];?>
  <!--  page-wrapper -->
 
            <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 vnet 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;">Due Month</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['no'];?></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;">Due amount</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['dueamount'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Paid month</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['paid'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Total amount paid</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['tamount'];?></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;">Chasing Date</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['bmnt'];?></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 amount</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['tot'];?></td>
						</tr>
						<tr>
						<td style="background-color:#FFAAAA;">Recipt Number</td>
						<td style="background-color:#FFD4FF;"><?php echo $row['rno'];?></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 vnet where mfin='$mfin' &&  hpl='$hpl'");
								$n=mysqli_num_rows($qry);
								if($n==0)
									{
										echo"Already Deleted";
									}
								else		
									{
										$delete=mysqli_query($conn, "delete from vnet 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/fooder.php"; ?></div></div>
 <!-- end wrapper -->

    <!-- Core Scripts - Include with every page -->
    <script src="assets/plugins/jquery-1.10.2.js"></script>
    <script src="assets/plugins/bootstrap/bootstrap.min.js"></script>
    <script src="assets/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="assets/plugins/pace/pace.js"></script>
    <script src="assets/scripts/siminta.js"></script>
    <!-- Page-Level Plugin Scripts-->
    <script src="assets/plugins/morris/raphael-2.1.0.min.js"></script>
    <script src="assets/plugins/morris/morris.js"></script>
    <script src="assets/scripts/dashboard-demo.js"></script>

</body>

</html>
