<?php include("templates/global.php"); 
$vc=0;
if(isset($_GET['v_code']))
{
    $vc=base64_decode($_GET['v_code']);
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>Book Your Seat in CodeLines Early Bird Super 500 Program.</title>
  <meta content="" name="description">
  <meta content="" name="keywords">
  <?php include("templates/inc.php"); ?>

   <script>
   
   $(document).ready(function(){
    //Upload event_url 

   
// jQuery ajax form submit example, runs when form is submitted
$("#customer").submit(function(e) {
    e.preventDefault(); // prevent actual form submit
    var form = $(this);
    var url = form.attr('action'); //get submit url [replace url here if desired]  
    
    $("#btnAdd").val("Submitting...");
    $("#btnAdd").prop('disabled', true);
    setInterval(function () {$("#btnAdd").prop('disabled', false);}, 3000);

    
        $.ajax({
            type: "POST",
            url: url,
            data: form.serialize(), // serializes form input
            success: function(data){

                console.log(data);
                $("#btnAdd").val("Submit");
                
                $("#msg").html(data); 
                $("#msg").slideDown("slow");
                $("#msg").slideUp(5000,function(){ 
                if(data=="Your Booking Successfull,We will be back to you shortly.")
                   window.location="https://codelines.in/";
                 });
				    
            }
        });
    
});




	
});
       $(function () {
  $("#state_id").change(function(){
	 
   var id=$("#state_id").val();
   
	
		$.ajax({
			 type:'post',
			 url: 'get-districts.php',
			 data: {'id':id},
			 success: function(data)
			 {	 
			    
				 $("#district_id").html(data); 
				
			  }
		 });
       });
       
  });

   </script>
	
</head>

<body>

  <main>
    <div class="container">

      <section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
        <div class="container">
          <div class="row justify-content-center">
            <div class="col-lg-8 col-md-6 d-flex flex-column align-items-center justify-content-center">

              <div class="d-flex justify-content-center py-2">
                <a href="index.php" class="logo d-flex align-items-center w-auto">
                </a>
              </div><!-- End Logo -->

              <div class="card mb-1">

                <div class="card-body mt-3">
                 <center>  
                  <br>
                 <img src="ban.jpg" width="100%" style="border-radius:10px"> 
                  </center>
            

                  <div class="pt-2 pb-2">
                    <h5 class="card-title text-center pb-0 fs-4">Book Your Seat to Start Your IT Career</h5>
                   <center> <p style="color:red;"> Last Date of Booking-10 Feb 2024 </p></center>
                  </div>

                 <!-- Custom Styled Validation -->
                                <form id="customer" action="counselling-action.php" class="row g-3 needs-validation" novalidate="">

                                    <div class="col-md-12">
                                        <label for="validationDefault04" class="form-label"><b>Select Your Interest</b></label>
                                        <select class="form-select" id="services" name="services" required="">
                                            <option selected="salacted" value="0">Choose...</option>
                                                <?php
                                                include("./conn.php");
                                               $sql = "select * from tbl_services where deleted_at is NULL order by id asc";
                                                $smt = mysqli_query($conn, $sql);
                                                while ($rs = mysqli_fetch_assoc($smt)) 
                                                {
                                                    echo '<option value="'.$rs['services'].'">'.$rs['services'].'</option>';
                                                }
                                                ?>
                                        </select>
                                    </div>

                                     <div class="col-md-6">
                                        <label for="validationCustom01" class="form-label"><b> Name</b></label>
                                        <input value="<?php if (isset($_GET['id'])) echo $row['name']; ?>" type="text" class="form-control" id="name" name="name" required="" placeholder="Enter Name">
                                        <div class="invalid-feedback">
                                            Please provide a Name.
                                        </div>
                                    </div>
                                    
                                    <div class="col-md-6">
                                        <label for="validationCustom01" class="form-label"><b>Mobile Number</b></label>
                                        <input value="<?php if (isset($_GET['id'])) echo $row['mobile']; ?>" type="number" class="form-control" id="mobile" name="mobile" required="" placeholder="Enter Mobile No">
                                        <div class="invalid-feedback">
                                            Please provide a mobile number.
                                        </div>
                                    </div>
                                  

                                  <div class="col-md-12">
                                      
                                      
                                       <label for="yourDesignation" class="form-label"><b>Select Last Education</b></label>
                                        <select class="form-select" id="education" name="education">
                                         <option selected="salacted" value="0">Choose...</option>
                                          <option>B-TECH</option>
                                          <option>M-TECH</option>
                                          <option>BCA</option>
                                          <option>MCA</option>
                                          <option>BSC IT/CS</option>
                                          <option>MSC IT/CS</option>
                                          <option>BBA</option>
                                          <option>MBA</option>
                                          <option>POLYTECHNIC</option>
                                          <option>BA</option>  
                                          <option>MA</option>  
                                          <option>BSC</option>  
                                          <option>MSC</option>  
                                          <option>BCOM</option>  
                                          <option>MCOM</option>  
                                          <option>INTERMEDIATE</option>
                                          <option>OTHERS</option>
                                        </select>
                                        
                                         
                                         
                                  </div>

                                 

                                   <div class="col-md-6">
                                        <label for="validationDefault04" class="form-label"><b>Select State</b></label>
                                        <select class="form-select" id="state_id" name="state_id" required="">
                                            <option selected="salacted" value="0">Choose...</option>
                                                <?php
                                                include("./conn.php");
                                                $sql = "select * from state order by state_title asc";
                                                $smt = mysqli_query($conn, $sql);
                                                while ($rs = mysqli_fetch_assoc($smt)) 
                                                {
                                                    echo '<option value="'.$rs['id'].'">'.$rs['state_title'].'</option>';
                                                }
                                                ?>
                                        </select>
                                    </div>


                                     <div class="col-md-6">
                                        <label for="validationDefault04" class="form-label"><b>Select District</b></label>
                                        <select class="form-select" id="district_id" name="district_id" required="">
                                            <option selected="salacted" value="0">Choose...</option>
                                            
                                        </select>
                                    </div>
                                    
                                     <div class="col-md-12">
                                        <label for="validationCustom01" class="form-label"><b><span style="color:red;"> FLYING CODE </span> ( If Available )</b></label>
                                        <input value="<?php if (isset($_GET['id'])) echo $row['flying_code']; ?>" type="text" class="form-control" id="flying_code" name="flying_code" required="" placeholder="Enter Flying Code For Discount">
                                        <div class="invalid-feedback">
                                            Please provide a Name.
                                        </div>
                                    </div>


                                 <!--   <div class="col-md-12">-->
                                 <!--       <label for="validationCustom01" class="form-label"><b>Address</b></label>-->
                                 <!--       <textarea  type="text" class="form-control" id="address" name="address" required=""><?php if (isset($_GET['id'])) echo $row['address']; ?></textarea>-->
                                 <!--       <div class="invalid-feedback">-->
                                 <!--           Please provide a address.-->
                                 <!--       </div>-->
                                 <!-- </div>-->
                               

                                 <!--<div class="col-md-12">-->
                                 <!--       <label for="validationCustom01" class="form-label"><b>Remarks</b></label>-->
                                 <!--       <textarea type="text" rows="2" class="form-control" id="remarks" name="remarks" required=""> <?php if (isset($_GET['id'])) echo $row['remarks']; ?></textarea>-->
                                       
                                 <!--       <div class="invalid-feedback">-->
                                 <!--           Please provide require.-->
                                 <!--       </div>-->
                                 <!-- </div>-->
                               
                                 


                                    <div class="col-12 text-center">
                                        <input type="hidden" name="v_code" id="v_code" value="<?php echo $vc; ?>" />
                                        
                                       <div class="alert alert-primary" role="alert" id="msg" style="display:none">
                                          
                                        </div>
                                    <button class="btn btn-primary  btn-lg" id="btnAdd" type="submit">Submit</button>
                                      
                                        
                                                                            </div>
                                </form><!-- End Custom Styled Validation -->

                    
                    <center><br>
                    For more details  ?<a href ="https://www.codelines.in/" target="_blank"> <b>Click Here</b></a>
                    </center>
                    </div>
					          
                    
					          
                  </form>

                </div>
              </div>

              
            </div>
          </div>
        </div>

      </section>

    </div>
  </main><!-- End #main -->

  <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>


   <?php include("templates/vendors.php"); ?>

</body>

</html>