<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>


<?php

      if(isset($_REQUEST['cat_id'])){

       $m->where("cat_id", $_REQUEST['cat_id']);
       $m->where("branch_id", $_SESSION['branch']);
       $m->where("status",'0');
       $m->orderBy("contact_id","desc");
       $WorkAssignListings = $m->get("eduportal_contacts");

      } else {

       $m->where("branch_id", $_SESSION['branch']);
       $m->where("status",'0');
       $m->orderBy("contact_id","desc");
       $WorkAssignListings = $m->get("eduportal_contacts");

     }
     ?>


<!DOCTYPE html>
<html lang="en">
  <head>
    
    <title>Inquiry Form | EduPortal</title>
    <?php include('RootMe/css_links.php');?>
   
<style>

.tdStyle{border-bottom:1px solid lightgray;}
.thStyle{background-color:#00AFEF;color:white;}

</style>
  </head>
  




  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
            <?php include('RootMe/sidebar.php');?>

              <?php include('RootMe/header.php');?>
     
        <!-- page content -->
          <div class="right_col" role="main">
          <div class="row" style="background-color: white;">
     

   
  <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">

 <div class="" style="margin-top:10px;">
    
      <div class="clearfix"></div>
    </div>
    <br>
        
          


<h3>Student Inquiry Information</h3>
<form action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post" enctype="multipart/form-data" class="form-horizontal form-label-left" >

<?php 
  if(isset($_REQUEST['formId'])) {

    // $m->where("status", '0');
     $m->where("iquiryFormID", $_REQUEST['formId']);
     $m->where("branch_id", $_SESSION['branch']);
     $InquriyForm = $m->get("eduportal_student_inquiry_form");
?>

  <input type="hidden" name="action"  value="edit_inquiry_form">

  <input type="hidden" name="formId"  value="<?php echo $_REQUEST['formId']; ?>" />



<?php } else  { ?>

<input type="hidden" name="action" value="inquiry_form" />

<?php } ?>

<?php

$date;
$DOB;
if(isset($_REQUEST['formId'])){

  $date= $InquriyForm[0]['inquiry_date'];
  $DOB= $InquriyForm[0]['DOB'];
  } else {
    $date= date("Y-m-d");
    $DOB= date("Y-m-d");
  }

 ?>

<div class="col-md-12">

    <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">School Name</label>

            
                    <select name="school_id" class="form-control"  >
                     <option>Select</option> 
                    <?php
                    $m->where("branch_id", $_SESSION['branch']);
                    $WorkAssignList = $m->get("eduportal_add_school");
                    foreach($WorkAssignList as $WorkAssignListVal)
                    { ?>

                       <option <?php if($InquriyForm[0]['school_id']==$WorkAssignListVal['school_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['school_id']; ?>"><?php echo $WorkAssignListVal['school_name']; ?></option>


                            <?php
                    } ?>

                    </select>

                  
  </div>
</div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Student Confirmed</label>

            
                    <select name="student_confirmed"  class="form-control" >
                     <option <?php if($InquriyForm[0]['student_confirmed']=="YES"){echo "Selected";} ?> value="YES">YES</option>
                     <option <?php if($InquriyForm[0]['student_confirmed']=="NO"){echo "Selected";} ?> value="NO">NO</option>                     
                    </select>

                  
  </div>
</div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Student Visited </label>

            
                    <select name="student_visited"  class="form-control" >
                     <option <?php if($InquriyForm[0]['student_visited']=="YES"){echo "Selected";} ?> value="YES">YES</option>
                     <option <?php if($InquriyForm[0]['student_visited']=="NO"){echo "Selected";} ?> value="NO">NO</option>                     
                    </select>

                  
  </div>
</div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">

                    <label class="required"> Student Name</label>
                    <input name="student_name"  value="<?php echo $InquriyForm[0]['student_name'];?>" type="Text" class="form-control"  >
                       
                </div>
  </div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
    <div class="form-group ">

        <label class="required"> S/o D/o</label>
        <input name="father_name"   value="<?php echo $InquriyForm[0]['father_name'];?>" type="Text" class="form-control"  >
           
    </div>
  </div>

     <div class="col-md-4 col-xs-12" style="padding: 8px;">
        <div class="form-group ">

        <label class="required">Date</label>
        <input name="inquiry_date"   value="<?php echo $date;?>" type="date" class="form-control"  >
           
    </div>
    </div>
  
</div>


<div class="col-md-12">

  <div class="col-md-8 col-xs-12" style="padding: 8px;">
                <div class="form-group ">

                    <label class="required"> Previous School</label>
                    <input name="previous_school"  value="<?php echo $InquriyForm[0]['previous_school'];?>" type="Text" class="form-control"  >
                       
                </div>
  </div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
    <div class="form-group ">

        <label class="required"> Parent Mobile</label>
        <input name="parent_mobile"   value="<?php echo $InquriyForm[0]['parent_mobile'];?>" type="number" class="form-control"  >
           
    </div>
  </div>
  
</div>

<div class="col-md-12">
  
  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Class</label>

            
                    <select name="class_id" class="form-control" onChange="getsec(this.value)" >
                     <option value="All">All</option> 
                    <?php
                    $m->where("branch_id", $_SESSION['branch']);
                    $WorkAssignList = $m->get("edu_class_config");
                    foreach($WorkAssignList as $WorkAssignListVal)
                    { ?>

                       <option <?php if($InquriyForm[0]['class_id']==$WorkAssignListVal['class_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['class_id']; ?>"><?php echo $WorkAssignListVal['Class_Name']; ?></option>


                            <?php
                    } ?>

                    </select>

                  
  </div>
</div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Section</label>
                    <select name="section" id="txt_section" class="form-control" onChange="getSubjects(this.value)">
                      
                   <?php
                              if($_REQUEST['section']!='')
                              { 

                              $m->where("class_id", $_REQUEST['class_id']);    

                              $secondLevel = $m->get("edu_adm_section_detail");
                              
                              foreach($secondLevel as $secondLevel_val)
                              {
                              
                               ?>
                                <option <?php if($InquriyForm[0]['section_id']==$secondLevel_val['section_id']){echo "selected";} ?> value="<?php echo $secondLevel_val['section_id']; ?>"><?php echo trim(utf8_encode_all($secondLevel_val['section_name'])); ?></option>

                              <?php }   ?>
                                
                          <?php } ?>

                    </select>

                  
  </div>
</div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Prospectus</label>

            
                    <select name="prospectus"  class="form-control" >
                     <option <?php if($InquriyForm[0]['prospectus']=="YES"){echo "Selected";} ?> value="YES">YES</option>
                     <option <?php if($InquriyForm[0]['prospectus']=="NO"){echo "Selected";} ?> value="NO">NO</option>                     
                    </select>

                  
  </div>
</div>

<div class="col-md-12 col-xs-12" style="padding: 8px;">
   <div class="form-group ">

        <label class="required"> Refrence</label>
        <input name="refrence"   value="<?php echo $InquriyForm[0]['refrence'];?>" type="text" class="form-control"  >
           
    </div>
</div>

</div>

<div class="col-md-12">
  
  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Payments</label>
                  <input name="payments"   value="<?php echo $InquriyForm[0]['payments'];?>" type="text" class="form-control"  >
            
                   
                  
  </div>
</div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
      <div class="form-group ">

        <label class="required"> Status</label>
         <select name="status"  class="form-control" >
                     <option <?php if($InquriyForm[0]['prospectus']=="PAID"){echo "Selected";} ?> value="PAID">PAID</option>
                     <option <?php if($InquriyForm[0]['prospectus']=="UNPAID"){echo "Selected";} ?> value="UNPAID">UNPAID</option>                     
        </select>
           
    </div>
</div>

<div class="col-md-4 col-xs-12" style="padding: 8px;">
   <div class="form-group ">

        <label class="required"> CNIC</label>
        <input name="cnic"   value="<?php echo $InquriyForm[0]['cnic'];?>" type="text" class="form-control"  >
           
    </div>
</div>

</div>


<div class="col-md-12">
  
  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Cell</label>
                  <input name="cell"   value="<?php echo $InquriyForm[0]['cell'];?>" type="text" class="form-control"  >
            
                   
                  
  </div>
</div>

  <div class="col-md-4 col-xs-12" style="padding: 8px;">
      <div class="form-group ">

        <label class="required"> DOB</label>
        <input name="DOB"   value="<?php echo $DOB;?>" type="date" class="form-control"  >
           
    </div>
</div>

<div class="col-md-4 col-xs-12" style="padding: 8px;">
   <div class="form-group ">

        <label class="required"> Gender</label>
        <select name="gender"  class="form-control" >
         <option <?php if($InquriyForm[0]['prospectus']=="male"){echo "Selected";} ?> value="male">Male</option>
         <option <?php if($InquriyForm[0]['prospectus']=="female"){echo "Selected";} ?> value="female">Female</option>
         <option <?php if($InquriyForm[0]['prospectus']=="shemale"){echo "Selected";} ?> value="shemale">Shemale</option>                     
        </select>
           
    </div>
</div>

</div>

<div class="col-md-12">
  
  <div class="col-md-4 col-xs-12" style="padding: 8px;">
                <div class="form-group ">
                  <label class="required">Father Occupation</label>
                  <input name="father_occupation"   value="<?php echo $InquriyForm[0]['father_occupation'];?>" type="text" class="form-control"  >
            
                   
                  
  </div>
</div>

  <div class="col-md-8 col-xs-12" style="padding: 8px;">
      <div class="form-group ">

        <label class="required"> Address</label>
        <input name="address"   value="<?php echo $InquriyForm[0]['address'];?>" type="text" class="form-control"  >
           
    </div>
</div>


  <div class="col-md-12 col-xs-12" style="padding: 8px;">
      <div class="form-group ">

        <label class="required"> Remarks</label>
        <input name="remarks"   value="<?php echo $InquriyForm[0]['remarks'];?>" type="text" class="form-control"  >
           
    </div>
</div>


</div>

 
  <br>
<div>
<div class="col-md-6" style="float: left;">
 
<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Superior ID <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="superior_id" placeholder=" " value="<?php echo $InquriyForm[0]['superior_id'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Pros.No# <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="pros_no" placeholder=" " value="<?php echo $InquriyForm[0]['pros_no'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Plus Session Fee <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;"  name="plus_session_fee" placeholder="" value="<?php echo $InquriyForm[0]['plus_session_fee'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Package Date <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;"  name="package_date" placeholder="" value="<?php echo $InquriyForm[0]['package_date'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Board Reg <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="board_reg" placeholder="" value="<?php echo $InquriyForm[0]['board_reg'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Board Fee Part II <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="board_fee_part_II" placeholder="" value="<?php echo $InquriyForm[0]['board_fee_part_II'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">10th Roll No <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="10th_roll_no" placeholder="" value="<?php echo $InquriyForm[0]['10th_roll_no'];?>">
    </div>
</div>

</div>



<div class="col-md-6" style="float: left;">
 
<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Student Status <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="student_status" placeholder=" " value="<?php echo $InquriyForm[0]['student_status'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Previous Medium <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="previous_class_medium" placeholder=" " value="<?php echo $InquriyForm[0]['previous_class_medium'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Package By <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="package_done_by" placeholder="" value="<?php echo $InquriyForm[0]['package_done_by'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Fee Status <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="fee_status" placeholder=" " value="<?php echo $InquriyForm[0]['fee_status'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Board fee Part I <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="board_fee_part_I" placeholder="" value="<?php echo $InquriyForm[0]['board_fee_part_I'];?>">
    </div>
</div>

<div class="item form-group">
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">9th Marks <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 2px;" name="9th_marks" placeholder=" " value="<?php echo $InquriyForm[0]['9th_marks'];?>">
    </div>
</div>

<div class="item form-group" >
                        
    <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">10th Marks <span class="required"></span>
    </label>
    <div class="col-md-9 col-sm-9 col-xs-12">
     
       <input class="form-control col-md-12 col-xs-12" style="margin-top: 3px;"  name="10th marks" placeholder="" value="<?php echo $InquriyForm[0]['10th_marks'];?>">
    </div>
</div>

</div>

</div>

<div>

  <button id="send" type="submit" class="btn btn-primary" >Submit</button>
  
</div>

</form>

    <br><br>


  </div>
  <div class="clearfix"></div>
</section>          
    

           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
     
  <?php include('RootMe/js_linksscript.php');?>


   

<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
 <!-- jQuery -->
    <script src="js/ajax_functions.js"></script> 
  </body>
</html>
