<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header  alert alert-info">Insurance Details</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">
                            Fill the form
                        </div>
                        <div class="panel-body">
                            <div class="row">
   <div class="alert alert-info">Register Insurance  Details Here</div>
   <form name="form1" class="form-horizontal" method="post" action="insurance.php" enctype="multipart/form-data">
      <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Hpl</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="inputpassword3" name="hpl" value="" placeholder="E.g 1008" required>
    </div>
  </div>
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Insurance Date</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="inputpassword3" name="idate" value="" placeholder="DD/MM/YYYY" required>
    </div>
  </div>
   <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Credit</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="txt1" name="credit" value="" placeholder="Amount in Rs" required>
    </div>
  </div>
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Debit</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="txt2" name="debit" value="" placeholder="Amount in Rs" required>

    </div>
  </div>
     	  <input style="margin-left:150px;margin-bottom:10px;" type="button" value="BAL" onclick="add()">
      <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Balance</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="bal" name="bal" value="" placeholder="Amount in Rs" required>
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Date</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="datepicker" name="date" value="" placeholder="DD/MM/YYYY" onfocus="insertDate(this,'DD/MM/YYYY')" required>
    </div>
  </div>	  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default" name="s1">Save This</button>
    </div>
  </div>
      <div class="alert alert-success">
	  <?php include "programs/insur.php"; ?>
	  </div>
</form>
</div>
 <?php
					
						$qry=mysqli_query($conn, "select * from insur");
						$n=mysqli_num_rows($qry);
						if($n==0)
						{
							echo "Nothing To Display";
						}
						else
						
					{ 
						?>
    <section class="content">
                    <div class="row">
                        <div class="col-xs-12"> 
                            <div class="box">
                               <!-- /.box-header -->
                                <div class="box-body table-responsive">
                                    <table id="table2" class="table table-bordered table-striped">
                                        <thead>
                                            <tr>
							<th>HPL</th>
						<th>Insurance Date</th>
							<th>Credit</th>
								<th>Debit</th>
									<th>Balance</th>
										<th>Date</th>
							
	
                                            </tr>
                                        </thead>
										<?php 
					while($row2=mysqli_fetch_array($qry))
						{
					?>
                                        <tbody>
                                           <tr>
                         <td><?php echo $row2['hpl'];?></td>						
                         <td><?php echo $row2['idate'];?></td>						
                         <td><?php echo $row2['credit'];?></td>						
						    <td><?php echo $row2['debit'];?></td>
							    <td><?php echo $row2['bal'];?></td>
								   <td><?php echo $row2['date'];?></td>
								    

						

						             </tr>
                                          </tbody>
                                        <?php
						}
					}
				
					?>
					                    
                                    </table>		
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
</div></div></div></div></div>
<?php include "layouts/footer.php"; ?></body></html>