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

<?php
if($_REQUEST['month']!='')
{ ?>


    <table border="1" width="100%"  class="responsive">  


    <tr>

<?php 
$month=$_GET['month'];
$days=date('t', mktime(0, 0, 0, $month, 1, date("Y")));
for($i=1;$i<$days+1;$i++){     

?>

 <th class="thStyle" style="padding:6px 5px;"> <?php echo $i;?>  </th>

<?php } ?>

  </tr>


    <tr>  
<?php 
$month=$_GET['month'];
$sessionID=$_GET['session'];
$days=date('t', mktime(0, 0, 0, $month, 1, date("Y")));
for($i=1;$i<$days+1;$i++){

   $date=date("Y")."-".str_pad($month, 2, '0', STR_PAD_LEFT)."-".str_pad($i, 2, '0', STR_PAD_LEFT);

   $id=$_GET['student'];
     
   $qr="select * from eduportal_attendance_detail where date='$date' and student_id='$id' and session_id='$sessionID'";
   //print_r($qr);
   $att = $m->query($qr);
  
?>

 <th class="" style="padding:6px 4px;"> <?php  if($att[0]['attendance']!=NULL){echo $att[0]['attendance'];}else {echo "-";};?> </th>

<?php } ?>

  </tr>



</table>


<?php } ?>

