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

$branch=$_SESSION['branch'];
$classID=$_REQUEST['class_id'];
$sectionID=$_REQUEST['section'];
$session=$_SESSION['current_session'];

$sql = "SELECT * FROM  edu_student_details  WHERE branch_id='$branch' and status='0' and session_id='$session' and class_id='$classID' and section_id='$sectionID' order by CAST(ref_no as unsigned)  asc ";

   //echo $sql;

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



  // getting branch details
  
  //$branch=getBranch($m);

  // getting details of total records



     ?>


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

.thStyle{background-color:lightgray;text-align:center;}

</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="" 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>
   

     
<table id="excelexpo" class="table table-striped table-bordered" style="width:100%">
  
          <thead>
            <tr>

              
                <th width="">S.no</th>
                <th width="">Student</th>
                <th width="">Father</th>
                <th width="">Class</th>
                <th width="">Section</th>
                <th width="" style="text-align: center;">Roll#</th>
                <th width="" style="text-align: center;">Adm No</th>
                <th width="" style="text-align: center;">Cell</th>
                <th width="" style="text-align: center;">CNIC</th>
                <th width="" style="text-align: center;">Gender</th>
                <th width="" style="text-align: center;">Date Of Birthday</th>
               
                             
               
            </tr>
        </thead>
        <tbody>


   
     
   <?php 
$count=1;
      foreach($WorkAssignListings as $WorkAssignListVal)
      { 

        $m->where("class_id", $WorkAssignListVal['class_id']);
        $class=$m->get("edu_class_config");

        $m->where("section_id", $WorkAssignListVal['section_id']);
        $section=$m->get("edu_adm_section_detail");      
        
      ?>

         <tr>

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

          <td style="padding: 2px; text-align: left;"> <?php echo $WorkAssignListVal['first_name'];?></td>
          <td style="padding: 2px; text-align: left;"> <?php echo $WorkAssignListVal['last_name']; ?> </td>
          <td style="text-align:center; padding: 2px;"><?php echo $class[0]['Class_Name'];?> </td>
          <td style="text-align:center; padding: 2px;"><?php echo $section[0]['section_name'];?> </td>                
          <td style="padding: 2px; text-align: center;"> <?php echo $WorkAssignListVal['candidate_roll_no']; ?> </td>
          <td style="padding: 2px; text-align: center;"> <?php echo $WorkAssignListVal['ref_no']; ?> </td>
          <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['cell_no'];?> </td>
          <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['cnic'];?> </td>
          <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['gender'];?> </td>
          <td style="text-align:center; padding: 2px;"> <?php if ($WorkAssignListVal['dob']!=NULL) {            
          echo date("d-M-Y",strtotime($WorkAssignListVal['dob']));} ?> </td>
          
        
          
         </tr>

              <?php
      } ?>
 
        </tbody>
        
    </table>








  </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>
   
   <script src="js/FileSaver.min.js" type="text/javascript"></script>
  <script src="js/tableexport.min.js" type="text/javascript"></script>

  <script type="text/javascript">
    $('#excelexpo').tableExport();
  </script>
  </body>
</html>
