| Server IP : 172.64.80.1 / Your IP : 172.69.58.211 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
//session_start();
//require_once('../connect.php');
//$db=db_connect();
$matno= $_SESSION['matNo'];
$levelID=$_SESSION['levelID'];
$course= $_SESSION['course'];
//echo $formNo;
//echo $numFresher;
//Get course ID
$res=$db->query("select * from dept where dOption='$course'");
$res_fetch=$res->fetch(PDO::FETCH_BOTH);
$n=$res->rowCount();
if ($n>0){
$deptID=$_SESSION['deptID']=$res_fetch['sn'];
}
//get currect Semester and session
$sql_current=$db->query("select * from current where sn=2");
$sql_current_fetch=$sql_current->fetch(PDO::FETCH_BOTH);
$num_current=$sql_current->rowCount();
if ($num_current==1){
$semester=$_SESSION['asemester']=$sql_current_fetch['asemester'];
$asession=$_SESSION['asession']=$sql_current_fetch['asession'];
}
//get fresher status
$sdouble=$db->query("select * from realdata where matNo='$matno' and fresher like '8%'");
$sdouble_fetch=$sdouble->fetch(PDO::FETCH_BOTH);
$rdouble=$sdouble->rowCount();
$formNo=$sdouble_fetch['formNo'];
if ($rdouble==1){
$matno=$sdouble_fetch['matNo'];
}
//Check amount already paid
$hhh="select sum(amtPaid) as amtP from remitaorder where `regNo`='$matno' and transApproved='True' and (paymentType='School Fees' or paymentType='Additional School Fees')and status<>'Re-fund' and `pay_session`='$asession'";
$query=$db->query($hhh);
$q2_num=$query->rowCount();
//echo $matnoa="select sum(amtPaid) as amtP from remitaorder where `regNo`='$matno' and transApproved='True' and (paymentType='School Fees' or paymentType='Additional School Fees')and status<>'Re-fund' and `pay_session`='$asession'";
$query_fetch=$query->fetch(PDO::FETCH_BOTH);
//echo $asession;
//echo $query_fetch['amtP'];
if (($q2_num>0) and ($query_fetch['amtP']>0)) {
$amtPaid = $query_fetch['amtP'];
// echo "Payment Has Been Made, Proceed to Registration";
//check status repeater
}else{
$amtPaid = 0;
}
//check status repeater
$session_split=explode('/',$asession);
$session_gena=$session_split[0]-1;
$session_genb=$session_split[1]-1;
$session_gen=$session_gena.'/'.$session_genb;
//$checkRemark="select * from rawcgpa where matNo='$matno' and `remark` LIKE 'REPE%' and asession='$session_gen' order by sn";
$checkRemark = "select * from realdata where matNo='$matNo' and `status` like '%Repeat%'";
$resultRemark=$db->query($checkRemark);
$numRemark=$resultRemark->rowCount();
$specialFee=$_SESSION['specialFee'] = 0;
if (($numRemark>0) and ! (($levelID==7) or ($levelID==9) or ($levelID==2)or ($levelID==4) )) {
$remark = 'Repeater';
// echo $numRemark;
// echo $levelID;
$_SESSION['repeater'] = $remark;
// echo 'bbbbbb';
}elseif(($numRemark>0) and (($levelID==7) or ($levelID==9) or ($levelID==2)or ($levelID==4))){
$remark = 'Normal';
$_SESSION['repeater'] = 'Normal';
// echo 'hrrrrrr';
}else{
// $specialFee=$_SESSION['specialFee'] = 0;
$checkFresher="select * from admitted where formNo='$formNo'";
$resultFresher=$db->query($checkFresher);
$numFresher=$resultFresher->rowCount();
// echo '==='.$numFresher.'===';
if ($numFresher>0){
$resultFresher_fetch=$resultFresher->fetch(PDO::FETCH_BOTH);
$remark=$resultFresher_fetch['status'];
$specialFee=$_SESSION['specialFee'] = $resultFresher_fetch['specialFee'];
}else {
$remark = 'Normal';
$statusRealdata = "select * from realdata where matNo='$matNo' and status='Ex-Student'";
$statusRemarkCount = $db->query($statusRealdata)->rowCount();
if ($statusRemarkCount == 1) {
$remark = 'Ex-Student';
}
// $specialFee=$_SESSION['specialFee'] =0.0;
// echo 'herererrerere';
}
}
$k=$db->query("select * from realdata where matNo='$matno' and `status`='Deferment'");
$deferment=$k->rowCount();
if ($deferment=='1'){
$remark='Repeater';
$_SESSION['repeater']=$remark;
}
if ((($levelID == '6') or ($levelID == '7')or ($levelID == '2')or ($levelID == '6')) and ($remark == 'Repeater')) {
$remark='Normal';
}
//End statuse
//$deptID=16;
//$levelID=4;
//$asession='2018/2019';
//$remark='Normal';
//$remark='Repeater';
//$remark='Ex-Student';
//echo $numFresher;
if (($remark=='Ex-Student') and ($levelID==4)){
$remark='Normal';
}
if (($remark=='Ex-Student') and ($levelID==12)){
$remark='Normal';
}
//if ($matno=='2142105554'){
// echo $checkAmount="select * from schoolfee where dept='$deptID' and level='$levelID' and status='$remark' and asession='$asession'" ;
// die();
//}
if ($matno=='CM202101000a97'){
echo $checkAmount="select * from schoolfee where dept='$deptID' and level='$levelID' and status='$remark' and asession='$asession'" ;
}
$checkAmount="select * from schoolfee where dept='$deptID' and level='$levelID' and status='$remark' and asession='$asession'" ;
$resultAmount=$db->query($checkAmount);
$numAmount=$resultAmount->rowCount();
$resultAmount_fetch=$resultAmount->fetch(PDO::FETCH_BOTH);
$kAmt= $resultAmount_fetch['amount']+$specialFee;
$pamela="select * from olevel where formNo='$matno'";
$pamela_exe=$db->query($pamela);
if ($pamela_exe->rowCount()>0){
$pamela_fetch=$pamela_exe->fetch(PDO::FETCH_BOTH);
$olvelCount=$pamela_fetch['noOfResult'];
// echo $olvelCount;
// echo "===".$numFresher;
if (($olvelCount==2) and ($numFresher>0)){
$kAmt= $resultAmount_fetch['amount']+$specialFee+2500;
}
}
$k_amount=$_SESSION['amount']=$_SESSION['amount1']=$kAmt-$amtPaid;
//echo $remark;
//echo $levelID;
//die($kAmt);
?>