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


<!DOCTYPE html>
<html lang="en">
  <head>
   
    <title>Parents Audit | 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">

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

          <br><br>
          
          <div class="row" style="background-color: white;">
           
  <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">

 <div class="" style="margin-top:10px;">
     
        <div class="">
          <h3 style="float: left;">Parents Audit Report</h3>

          
          </span><div class="clearfix"></div> </div>
         
        </div>
    
      <div class="clearfix"></div>
    </div>
    <br>
     

<div style="overflow-x:auto;">
<?php


$date=date('Y-m-d');
$month=date("m");
$Pmonth=date('m',strtotime("-1 month"));
$branchId=$_SESSION['branch'];

   $qr="SELECT * FROM eduportal_parents_access_audit WHERE Date='$date' and branch_id='$branchId' GROUP BY parents_id";
   $activetoday=$m->query($qr);

   $qr="SELECT * FROM eduportal_parents_access_audit WHERE month_id='$month' and branch_id='$branchId' GROUP BY parents_id";
   $CurrentMonthVisitor=$m->query($qr);

   $qr="SELECT * FROM eduportal_parents_access_audit WHERE month_id='$Pmonth' and branch_id='$branchId' GROUP BY parents_id";
   $LastMonthVisitor=$m->query($qr);
?>


<table id="listofstudents" class="table table-striped table-bordered" style="width:100%">
        <thead>
            <tr style="font-size: 18px;">
                <th width="5%">  S.No</th>
                <th width="40%">Details</th>
                <th width="10%"class="text-center"> Statistics  </th>
                                         
            </tr>
            <tr>
                <th width="5%" class="text-center">1</th>
                <th width="40%"> Active Parents Today</th>
                <th width="10%"class="text-center"> <a class="btn btn-success" style="padding: 0px 20px;" href="today_active_parents.php"> <?php echo count($activetoday); ?> </a> </th>
                                         
            </tr>
            <tr>
                <th width="5%" class="text-center">2</th>
                <th width="40%">Total Visitors (<?php echo date("F");?>)</th>
                <th width="10%"class="text-center"> <a class="btn btn-success" style="padding: 0px 20px;" href="current_month_active_parents.php"><?php echo count($CurrentMonthVisitor); ?></a> </th>
                                         
            </tr>
            <tr>
                <th width="5%"class="text-center">3</th>
                <th width="40%">Total Visitors (<?php $currentMonth = date('F');
                echo Date('F', strtotime($currentMonth . " last month")); ?>)</th>
                <th width="10%"class="text-center"> <a class="btn btn-success" style="padding: 0px 20px;" href="last_month_active_parents.php"> <?php echo count($LastMonthVisitor); ?> </a> </th>
                                         
            </tr>
                     
        </thead>
        <tbody>

    
         
        </tbody>
        
    </table>
</div>

    <br><br>


  </div>
  <div class="clearfix"></div>
</section>
    

           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
  
 <?php include('RootMe/js_linksscript.php');?>

  
  </body>
</html>
