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

<?php  include("sessioncheck.php"); ?>

<?php



//$branch=$brid;

$branch=$_SESSION['branch'];



   $sessionID;



   if($_REQUEST['session']!=NULL){



      $sessionID=$_REQUEST['session'];

      

    }else {

      

      $sessionID=$_SESSION['current_session'];

    }









      $sql = "SELECT * FROM  edu_student_details  WHERE branch_id='$branch' and status='0'";



      if($_REQUEST['class_id']!=NULL){

      $sql .= " AND class_id ='" . $_REQUEST['class_id']. "' ";

      }



      if($_REQUEST['section']!=NULL){

      $sql .= " AND section_id ='" . $_REQUEST['section']. "' ";

     }



     if($_REQUEST['session']!=NULL){

      $sql .= " AND session_id ='" . $_REQUEST['session']. "' ";

     }



      if($_REQUEST['orderBy']=='alphabetic'){

      $sql .= "order by first_name asc";

    }



    if($_REQUEST['orderBy']=='RollNoWise'){

        $sql .= "order by candidate_roll_no asc";

      }



    if($_REQUEST['orderBy']=='Admascending'){

        $sql .= "order by CAST(ref_no as unsigned)  asc";

      }



      //print_r($sql);

   $WorkAssignListings = $m->query($sql);

     ?>





<!DOCTYPE html>

<html lang="en">

  <head>

    

    <title>Update Student Info | EduPortal</title>

    <?php include('RootMe/css_links.php');?>





   

  </head>

  

<script type="text/javascript">



    function getCityUpdateInfo(str,count)

{

  //alert(str);

   if(str=="")

      alert("Please select any State");

  else

     var ajx;  // The variable that makes Ajax possible!

  

  if(window.XMLHttpRequest)

  ajx=new XMLHttpRequest();

  ajx.onreadystatechange = function()

  {



    if(ajx.readyState == 4)

    {

          //alert(ajx.responseText); 

         document.getElementById("city"+count).innerHTML= ajx.responseText;

    }

  }

  ajx.open("GET", "get_city.php?state="+str);

  ajx.send(); 



}





  </script>

  <body class="nav-md">

    <div class="container body">

      <div class="main_container">





     

     

        <!-- page content -->

          <div class="" role="main" style="margin-left: 25px;margin-right: 25px; margin-top: 10px;">

          <div class="" style="background-color: white;">





    <a href="<?php echo $_SESSION['dashboard'];?>">Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 



     <a href="students_reports.php">Students Reports </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 

          

      Update Students Info



          <br>

           

  <section class="add_sub_agent" >

  <div class="container">



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

      <form  action="update_student_classwise.php" enctype="multipart/form-data" method="get">

        <div class="panel panel-default">

          

          <?php if (!isset($_REQUEST['session'])) { ?>



            <div style="color:black;font-size:18px;" class="alert alert-warning alert-dismissible">

                    <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>

                     <strong>Alert !</strong> Please Select Class/Section and Parameters to updates. 

          </div>

         

          <?php } ?>

          





          <div class="panel-heading"><?php echo count($WorkAssignListings);?> Students Records <span style="float:right;margin-top: -7px;">

         



  <a href="update_student_pictures.php?class_id=<?php echo $_REQUEST['class_id'] ?>&section=<?php echo $_REQUEST['section'] ?>&session=<?php echo $_REQUEST['session'] ?>" class="pull-right btn btn-success">Update Student Pictures</a>









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

          <div class="panel-body">

          

            <div class="col-md-12" id="advanceSearch" style="">





                            

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

                <div class="form-group ">

                  <label class="required">Session</label>

                    <select name="session" id="session" class="form-control" required="" >



                              <option value="">Select Session</option>

                        



                        <?php

 

 

                        $WorkAssignList = $m->get("edu_session_config");

                        foreach($WorkAssignList as $WorkAssignListVal)

                        { ?>



                           <option <?php if($sessionID==$WorkAssignListVal['session_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['session_id']; ?>"><?php echo $WorkAssignListVal['session_year']; ?></option>





                                <?php

                        } ?>



                    </select>

                </div>

              </div>





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

                <div class="form-group ">

                  <label class="required">Class</label>

 



                  <select name="class_id" id="class_id"  name="term_id"   data-placeholder="Select" class="chosen-multi-select inputfield form-control" onChange="getsec(this.value)"  >

                    <option value="">Select Class</option>



                    <?php

                    $m->where("branch_id", $_SESSION['branch']);

                    $WorkAssignList = $m->get("edu_class_config");

                    foreach($WorkAssignList as $WorkAssignListVal)

                    { ?>



                       <option <?php if($_REQUEST['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-2 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($_REQUEST['section']==$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-2 col-xs-12" style="padding: 8px;">

                <div class="form-group ">

                  <label class="required">Select Listing Order:</label>

                    

                  <select name="orderBy" id="orderBy" class="form-control" >

            

                     <option  value="alphabetic">Alphabetic</option>

                     <option  value="RollNoWise">Roll No Wise</option>

                     <option  value="Admascending">Adm# Ascending</option>

                       

                    </select>

                  

                </div>

              </div>

           

           <div class="col-md-2 pull-right" style="padding:2px;" >

                <div class="form-group ">

                   <input type="hidden" name="addaccountAdmin" value="1">

                <button type="submit" class="btn btn-primary" style="margin-top: 24px;">Search Update Students</button>

                </div>

          </div>





  



          <table>

            <div class="col-md-12" >
              <div class="form-group" > 
              <label class="container1">
              <input type="checkbox" id="checkAll" checked />
              <span style="font-size:12px;">Check All</span> <span class="checkmark"></span>
              </label>

              </div>
              </div>

                

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

             

               

                   <tr>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="adm" checked value="adm"/>

                    <span style="font-size:12px;">Adm No</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="stdName" checked value="stdName"/>

                    <span style="font-size:12px;">Student Name</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="fName" checked value="fName"/>

                    <span style="font-size:12px;">Father Name</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="cellno" checked value="cellno"/>

                    <span style="font-size:12px;">Cell Number</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="mothercell" checked value="mothercell"/>

                    <span style="font-size:12px;">Mother Cell</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="fathercell" checked value="fathercell"/>

                    <span style="font-size:12px;">Father Cell</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="dob" checked value="dob"/>

                    <span style="font-size:12px;">DOB</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="locality" checked value="locality"/>

                    <span style="font-size:12px;">Locality</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="gender" checked value="gender"/>

                    <span style="font-size:12px;">Gender</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="doa" checked value="doa"/>

                    <span style="font-size:12px;">DOA</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="familycode" checked value="familycode"/>

                    <span style="font-size:12px;">Family Code</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="cnic" checked value="cnic"/>

                    <span style="font-size:12px;">Father CNIC</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="mother_cnic" checked value="mother_cnic"/>

                    <span style="font-size:12px;">Mother CNIC</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="formBNo" checked value="formBNo"/>

                    <span style="font-size:12px;">B-Form/CNIC No</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="stdAddress" checked value="stdAddress"/>

                    <span style="font-size:12px;">Address</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="religion" checked value="religion"/>

                    <span style="font-size:12px;">Religion</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="state_city" checked value="state_city"/>

                    <span style="font-size:12px;">State/City</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>







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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="whatsapp_number" checked value="whatsapp_number"/>

                    <span style="font-size:12px;">Whatsapp No</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="mother_qualification" checked value="mother_qualification"/>

                    <span style="font-size:12px;">Mother Qualification</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="father_qualification" checked value="father_qualification"/>

                    <span style="font-size:12px;">Father Qualification</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="father_occupation" checked value="father_occupation"/>

                    <span style="font-size:12px;">Father Occupation</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="father_designation" checked value="father_designation"/>

                    <span style="font-size:12px;">Father Designation</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>





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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="mother_activity" checked value="mother_activity"/>

                    <span style="font-size:12px;">Mother Activity</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="mother_name" checked value="mother_name"/>

                    <span style="font-size:12px;">Mother Name</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>



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

                  <div class="form-group" > 

                  <label class="container1">

                    <input type="checkbox" class="checkbox" name="email" checked value="email"/>

                    <span style="font-size:12px;">Email</span> <span class="checkmark"></span>

                  </label>

                  

                  </div>

                </div>









                

              </tr>

            </div>

            

              </table>





             

            </div>

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

          </div>

        </div>

      </form>

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

    </div>

    <br>

     

          

    





          

          <?php  if(isset($_SESSION['fee_settings'])){?>





            <div class="alert alert-success" id="msg">

             <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>

              <strong>Success!</strong> Student info updated successfully...

            </div>



          <?php  unset($_SESSION['fee_settings']); }?>



      

<div style="overflow-x:auto;">



<form class="form-style-7" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post"  onSubmit="return student_check();"  enctype="multipart/form-data">



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

  <input type="hidden" id="class_id"  name="class_id" value="<?php echo $_GET['class_id']; ?>" />

  <input type="hidden" id="session"  name="session" value="<?php echo $sessionID; ?>" />

  <input type="hidden" id="section"  name="section" value="<?php echo $_GET['section']; ?>" />



  <input type="hidden" id="selectAdm"  name="selectAdm" value="<?php echo $_GET['adm']; ?>" />

  <input type="hidden" id="selectStdName"  name="selectStdName" value="<?php echo $_GET['stdName']; ?>" />

  <input type="hidden" id="selectFName"  name="selectFName" value="<?php echo $_GET['fName']; ?>" />

  <input type="hidden" id="selectCellno"  name="selectCellno" value="<?php echo $_GET['cellno']; ?>" />

  <input type="hidden" id="selectmothercell"  name="selectmothercell" value="<?php echo $_GET['mothercell']; ?>" />

  <input type="hidden" id="selectfathercell"  name="selectfathercell" value="<?php echo $_GET['fathercell']; ?>" />

  <input type="hidden" id="selectDob"  name="selectDob" value="<?php echo $_GET['dob']; ?>" />

  <input type="hidden" id="selectLocality"  name="selectLocality" value="<?php echo $_GET['locality']; ?>" />

  <input type="hidden" id="selectReligion"  name="selectReligion" value="<?php echo $_GET['religion']; ?>" />



  <input type="hidden" id="selectState_city"  name="selectState_city" value="<?php echo $_GET['state_city']; ?>" />



  <input type="hidden" id="selectWhatsapp"  name="selectWhatsapp" value="<?php echo $_GET['whatsapp_number']; ?>" />



  <input type="hidden" id="selectMotherQualification"  name="selectMotherQualification" value="<?php echo $_GET['mother_qualification']; ?>" />



  <input type="hidden" id="selectFatherQualification"  name="selectFatherQualification" value="<?php echo $_GET['father_qualification']; ?>" />



  <input type="hidden" id="selectFatherOccupation"  name="selectFatherOccupation" value="<?php echo $_GET['father_occupation']; ?>" />



  <input type="hidden" id="selectFatherDesignation"  name="selectFatherDesignation" value="<?php echo $_GET['father_designation']; ?>" />



  <input type="hidden" id="selectMotherActivity"  name="selectMotherActivity" value="<?php echo $_GET['mother_activity']; ?>" />



  <input type="hidden" id="selectMotherName"  name="selectMotherName" value="<?php echo $_GET['mother_name']; ?>" />



  <input type="hidden" id="selectEmail"  name="selectEmail" value="<?php echo $_GET['email']; ?>" />



  <input type="hidden" id="selectGender"  name="selectGender" value="<?php echo $_GET['gender']; ?>" />

  <input type="hidden" id="selectDoa"  name="selectDoa" value="<?php echo $_GET['doa']; ?>" />

  <input type="hidden" id="selectFamilycode"  name="selectFamilycode" value="<?php echo $_GET['familycode']; ?>" />



  <input type="hidden" id="selectcnic"  name="selectcnic" value="<?php echo $_GET['cnic']; ?>" />



  <input type="hidden" id="selectmothercnic"  name="selectmothercnic" value="<?php echo $_GET['mother_cnic']; ?>" />



  <input type="hidden" id="selectformBNo"  name="selectformBNo" value="<?php echo $_GET['formBNo']; ?>" />



  <input type="hidden" id="selectstdAddress"  name="selectstdAddress" value="<?php echo $_GET['stdAddress']; ?>" />





  

       



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



        <div class="col-md-4 pull-right" style="margin-bottom:1%;">

              <input type="submit" name="submit" class="pull-right btn btn-success"  value="Save Changes"/>



              

        </div>

      <table data-page-length='100' class="table table-striped table-bordered" style="width:100%">

          

          <thead>

            <tr>

                <th width="3%">S.No</th>

               <!--  <th width="15%">Student Name</th>

                <th width="15%">Last Name</th>

                 -->

                <!-- <th width="10%" style="text-align:center;"> Class </th> -->

                <th width="5%">Roll.No</th>

              

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

                <th width="8%" style="text-align:center;"> Adm No </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Student Name </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Father Name </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Cell Number  </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Mother Cell  </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Father Cell  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> DOB  </th>

                <?php } ?>

              

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

                <th width="12%" style="text-align:center;"> Locality  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Religion  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> State  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> City  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Whatsapp No  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Mother Qualification  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Father Qualification  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Father Occupation  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Father Designation  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Mother Activity  </th>

                <?php } ?>                



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

                <th width="12%" style="text-align:center;"> Mother Name  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Email  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> Gender  </th>

                <?php } ?>



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

                <th width="12%" style="text-align:center;"> DOA  </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Family Code  </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Father CNIC  </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Mother CNIC  </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> B-Form/CNIC No  </th>

                <?php } ?>



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

                <th width="10%" style="text-align:center;"> Address  </th>

                <?php } ?>

  

            </tr>

        </thead>

        <tbody>

   

     

     <?php $count=1;



      foreach($WorkAssignListings as $WorkAssignListVal)

      { 

        

        $m->where("student_id", $WorkAssignListVal['student_id']);

        $fees=$m->get("eduportal_student_fee_structure");



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

        $fees1=$m->get("eduportal_class_fee_details");





        $id=$WorkAssignListVal['student_id'];  



    $show_fee=0;



  if($fees[0]['std_tution_fee']!=""){

    $show_fee=$fees[0]['std_tution_fee'];



  }else {

    $show_fee=$fees1[0]['tution_fee'];

  }



   $misc_fee=0;



  if($fees[0]['std_misc_fee']!=""){

    $misc_fee=$fees[0]['std_misc_fee'];



  }else {

    $misc_fee=$fees1[0]['misc_fee'];

  }



      ?>



        <tr>

                  <td style="text-align:center;"> <?php echo $count; $count+=1;?> </td>

                  



                     <input name="students[]" id="students[]" type="hidden" value="<?php echo $WorkAssignListVal['student_id'];?>">

                   



                  <!-- <td style="text-align:center;"> <?php echo getClassName($m,$_GET['class_id']);?> - <?php echo getSectionName($m,$WorkAssignListVal['section_id']);?> </td> -->

                  <!-- <td> <input type="text" name="std_outstanding_blc[]" value="<?php echo $fees[0]['std_outstanding_blc'];?>"> </td> -->

                  <td> <?php echo $WorkAssignListVal['candidate_roll_no'];?> </td>



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

                  <td><input type="text" style="width:50%;" name="adm_no[]" value="<?php echo $WorkAssignListVal['ref_no'];?>"></td>

                  <?php } ?>



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

                  <td><input type="text" name="first_name[]" value="<?php echo $WorkAssignListVal['first_name'];?>"></td>

                  <?php } ?>



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

                  <td><input type="text" name="last_name[]" value="<?php echo $WorkAssignListVal['last_name'];?>"></td>

                  <?php } ?>



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

                  <td> <input style="width: 100px;" type="text" name="cell_no[]"  value="<?php echo $WorkAssignListVal['cell_no'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input style="width: 100px;" type="text" name="mother_cell[]"  value="<?php echo $WorkAssignListVal['mother_cell'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input style="width: 100px;" type="text" name="father_cellno[]"  value="<?php echo $WorkAssignListVal['father_cellno'];?>" /> </td>

                  <?php } ?>



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

                  <td> 

                    <div class="col-md-12 col-sm-12 col-xs-12 " style="padding: 0px 2px 0px 2px;">

                     <div class="form-group ">                       

                            <input class="form-control" type="date" name="dob[]"  id="" value="<?php echo $WorkAssignListVal['dob'];?>">

                     </div>

                   </div>

                  </td>

                  <?php } ?>



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

                  <td> 

                    <div class="col-md-12 col-sm-12 col-xs-12 " style="padding: 0px 2px 0px 2px;">

                     <div class="form-group ">                       

                            <select name="locality[]" class="form-control">

                                    <option value="">Choose Locality</option>  

                                <?php

                                $m->where("branch_id", $_SESSION['branch']);

                                $localities = $m->get("eduportal_branch_locality");

                                if(count($localities)>0){

                                foreach($localities as $locality)

                                { ?>

                                   <option <?php if($WorkAssignListVal['locality']==$locality['locality_id']){echo 'selected';}?> value="<?php echo $locality['locality_id']; ?>"><?php echo $locality['locality_name']; ?></option>

                            <?php }  } else { ?>

                                    <option>No Locality</option>

                            <?php    } ?>



                            </select>

                        </div>

                </div>

                </td>

                <?php } ?>





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

                  <td> 

                    <div class="col-md-12 col-sm-12 col-xs-12 " style="padding: 0px 2px 0px 2px;">

                     <div class="form-group ">                       

                        <select name="religion[]" class="form-control">

                          <option value="">Choose Religion</option>  

                          <option <?php if($WorkAssignListVal['religion']=="Muslim"){echo "Selected";} ?> value="Muslim">Muslim</option>

                          <option <?php if($WorkAssignListVal['religion']=="Hinduism"){echo "Selected";} ?> value="Hinduism">Hindu</option>                    

                          <option <?php if($WorkAssignListVal['religion']=="Sikhism"){echo "Selected";} ?> value="Sikhism">Sikh</option>

                          <option <?php if($WorkAssignListVal['religion']=="Christian"){echo "Selected";} ?> value="Christian">Christian</option>  

                          <option <?php if($WorkAssignListVal['religion']=="Ahmadi"){echo "Selected";} ?> value="Ahmadi">Ahmadi</option>



                        </select>

                        </div>

                </div>

                </td>

                <?php } ?>





                

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

                  <td> 

                    <div class="col-md-12 col-sm-12 col-xs-12 " style="padding: 0px 2px 0px 2px;">

                     <div class="form-group ">                       

                        <select name="state[]" id="state" class="form-control"  onChange="getCityUpdateInfo(this.value,<?php echo $count;?>)" >

                                <option value="">Select State <span style="color:red;">*</span></option>

                                <?php

                                

                                $m->where("Country_Id", 1);    



                                $secondLevel = $m->get("eduportal_state_config");

                                if($secondLevel[0]>0){

                                foreach($secondLevel as $secondLevel_val)

                                {

                                if(is_array($secondLevel_val)){

                                 ?>

                                  <option <?php if($WorkAssignListVal['State_Id']==$secondLevel_val['State_Id']){echo "selected";} ?>  value="<?php echo $secondLevel_val['State_Id']; ?>"><?php echo trim(utf8_encode_all($secondLevel_val['State_Name'])); ?></option>

                                  <?php } } } ?>

                                  

                                

                                </select>

                        </div>

                </div>

                </td>

                <?php } ?>







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

                  <td> 

                    <div class="col-md-12 col-sm-12 col-xs-12 " style="padding: 0px 2px 0px 2px;">

                     <div class="form-group ">                       

                         <select name="city[]" id="city<?php echo $count;?>" class="form-control">



                               <?php

                              if($WorkAssignListVal['City_Id']!='')

                              { 



                              $m->where("City_Id", $WorkAssignListVal['City_Id']);    



                              $secondLevel = $m->get("eduportal_city_config");

                              

                              foreach($secondLevel as $secondLevel_val)

                              {

                              

                               ?>

                                <option <?php if($WorkAssignListVal['City_Id']==$secondLevel_val['City_Id']){echo "selected";} ?> value="<?php echo $secondLevel_val['City_Id']; ?>"><?php echo trim(utf8_encode_all($secondLevel_val['City_Name'])); ?></option>

                                <?php }   ?>

                                

                                <?php } ?>



                          </select>

                        </div>

                </div>

                </td>

                <?php } ?>







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

                  <td> <input  type="text" name="whatsapp_number[]"  value="<?php echo $WorkAssignListVal['whatsapp_number'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="mother_qualification[]"  value="<?php echo $WorkAssignListVal['mother_qualification'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="father_qualification[]"  value="<?php echo $WorkAssignListVal['father_qualification'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="father_occupation[]"  value="<?php echo $WorkAssignListVal['father_occupation'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="father_designation[]"  value="<?php echo $WorkAssignListVal['father_designation'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="mother_activity[]"  value="<?php echo $WorkAssignListVal['mother_activity'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="mother_name[]"  value="<?php echo $WorkAssignListVal['mother_name'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="email[]"  value="<?php echo $WorkAssignListVal['email'];?>" /> </td>

                  <?php } ?>



                

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

                  <td> 

                    <div class="col-md-12 col-sm-12 col-xs-12 " style="padding: 0px 2px 0px 2px;">

                     <div class="form-group ">                       

                            <select name="gender[]" class="form-control">

                                    <option value="">Select Gender </option>

                          <option <?php if($WorkAssignListVal['gender']=="Male"){echo "Selected";} ?> value="Male">Male</option>

                          <option <?php if($WorkAssignListVal['gender']=="Female"){echo "Selected";} ?> value="Female">Female</option> 



                            </select>

                        </div>

                </div>

                </td>

                <?php } ?>





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

                  <td> 

                    <div class="col-md-12 col-sm-12 col-xs-12 " style="padding: 0px 2px 0px 2px;">

                     <div class="form-group ">                       

                            <input class="form-control" type="date" name="doa[]"  id="" value="<?php echo $WorkAssignListVal['date_of_adms'];?>">

                     </div>

                   </div>

                  </td>

                  <?php } ?>





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

                  <td> <input style="width: 100px;" type="text" name="familycode[]"  value="<?php echo $WorkAssignListVal['family_code'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="cnic[]"  value="<?php echo $WorkAssignListVal['cnic'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="mother_cnic[]"  value="<?php echo $WorkAssignListVal['mother_cnic'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input  type="text" name="formBNo[]"  value="<?php echo $WorkAssignListVal['formBNo'];?>" /> </td>

                  <?php } ?>



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

                  <td> <input style="width:100%;"  type="text" name="stdAddress[]"  value="<?php echo $WorkAssignListVal['address'];?>" /> </td>

                  <?php } ?>

                             

                 

              </tr>



              <?php

      } ?>



         

           

        </tbody>

        

    </table>

 

 <?php }  ?>







</form>

</div>

    <br><br>





  </div>

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

</section>          

    



           

          </div>

        </div>



           

          </div>

        </div>

        <!-- /page content -->

  

<!-- jQuery -->
    <script src="js/ajax_functions.js"></script> 
    <script>
    // Get the "Check All" checkbox element
    const checkAllCheckbox = document.getElementById('checkAll');
    
    // Get all the checkboxes
    const checkboxes = document.getElementsByClassName('checkbox');

    // Add an event listener to the "Check All" checkbox
    checkAllCheckbox.addEventListener('change', function() {
      // Iterate through all the checkboxes
      for (let i = 0; i < checkboxes.length; i++) {
        // Set the checked property of each checkbox to match the "Check All" checkbox
        checkboxes[i].checked = this.checked;
      }
    });
  </script>

    
  <?php include('RootMe/js_linksscript.php');?>
  </body>
</html>

