| Server IP : 172.64.80.1 / Your IP : 172.70.50.62 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_student/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: SERVER
* Date: 06/02/2016
* Time: 3:29 PM
*/
ob_start();
session_start();
if ((isset($_GET['all_hall_id'])) and (isset($_GET['all_room_id'])) and (isset($_GET['all_bed_id'])) ) {
$all_hall_id=$_GET['all_hall_id'];
$all_room_id=$_GET['all_room_id'];
$all_bed_id=$_GET['all_bed_id'];
switch ($all_hall_id) {
case 1:
$all_hall_name = 'Titi Aminat Atiku';
break;
case 2:
$all_hall_name = 'Simbiat Abiola';
break;
case 3:
$all_hall_name = 'Adeleke Ester';
break;
case 4:
$all_hall_name = 'Okunade Sijuwade';
break;
case 5:
$all_hall_name = 'Ado Bayero';
break;
}
// switch ($all_room_id) {
// case 1:
// $venue = 'Titi Aminat Atiku';
// break;
// case 2:
// $venue = 'Simbiat Abiola';
// break;
// case 3:
// $venue = 'Adeleke Ester';
// break;
// case 4:
// $venue = 'Okunade Sijuwade';
// break;
// case 5:
// $venue = 'Ado Bayero';
// break;
// }
$matNo = $_SESSION['matNo'];
require_once('../connect.php');
$ss = "select * from room_allocation where matNo='MatNo'";
$ss_fetch = $ss->
$dat = date('l, M d, o, h:i:s a');
$db = db_connect();
$sql = $db->query("select * from realdata where matNo='$matNo'");
$sql_fetch = $sql->fetch(PDO::FETCH_BOTH);
$num = $sql->rowCount();
if ($num == 1) {
$matNo = $sql_fetch['matNo'];
$fullName = explode(' ', ($sql_fetch['names']));
$surname = strtoupper($fullName[0]);
$othernames = $fullName[1] . ' ' . $fullName[2];
$sex = $sql_fetch['sex'];
$dept = $sql_fetch['course'];
if ($sex == 'Male') {
$title = 'Mr.';
$dd = "He";
$dd2 = "his";
$dd3 = "him";
$tit="Sir";
} else {
$title = 'Miss.';
$dd = "She";
$dd2 = "her";
$dd3 = "her";
$tit="Ma";
}
// $k=count($fullName);
$ku = $db->query("select * from dept where dOption='$dept'");
$ku_fetch = $ku->fetch(PDO::FETCH_BOTH);
$schlName = $ku_fetch['dSchool'];
// $it_session = $ku_fetch['it_session'];
}
$mainBody =
'<img src="../images/siwesHead.png">
<div style="font-size: 18px; text-align: center"><b>TENANCY AGREEMENT FORM</b></div>
<div align="right">Date: ' . date('d/m/y') . ' </div>
<strong> <h3>NAME OF HALL: '.strtoupper($all_hall_name).'</h3></strong>
<div style="font-size: 23px";align="justify">
<ol type="1" >
<li>I, <b>' . $title . ' ' . $surname . ' ' . $othernames . '</b> with Matriculation Number '.$matNo.', a student in the Department of <b> ' . $dept . '</b>, School of<b> ' . $schlName . '</b>
have been allocated to Room <b>' . $all_room_id . ' </b>in the above named Hall of residence for the period covering the Session (that is, the two Semesters excluding normal vacation period) in accordance with the Polytechnic calendar in consideration of my having paid the sum of
Twenty Thousand Naira (#20,000.00) ONLY</li>
<li>I confirm that the bed space ('.$all_bed_id.') in this room has been officially allocated to me by the Student Affiars Office after the payment of the sripulated sum of ' . $amtPaid . 'for accommodation.
</li>
<li>I agree to pay for any damage done to the facilities in the room or the hall as a whole due to carelessness or deliberate destruction of the Polytechnic property during my tenure.</li>
<li>I shall return the key to the room at the end of each semester except express permission is granted to remain in the residence by the appropriate authorities on payment of specified fees.</li>
</ol>
<table style="font-size: 17px"><tr ><td colspan="4">STUDENTS NAME: ' . $surname . ' ' . $othernames . '</td></tr>
<tr><td colspan="1">Signature:</td><td colspan=1>____________________ </td><td colspan=1> Matriculation No:</td><td>' . $matNo . '</td></tr>
<tr><td colspan="1">Room Allocation Details:</td><td> Room - '.$all_room_id. 'Bed Space -'.$all_bed_id . ' </td> <td> Date</td><td>' . $dat . '</td>></tr>
<tr><td colspan="2">STUDENTS\' AFFAIRS OFFICER: ..................................................</td><td colspan="2">DATE: ......................................................</td></tr><br>
<p></p>
</table>
<p></p>-------------------------------------------------------------
<div>NB: Hostels will be opened on Sunday 09/04/2023.</div></div>
';
//echo $mainBody;
$customizedFooter = '<img src="../images/siwesfooter.png"><br><div align="right">' . $dat . '</div>';
include("../mpdf/mpdf.php");
$filename = 'tenancyForm-' . $matNo . '.pdf';
$mpdf = new mPDF('c');
$mpdf->SetWatermarkImage('../../images/logoBack.png');
$mpdf->showWatermarkImage = true;
$mpdf->WriteHTML($mainBody);
$mpdf->setFooter($customizedFooter);
$mpdf->Output($filename, 'D');
exit;
}else{
echo "An Error has Occur, Contact ICT on 07061230735 (WhatsApp ONLY)";
}
?>