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

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



$branch=$_SESSION['branch'];

$WorkAssignListings = $m->query("SELECT * FROM eduportal_branch_locality where branch_id='$branch' ORDER BY locality_id asc");



?>



<!DOCTYPE html>

<html lang="en">

  <head>

   

    <title> Locality Reports | 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">







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

    

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

          

      Locality Wise Reports



      <br><br>







        <h3 style="float: left;">List View Locality Wise Students <small>(<?php echo count($WorkAssignListings);?> Locality Records)</small> </h3>



          <a target="_blank" class="btn btn-success pull-right" title="Print Students List" href="print_locality_reports.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&class_id=<?php echo $_GET['class_id'];?>&section=<?php echo $_GET['section'];?>">

          <i class="fa fa-print m-right-xs" target="_blank"></i> &nbsp; Print Report

        </a>



  

  <table  class="table table-striped table-bordered" style="width:100%;background-color:#FFFFFF;">

        <thead>

            <tr>



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

                <th width="30%"> Locality </th>

                <th width="20%" style="text-align:center;"> Students </th>

                <th width="40%" style="text-align:center;">Action </th>

                

            </tr>

        </thead>

        <tbody>





   

     

     <?php 



   

     $count=1;

     $std=0;

      foreach($WorkAssignListings as $WorkAssignListVal)

      { 



        

      $localityId=$WorkAssignListVal['locality_id'];

      $section=$WorkAssignListVal['section_id'];

      

       // getting strength of students 

       

     

      $m->where("locality", $localityId);

      $m->where("status", 0);

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

      $total=$m->get("edu_student_details");

      $std+=count($total);

      ?>



        <tr>





                  

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



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



          <td  style="text-align:center;"> <?php echo count($total);?> </td>

          

          <td style="text-align:center;"> 





          <a target="_blank" style="font-size:14px;"  href="print_locality_wise_students.php?<?php echo session_id().session_id().session_id().session_id().session_id();?>&locality_id=<?php echo $WorkAssignListVal['locality_id'];?>&section=<?php echo $WorkAssignListVal['section_id'];?>" style="cursor:pointer;"  class="btn btn-success">



          View Locality

          </a>



                



          </td>



              </tr>



              <?php

      }   ?>



  

           

        </tbody>

        

    </table>



        </div> 

        </div>



            </div>

          </div>

        </div>

        <!-- /page content -->

  



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

  

  </body>

</html>

