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


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


$brnch=$_SESSION['branch'];
$date=date('Y-m-d');
$LocalityId=$_REQUEST['locality_id'];

$WorkAssignListings = $m->query("SELECT * FROM edu_student_details where branch_id='$brnch' and locality ='$LocalityId' ");


      $m->where("locality_id", $_REQUEST['locality_id']);
      $m->where("branch_id", $_SESSION['branch']);
  	  $LocalityName=$m->get("eduportal_branch_locality");
 
?>
 <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicons-->
<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />
<title> Print Locality Report </title>

<script type="text/javascript">
 // window.print();
</script>
<style type="text/css">
.border{border:1px solid black;}
.center{text-align:center;}
.alignment{padding-left:1%;text-align:left;}

tr th {padding:1.5%;font-size:16px; }
tr td {padding:1%;}



@media print {
    #Header, #Footer { display: none !important; }
}
@media screen
   {
      p.bodyText {font-family:verdana, arial, sans-serif;}
   }

   @media print
   {
      p.bodyText {font-family:georgia, times, serif;}
   }
   @media screen, print
   {
      p.bodyText {font-size:10pt}
   }
   @media print {
  a[href]:after {
    content: none !important;
  }
}
</style>
</head>
<body>



<div style="text-align:center;font-size:25px;font-weight:bold;margin:0 auto;">Locality Report </div> <br>


<div style="text-align:center;font-size:14px;"><b><?php echo $branch[0]['Branch_Name'];?> </b> <br>(<?php echo $branch[0]['Branch_Location']." Cell: ".$branch[0]['Owner_no'];?>) </div>

<hr style="width:100%;">

<div style="width:40%;float:left;">  <b> Date:</b> <?php echo date("d-M-Y");?> </div>

<div style="width:20%; float:left; "> <!-- <b> Total Presents:</b> --> </div>

<div style="width:20%; float:left; "><!--  <b> Total Absents:</b> -->  </div>

<div style="width:20%; float:right; "> <b> Locality Name:</b> <?php echo $LocalityName[0]['locality_name'];?> </div>

<br>


 

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

                <th width="" class="border center"> S.No </th>
                <th width="" class="border "> Roll No </th>
                <th width="" class="border "> Student Name </th>
                <th width="" class="border "> Father Name </th>
                <th width="" class="border "> Cell Number </th>
                <th width="" class="border "> Address </th>
                
                
            </tr>
        </thead>
        <tbody>


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

     
      
       // getting strength of students 
       
     
      $m->where("locality", $localityId);
      $m->where("status", 0);
      $m->where("branch_id", $_SESSION['branch']);
      /*$m->where("session_id", $_SESSION['current_session']);*/
      $total=$m->get("edu_student_details");
      $std+=count($total);
 
      ?>

        <tr>


                  
                  <td class="border center"> <?php echo $count; $count++;?> </td>

                  <td class="border " style="text-align: center;"> <?php echo  $WorkAssignListVal['candidate_roll_no'];?> </td>

                  <td class="border " style="text-align: center;"> <?php echo  $WorkAssignListVal['first_name'];?> </td>

                  <td class="border " style="text-align: center;"> <?php echo  $WorkAssignListVal['last_name'];?> </td>

                  <td class="border " style="text-align: center;"> <?php echo  $WorkAssignListVal['cell_no'];?> </td>

                  <td class="border " style="text-align: center;"> <?php echo  $WorkAssignListVal['address'];?> </td>
 

              </tr>





              <?php
      } ?>



           
            
           
        </tbody>
        
    </table>

</body>
</html>
