<?php
$alldept = ONLINEPAY:: showdept();
$dprepare ="";
$allsession = ONLINEPAY:: showsession();
$tag = $_GET['type'];
//echo $tag;
//$accept = ONLINEPAY::showallacceptance('acceptance_tranzact_remita', '2023/2024');
 require ('class/config.php');
 
 $rowcounthptpart=0;
 
  $sqlall = "SELECT * FROM `acceptance_tranzact_remita` WHERE (`formno` LIKE '%FT230%' or `formno` LIKE '%PT230%' or `formno` LIKE '%PU230%') AND `statusMessage` LIKE 'Successful' ";
if ($resultall = mysqli_query($newconn, $sqlall)) {
    // Return the number of rows in result set
    $rowcountall = mysqli_num_rows( $resultall );
 }
 
 $sql = "SELECT * FROM `acceptance_tranzact_remita` WHERE `formno` LIKE '%FT230%' AND `statusMessage` LIKE 'Successful'";
if ($result = mysqli_query($newconn, $sql)) {
    // Return the number of rows in result set
    $rowcount = mysqli_num_rows( $result );
 }
 
$sql1 = "SELECT * FROM `acceptance_tranzact_remita` WHERE `formno` LIKE '%PU230%' AND `statusMessage` LIKE 'Successful'";
if ($result1 = mysqli_query($newconn, $sql1)) {
   // Return the number of rows in result set
    $rowcount1 = mysqli_num_rows( $result1 );
    
    
 }
 
 $sql2 = "SELECT * FROM `acceptance_tranzact_remita` WHERE `formno` LIKE '%PT230%' AND `statusMessage` LIKE 'Successful'";

if ($result2 = mysqli_query($newconn, $sql2)) {

    // Return the number of rows in result set
    $rowcount2 = mysqli_num_rows( $result2 );
    
    
 }
 
 
  $sql3 = "SELECT * FROM `acceptance_tranzact_remita` WHERE `formno` LIKE '%PT230%' AND `statusMessage` LIKE 'Successful' AND level='HND I'";

if ($result3 = mysqli_query($newconn, $sql3)) {

    // Return the number of rows in result set
    $rowcount3 = mysqli_num_rows( $result3 );
    
    
 }
 
  $sqlpu = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%PU230%' AND `statusMessage` LIKE 'Successful' AND level='ND I' AND batch=0";

if ($resultpu = mysqli_query($newconn, $sqlpu)) {

    // Return the number of rows in result set
    $rowcountpu = mysqli_num_rows( $resultpu );
    
    
 }
 
  $sqlpuhalf = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%PU230%' AND `statusMessage` LIKE 'Successful' AND level='ND I' and batch=1";

if ($resultpuhalf = mysqli_query($newconn, $sqlpuhalf)) {

    // Return the number of rows in result set
    $rowcountpuhalf = mysqli_num_rows( $resultpuhalf );
    
    
 }
 
 
 
  $sqlpt = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%PT230%' AND `statusMessage` LIKE 'Successful' AND level='ND I' AND batch=0";

if ($resultpt = mysqli_query($newconn, $sqlpt)) {

    // Return the number of rows in result set
    $rowcountpt = mysqli_num_rows( $resultpt );
    
    
 }
 
 
 $sqlpthalf = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%PT230%' AND `statusMessage` LIKE 'Successful' AND level='ND I' AND batch=1";

if ($resultpthalf = mysqli_query($newconn, $sqlpthalf)) {

    // Return the number of rows in result set
    $rowcountpthalf = mysqli_num_rows( $resultpthalf );
    
    
 }
 
 
 
  $sqlft = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%FT230%' AND `statusMessage` LIKE 'Successful' AND level='HND I' AND batch=0";

if ($resultft = mysqli_query($newconn, $sqlft)) {

    // Return the number of rows in result set
    $rowcountft = mysqli_num_rows( $resultft );
    
    
 }
 
 
 $sqlfthalf = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%FT230%' AND `statusMessage` LIKE 'Successful' AND level='HND I' AND batch=1";

if ($resultfthalf = mysqli_query($newconn, $sqlfthalf)) {

    // Return the number of rows in result set
    $rowcountftpart = mysqli_num_rows( $resultfthalf );
    
    
 }
 
 
  $sqlhpt = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%PT230%' AND `statusMessage` LIKE 'Successful' AND level='HND I' and batch=0";

if ($resulthpt = mysqli_query($newconn, $sqlhpt)) {

    // Return the number of rows in result set
    $rowcounthpt = mysqli_num_rows( $resulthpt );
    
    
 }
 
 
 
 $sqlhpthalf = "SELECT * FROM `schoolfees_tranzact_remita` WHERE `formno` LIKE '%PT230%' AND `statusMessage` LIKE 'Successful' AND level='HND I' and batch=1";

if ($resulthptpart = mysqli_query($newconn, $sqlhpthalf)) {

    // Return the number of rows in result set
    $rowcounthptpart = mysqli_num_rows( $resulthptpart );
    
    
 }
 
 
  $sqlhhndiiftpt = "SELECT * FROM `schoolfees_tranzact_remita` WHERE  formno LIKE '%FT220%' AND `statusMessage` LIKE 'Successful' AND `level` LIKE 'HND II'";

if ($resulthhdniiftpt = mysqli_query($newconn, $sqlhhndiiftpt)) {

    // Return the number of rows in result set
    $rowcounthndiiftpt = mysqli_num_rows( $resulthhdniiftpt );
    
    
 }
 
 
  $sqlhhndiiftptreturn = "SELECT * FROM `schoolfees_tranzact_remita` WHERE (`formno` LIKE '%FT200%' or formno LIKE '%FT210%' OR formno LIKE '%FT190%' OR formno LIKE '%FT180%') AND `statusMessage` LIKE 'Successful' AND (`level` LIKE 'HND II')";

if ($resulthhdniiftptreturn = mysqli_query($newconn, $sqlhhndiiftptreturn)) {

    // Return the number of rows in result set
    $rowcounthndiiftptretunr = mysqli_num_rows( $resulthhdniiftptreturn );
    
    
 }
 
 
  $sqlhhndiipt = "SELECT * FROM `schoolfees_tranzact_remita` WHERE (`formno` LIKE '%DP20%' or formno LIKE '%DP21%' OR formno LIKE '%PT22%') AND `statusMessage` LIKE 'Successful' AND (`level` LIKE 'HND II' or `level` LIKE 'HND I')";

if ($resulthhdniipt = mysqli_query($newconn, $sqlhhndiipt)) {

    // Return the number of rows in result set
    $rowcounthndiipt = mysqli_num_rows( $resulthhdniipt );
    
    
 }
 
 
 
 
  $sqlndiift = "SELECT * FROM `schoolfees_tranzact_remita` WHERE   formno LIKE '%PU220%'  AND `statusMessage` LIKE 'Successful' AND (`level` LIKE 'ND II' )";

if ($resultndiift = mysqli_query($newconn, $sqlndiift)) {

    // Return the number of rows in result set
    $rowcountndiift = mysqli_num_rows( $resultndiift );
    
    
 }
 
  
 
 
  $sqlndiiftold = "SELECT * FROM `schoolfees_tranzact_remita` WHERE (`formno` LIKE '%PU200%' or formno LIKE '%PU210%' OR formno LIKE '%PU190%' OR formno LIKE '%PU180%')  AND `statusMessage` LIKE 'Successful' AND (`level` LIKE 'ND II' or `level` LIKE 'ND I')";

if ($resultndiiftold = mysqli_query($newconn, $sqlndiiftold)) {

    // Return the number of rows in result set
    $rowcountndiiftold = mysqli_num_rows( $resultndiiftold );
    
    
 }
 
 
 
  $sqlndiipt = "SELECT * FROM `schoolfees_tranzact_remita` WHERE  formno LIKE '%PT220%'  AND `statusMessage` LIKE 'Successful' AND `level` LIKE 'ND II'";

if ($resultndiipt = mysqli_query($newconn, $sqlndiipt)) {

    // Return the number of rows in result set
    $rowcountndiipt = mysqli_num_rows( $resultndiipt );
    
    
 }
 
 
  $sqlndiiptold = "SELECT * FROM `schoolfees_tranzact_remita` WHERE (`formno` LIKE '%DP200%' or formno LIKE '%DP210%' OR formno LIKE '%DP190%' OR formno LIKE '%DP180%')  AND `statusMessage` LIKE 'Successful' AND (`level` LIKE 'ND II'or `level` LIKE 'ND I')";

if ($resultndiiptold = mysqli_query($newconn, $sqlndiiptold)) {

    // Return the number of rows in result set
    $rowcountndiiptold = mysqli_num_rows( $resultndiiptold );
    
    
 }
 
//mysqli_close($newconn);

$admitted = ONLINEPAY::showalladmitted('student_activity_level', '2023/2024');

//$PU = ONLINEPAY::puallschoolfee('schoolfees_tranzact', 'PU23','ND I', '2023/2024');
//$DP = ONLINEPAY::dpallschoolfee('schoolfees_tranzact', 'PT23','ND I', '2023/2024');


 $PUII = ONLINEPAY::pushowallschoolfee('schoolfees_tranzact', 'PU22','ND II', '2023/2024');
 $DPII = ONLINEPAY::dpshowallschoolfee('schoolfees_tranzact', 'DP22','ND II', '2023/2024');


// $FTHNDI = ONLINEPAY::fthnd1showallschoolfee('schoolfees_tranzact', 'FT23','HND I', '2023/2024');
 //$DPHNDI = ONLINEPAY::dphnd1showallschoolfee('schoolfees_tranzact', 'PT23','HND I', '2023/2024');


 $FTHNDII = ONLINEPAY::fthnd2showallschoolfee('schoolfees_tranzact', 'FT22','HND II', '2023/2024');
 $DPHNDII = ONLINEPAY::dphnd2showallschoolfee('schoolfees_tranzact', 'DP22','HND II', '2023/2024');


?>
    <div class="container" style="position:relative; width=100% ;height:470px; overflow-y:scroll">
        
        <div id="mytable"> 
       
       
        <table class="table table-bordered table-hover" scrollable="true" style="position: relative; width:100%; height900px; position:absolute; overflow-y:scroll"  align="center" >
            <tr><td colspan="3"><h3 style="text-align:center">Record as at <?php  echo date('j-F-Y');?></h3></td></tr>
            
        <tr><td width="40%"><h5>Number of Students Admitted </h5></td> 
        <td colspan="2"><?php echo '<h5>'.$admitted->allAd.'</h5>'; ?></td></tr>
        
        <tr><td width="40%"><h5>Number of Students that pay Acceptance</h5></td> 
        <td colspan="2"><?php echo '<h5>'.$rowcountall.'</h5>'; ?></td></tr>
        
          <tr><td><h5>Number of ND FULL TIME Students that pay Acceptance fees</h5></td><td><h5> <?php echo $rowcount1; ?></h5></td> 
        <td></td></tr>
        
        <tr><td><h5>Number of ND PART TIME Students that pay Acceptance fees</h5></td><td><h5> <?php echo $rowcount2 ; ?></h5></td> 
        </tr>
        
        <tr><td><h5>Number of HND FULL TIME Students that pay Acceptance fees</h5></td><td><h5> <?php echo $rowcount; ?></h5></td> 
        <td></td></tr>
    
         <tr><td><h5>Number of HND PART TIME Students that pay Acceptance fees</h5></td><td><h5> <?php echo $rowcount3; ?></h5></td> 
        <td></td></tr>    
        
         <tr><td><h5>Number of ND I FULL TIME  Students that pay School fees (FULL PAYMENT)</h5></td><td><h5> <?php echo $rowcountpu; ?></h5></td> 
        <td></td></tr>   
        
        <tr><td><h5>Number of ND I FULL TIME  Students that pay School fees (HALF PAYMENT)</h5></td><td><h5> <?php echo $rowcountpuhalf; ?></h5></td> 
        <td></td></tr>   
        
         <tr><td><h5>Number of ND I PART TIME  Students that pay School fees (FULL PAYMENT)</h5></td><td><h5> <?php echo $rowcountpt; ?></h5></td> 
        <td></td></tr> 
        
        <tr><td><h5>Number of ND I PART TIME  Students that pay School fees (HALF PAYMENT)</h5></td><td><h5> <?php echo $rowcountpthalf; ?></h5></td> 
        <td></td></tr> 
        

         <tr><td><h5>Number of HND I FULL TIME  Students that pay School fees (FULL PAYMENT)</h5></td><td><h5> <?php echo $rowcountft; ?></h5></td> 
        <td></td></tr>    
        
         <tr><td><h5>Number of HND I FULL TIME  Students that pay School fees  (HALF PAYMENT)</h5></td><td><h5> <?php echo $rowcountftpart; ?></h5></td> 
        <td></td></tr>    
       
        <tr><td><h5>Number of HND I PART TIME  Students that pay School fees (FULL PAYMENT)</h5></td><td><h5> <?php echo $rowcounthpt; ?></h5></td> 
        <td></td></tr> 
        
        
        <tr><td><h5>Number of HND I PART TIME  Students that pay School fees (HALF PAYMENT) </h5></td><td><h5> <?php echo $rowcounthptpart; ?></h5></td> 
        <td></td></tr> 
        
        <tr><td><h5>Number of ND II FULL TIME Students that pay School fees</h5></td><td><h5> <?php echo $rowcountndiift; ?></h5></td> 
        <td></td></tr> 
        
        <tr><td><h5>Number of Old ND II FULL TIME Students that pay School fees</h5></td><td><h5> <?php echo $rowcountndiiftold; ?></h5></td> 
        <td></td></tr> 
        
         <tr><td><h5>Number of ND II PART TIME Students that pay School fees</h5></td><td><h5> <?php echo $rowcountndiipt; ?></h5></td> 
        <td></td></tr> 
        
        <tr><td><h5>Number of old ND II PART TIME Students that pay School fees</h5></td><td><h5> <?php echo $rowcountndiiptold; ?></h5></td> 
        <td></td></tr>
        
        
        <tr><td><h5>Number of HND II FULL TIME Students that pay School fees</h5></td><td><h5> <?php echo $rowcounthndiiftpt; ?></h5></td> 
        <td></td></tr> 
        
        
        <tr><td><h5>Number of Old HND II FULL TIME Students that pay School fees</h5></td><td><h5> <?php echo $rowcounthndiiftptretunr; ?></h5></td> 
        <td></td></tr> 
 <!--$rowcounthndiiftptretunr -->
 
        <tr><td><h5>Number of HND II PART TIME Students that pay School fees</h5></td><td><h5> <?php echo $rowcounthndiipt; ?></h5></td> 
        <td></td></tr> 
        
        
        </table
