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

  //$date=date("Y-m-d");
  $date5=$_GET['date'];
  $branch_id=$_SESSION['branch'];

      
$qr="SELECT * FROM eduportal_attendance_detail as att, edu_student_details as std WHERE att.attendance='L' and att.date like '$date5%' and att.branch_id='$branch_id' and std.student_id=att.student_id  ";
  //echo $qr;
  

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

   // getting branch details

  $m->where("branch_id", $_SESSION['branch']);
  $branch=$m->get("edu_branch_config");
  
     ?>
<!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">
<title>Print Today Late Students</title>
<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />
<script type="text/javascript">
 // window.print();
</script>
<style type="text/css">



.center{text-align:center;}
.alignment{padding-left:1%;text-align:left;}

tr th {border:1px solid black;text-align:center;background-color:lightgray;font-size:14px;}
tr td {border-bottom:1px solid black;border-left:1px solid black;font-size:14px;padding:3px;}
  

@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;">
<img src="<?php echo DOMAIN.AgentDirectory;?>img/<?php echo $branch[0]['logo']; ?>" style="height:80px;width:80px;" /><br>
	<?php echo $branch[0]['Branch_Name'];?> </div> <br>


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

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

<div style="width:33%; float:left; "> <b> Date:</b> <?php echo date("d-M-Y",strtotime($_GET['date']));?> </div>

<div style="width:33%; float:left; "> <b> Total Strength:</b> <?php echo count($WorkAssignListings);?> </div>



<br>


  <table width="100%" class="table"  cellspacing="0" >
  
    
  <thead>
    <tr>
      <th width="5%"  class=""><strong>S.No</strong></th>
      <th width="15%" class=" alignment"><strong>Student Name</strong></th>
      <th width="15%" class=" alignment"><strong>Father Name</strong></th>
      <th width="10%" class=""><strong>Class/Section</strong></th>
      <th width="10%" class=""><strong>Fee Status-(<?php echo date('M');?>)</strong></th>
      <th width="10%" style="border-right:1px solid black;"><strong>Cell No</strong></th>
      
    </tr>
   
    </thead>
       <tbody>
    
<?php 

$count=1;
foreach($WorkAssignListings as $WorkAssignListVal)
{ 
 
      $date=date("Y-m-d");

        $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");

        $m->where("student_id", $WorkAssignListVal['student_id']);
        $feestatus=$m->get("eduportal_monthly_challan");

       // echo $qr;
    
//print_r($dates);
?>
    <tr>
      <td  class="center"><?php echo  $count; ?> </td>
      <td  class="alignment"><?php echo  $WorkAssignListVal['first_name']; ?></td>
      <td  class="alignment"><?php echo  $WorkAssignListVal['last_name']; ?></td>
      <td style="text-align: center;" class="alignment"><?php echo  $class[0]['Class_Name']." / ".$section[0]['section_name']; ?> </td>
      <td style="text-align: center;">
          <?php if($feestatus[0]['paid_status']==0){ ?>    

              
                  Not Paid
                  
             

                 <?php } else if($feestatus[0]['paid_status']==1){ ?>    
                
               
                    Paid 
               


                 <?php } ?> 
      </td>
      <td  class="center"   style="border-right:1px solid black;"> <?php echo  $WorkAssignListVal['cell_no']; ?></td>
      
    </tr>
   
<?php $count++; 
    }
?>

      </tbody>

  </table>

</body>
</html>
