<?php 
require 'inc/Header.php';
?>
    <!-- Loader ends-->
    <!-- page-wrapper Start-->
    <div class="page-wrapper compact-wrapper" id="pageWrapper">
      <!-- Page Header Start-->
    <?php require 'inc/Navbar.php';?>
      <!-- Page Header Ends-->
      <!-- Page Body Start-->
      <div class="page-body-wrapper">
        <!-- Page Sidebar Start-->
       <?php require 'inc/Sidebar.php';?>
        <!-- Page Sidebar Ends-->
        <div class="page-body">
          <div class="container-fluid">
            <div class="page-title">
              <div class="row">
                <div class="col-sm-6">
                  <h3><?php echo $lang['Cancellation_Policy_Management'];?></h3>
                </div>
               
              </div>
            </div>
          </div>
          <!-- Container-fluid starts-->
          <div class="container-fluid dashboard-default">
            <div class="row">
           <div class="col-sm-12">
                 <div class="card">
				<div class="card-body">
                 <?php 
				 if(isset($_GET['id']))
				 {
					
					  $query = "select * from tbl_policy where id=".$_GET['id'];
		  $data = $h->queryfire($query)->fetch_assoc();
					 ?>
					 <form method="POST">
								
								<div class="form-group mb-3">
                                   
                                        <label  id="basic-addon1"><?php echo $lang['Specify_Hour_Before_Boarding_Time'];?></label>
                                    
                                  <input type="text" class="form-control" placeholder="<?php echo $lang['Enter_Hour'];?>" value="<?php echo $data['hour'];?>" name="hour">
                               
								</div>
								
								<div class="form-group mb-3">
                                   
                                        <label  id="basic-addon1"><?php echo $lang['Specify_Refund_Before_Boarding_Time'];?></label>
                                    
                                  <input type="text" class="form-control" placeholder="<?php echo $lang['Enter_Refund_Amount'];?>" min="1" max="100" value="<?php echo $data['rmat'];?>" name="rmat">
                                <input type="hidden" name="type" value="edit_policy"/>
										<input type="hidden" name="id" value="<?php echo $_GET['id'];?>"/>
								</div>
								
                                    
                                   
                                    <button type="submit" class="btn btn-primary"><?php echo $lang['Edit_Cancellation'];?></button>
                                </form>
					 <?php 
				 }
				 else 
				 {
				 ?>
                  <form method="POST">
								
								<div class="form-group mb-3">
                                   
                                        <label  id="basic-addon1"><?php echo $lang['Specify_Hour_Before_Boarding_Time'];?></label>
                                    
                                  <input type="number" class="form-control" placeholder="<?php echo $lang['Enter_Hour'];?>"  name="hour">
                            
								</div>
								
								<div class="form-group mb-3">
                                   
                                        <label  id="basic-addon1"><?php echo $lang['Specify_Refund_Before_Boarding_Time'];?></label>
                                    
                                  <input type="text" class="form-control" placeholder="<?php echo $lang['Enter_Refund_Amount'];?>"  name="rmat">
                                <input type="hidden" name="type" value="add_policy"/>	
								</div>
								
                                    
                                   
                                    <button type="submit" class="btn btn-primary"><?php echo $lang['Add_Cancellation'];?></button>
                                </form>
				 <?php } ?>
                </div>
              
                </div>
              
                
              </div>
            
            </div>
          </div>
          <!-- Container-fluid Ends-->
        </div>
        <!-- footer start-->
       
      </div>
    </div>
    <!-- latest jquery-->
   <?php require 'inc/Footer.php'; ?>
    <!-- login js-->
  </body>


</html>