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

<?php

 $sql = "SELECT * FROM `eduportal_attendance_detail` WHERE branch_id='166' and class_id='2652' and section_id='9332'" ;
 // print_r($sql);
 $WorkAssignListings = $m->query($sql); 

 ?>

<!DOCTYPE html>
<html lang="en">
  <head>
   
    <title> View Students | EduPortal </title>
     <?php include('RootMe/css_links.php');?> 
  </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">



<table id="listofstudents" class="table table-striped table-bordered" style="width:100%">

  
   
        <thead>
            <tr>

              
                <th width="5%">S.No</th>
                <th width="20%">Student Name</th>
                <th width="10%">Class/Section ID</th>
                <th width="10%">student table class section</th>
                

               
                
            </tr>
        </thead>
        <tbody>


 
     <?php 
     //echo $_SESSION['branch'];
$count=1;
      foreach($WorkAssignListings as $WorkAssignListVal)
      { 
       

        /*$m->where("student_id", $WorkAssignListVal['student_id']);
        $m->where("branch_id", $_SESSION['branch']);
        $stdName=$m->get("edu_student_details"); 

        $m->where("class_id", $WorkAssignListVal['class_id']);
        $m->where("branch_id", $_SESSION['branch']);
        $className=$m->get("edu_class_config");   

        $m->where("section_id", $WorkAssignListVal['section_id']);
        $m->where("branch_id", $_SESSION['branch']);
        $sectionName=$m->get("edu_adm_section_detail");  

        $m->where("class_id", $stdName[0]['class_id']);
        $m->where("branch_id", $_SESSION['branch']);
        $NowClassName=$m->get("edu_class_config");  

        $m->where("section_id", $stdName[0]['section_id']);
        $m->where("branch_id", $_SESSION['branch']);
        $NowSectionName=$m->get("edu_adm_section_detail");*/

        $data = array(

    'branch_id' => 449,
    'class_id' => 5562,
    'section_id' => 9420
    
    );

   // echo "<pre>"; print_r($data); echo "</pre>";

    $m->where ("branch_Id", 166);
    $m->where ("class_id", 2652);
    $m->where ("section_id", 9332);
    $m->where ("student_id", $WorkAssignListVal['student_id']);
    //$result = $m->update('eduportal_attendance_detail',$data);
  



        
      ?>

        <tr>

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

                  <td style="padding: 2px;" >             
                  
                   <?php echo $WorkAssignListVal['first_name'];?> </td>

                  
                    <td style="padding: 2px; text-align: center;"><?php echo $WorkAssignListVal['class_id']."+++".$WorkAssignListVal['section_id']."+++".$className[0]['Class_Name']."+++".$sectionName[0]['section_name'];?> </td>
                <!--   
                  <td style="text-align:center; padding: 2px;"> <?php echo $stdName[0]['class_id']."+++".$stdName[0]['section_id']."+++".$NowClassName[0]['Class_Name']."+++".$NowSectionName[0]['section_name'];?> </td> -->
                  
                  
              </tr>





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

  </div>

    </form>

    <br><br>


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

        </div> 
        </div>


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


     
        <!-- /page content -->


 <!-- jQuery -->
    <script src="js/ajax_functions.js"></script>
  <?php include('RootMe/js_linksscript.php');?> 
  <!-- Links for Datatable-->

<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
 <script>
        
  $(document).ready(function() {
    $('#listofstudents').DataTable({
      "pageLength": 100
    });
    } 
  );

  $("#checkAll").change(function () {

      $("input:checkbox").prop('checked', $(this).prop("checked"));
  });


</script>
  
  </body>
</html>
