| Server IP : 172.64.80.1 / Your IP : 172.70.131.126 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/admin_main/ |
Upload File : |
<?php
ini_set('memory_limit', '512M');
/**
* Created by PhpStorm.
* User: SERVER
* Date: 06/02/2016
* Time: 3:29 PM
*/
session_start();
require_once('../connect.php');
$mainBody='<center><H3 align="center"><img src="../images/siwesHead.png"><BR> 2019/2020 SCHOOL FEES REPORT</H3>';
$db=db_connect();
$dat=date('l, M d, o, h:i:s a');
$dateNow=date('d/ m/ y');
//$sql3=$db->query("select course,levelID,count(sn) as population,sum(amount) as amt from vw_schoolfees_2018_2019 where levelID >4 group by course,levelID order by course,levelID");
$sql3=$db->query("select course,levelID,count(sn) as population,sum(amount) as amt from vw_school_fees_2019_2020 group by course,levelID order by course,levelID");
$numCourse=$sql3->rowCount();
//die("am here");
$mainBody.='
<table border="1" cellspacing="0">
<tr>
<th width="10%">S/N</th>
<th width="40%">NAME OF DEPARTMENT</th>
<th width="15%">LEVEL </th>
<th width="15%">POPULATION</th>
<th width="20%">AMOUNT (N)</th>
</tr>
';
$i=1;
$numStudent=0;
$amtTotal=0;
while($row=$sql3->fetch(PDO::FETCH_BOTH)) {
// $mainBody .= '<tr><td>' . $i . '</td><td>';
$dept = $row['course'];
$levelID = $row['levelID'];
$population = $row['population'];
$amt=$row['amt'];
$sql = $db->query("select * from leveltb where id='$levelID'");
$sql_fetch = $sql->fetch(PDO::FETCH_BOTH);
$numStudent+=$population;
$amtTotal+=$amt;
if ($sql->rowCount() > 0) {
$mainBody .= '<tr><td width="10%">' . $i . '</td><td width="60%">' . $dept . '</td><td>' . $sql_fetch['levelName'] . '</td><td>' . $population . '</td><td>' . number_format($amt) . '</td>';
}
$i++;
}
$numCourse=$numCourse;
$mainBody.='
<tr>
<td colspan="3" align="right"><B> Total Number of Students = </B></td>
<td colspan="1"><B> '. $numStudent.'</B></td>
<td colspan="1"><B> N'.number_format($amtTotal) .'</B></td>
</tr>';
$mainBody.='</tr></table>';
//echo $mainBody;
//die();
//$dat=date('l, M d, o, h:i:s a');
include("../mpdf/mpdf.php");
$filename='schoolFeesPaid_2019_2020'.'.pdf';
//$mpdf=new mPDF('c');
$mpdf=new mPDF('','', 0, '', 10, 10, 10, 10, 9, 9, 'P');
$mpdf->SetWatermarkImage('../../images/logoBack.png');
$mpdf->showWatermarkImage = true;
$dat=date('l, M d, o, h:i:s a');
$customizedFooter='<img src="../images/siwesfooter.png"><br><div align="right">'. $dat.'</div>';
$mpdf->WriteHTML($mainBody);
$mpdf->setFooter($customizedFooter) ;
//$mpdf->Output();
$mpdf->Output($filename,'D');
exit;
ob_end_flush();
?>