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

<?php



 $sql = "SELECT * FROM  dummy_data_insert" ;
 // 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%">
  <input onClick="return confirm('Are you sure you want to struck of all students course completed?');" class="btn btn-primary pull-right" type="submit" name="Delete" value=" Struck of as Course Completed">
  
   
        <thead>
            <tr>

              
                <th width="5%">S.No</th>
                <th width="20%">Student Name</th>
                <th width="10%">Father Name</th>
                <th width="10%">Registration</th>
                <th width="10%"> rollNo </th>
                <th width="15%"> CellNo </th>
                <th width="10%"> DOA </th>
                <th width="10%"> DOB</th>
                <th width="10%"> Address</th>
                <th width="8%">class_id </th>
                <th width="8%">section </th>
                <th width="3%"> gender</th>
                <th width="3%"> monthlyFee</th>

               
                
            </tr>
        </thead>
        <tbody>


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

        //echo count($WorkAssignListVal['ref_no']);

       
      	$m->where("ref_no", $WorkAssignListVal['AdmNo']);        
        $m->where("branch_id", $_SESSION['branch']);    
        $stdID=$m->get("edu_student_details");
//echo count($stdID);
//echo $stdID[0]['student_id']."=".$count++."<br>";
       
 

	$data1 = array(
		
		'branch_id' => $_SESSION['branch'],
		'student_id' => $stdID[0]['student_id'],
    'std_outstanding_blc' => $WorkAssignListVal['outstandingBalnce'],
    'class_id' => $stdID[0]['class_id'],
		'session_id' => $_SESSION['current_session']
	);
	
//echo "<pre>"; print_r($data1); echo "</pre>";
	//$result1 =  $m->insert('eduportal_student_fee_structure', $data1);


//$result =  $m->delete ('dummy_data_insert');
        
      ?>

        <tr>

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

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

                  
                   <td style="padding: 2px; text-align: center;"><?php echo $WorkAssignListVal['Father'];?> </td>
                  
                  <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['Class'];?> </td>
                  
                  <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['Sec'];?> </td>

               <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['Contact1'];?> </td>

     
  <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['tuitioFee'];?> </td>

    <td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['Area'];?> </td>

<td style="text-align:center; padding: 2px;"> <?php echo $WorkAssignListVal['Address'];?> </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>
