| Server IP : 172.64.80.1 / Your IP : 108.162.241.67 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/admin_student/ |
Upload File : |
<?php
ob_start();
require_once('headMain.php');
require_once('../connect.php');
$db=db_connect();
$sex=$_SESSION['sex'];
$matNo=$_SESSION['matNo'];
if (isset($_GET['id_type'])) {
$ID = $_GET['id_type'];
}else{
$ID=0;
}
if($sex==$ID) {
if ($ID==1){
$hostel_sex="Male";
}
if ($ID==0){
$hostel_sex="Female";
}
//echo "select * from room_allocation where matNo='$matNo'";
$check=$db->query("select * from room_allocation where matNo='$matNo'");
$check_u=$check->rowCount();
$check_fetch=$check->fetch(PDO::FETCH_ASSOC);
$check_sn=$check_fetch['sn'];
// die();
if($check_u>0){
echo "<h2>You have been Previously Allocated to a Bed Space in ".$hostel_sex. " hostel</h2>";
echo '<h2><a href="index_pay_accomodation.php?ID='.$check_sn.'">Click Here to Pay</a> </h2>';
echo "<h3 style='color: red'>*Note that the Payment must be made between 12 Hours. Thanks</h3>";
}else{
$sqla = "SELECT * FROM `room_allocation` where matNo ='' and sex='$ID' and paid=0 and status=0";
$sql = $db->query($sqla);
$sql->rowCount();
// die();
if ($sql->rowCount() > 1) {
$sql_fetch = $sql->fetch(PDO::FETCH_ASSOC);
$allocation_ID = $sql_fetch['sn'];
// die();
$sql_allocation="UPDATE room_allocation SET status=1, matNo='$matNo' where sn='$allocation_ID'";
$sql_all_exe=$db->query($sql_allocation);
if ($sql_all_exe){
echo "You have been Allocated to a Bed Space in ".$hostel_sex. " hostel";
$f="index_pay_accomodation.php?ID=".$allocation_ID;
// die();
echo '<h2><a href='.$f.'>Click Here to Pay</a> </h2>';
echo "<h3 style='color: red'>*Note that the Payment must be made between 12 Hours. Thanks</h3>";
}
//echo "am here";
} else {
echo '<h2>You are not Qualify to apply for Hostel. Thank you</h2>';
echo ' <h4 class="widget-thumb-heading"><a href="hostel_process.php" > Click Here Proceed</a></h4>';
}
}
}else{
echo '<h2>An error has occurred, Kindly Contact ICT on 07061230735</h2>';
}
?>
<?php
include('footMain.php');
ob_end_flush();
?>
</div>