| 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/eace_entranceForm/ |
Upload File : |
<?php
ob_start();
session_start();
extract($_POST);
require_once('../connect.php');
$db=db_connect();
$session='2019/2020';
$level=$_SESSION['formType'];
$formNo=$_SESSION['formNo'];
$material=$_FILES['user_file'];
$material_name=$_FILES['user_file']['name'];
/*if(!$material_name){
// header('location:'.'biodata_edit.php?id=3');
echo $material_name;
die();
}*/
$material_type=$_FILES['user_file']['type'];
//$material_tmp=$_FILES['user_file']['tmp_name'];
$material_size=$_FILES['user_file']['size'];
$old=$_FILES['user_file']['tmp_name'];
$new="../eace_passportForm/".$formNo.".jpg";
//unlink('$news');
move_uploaded_file($old,$new);
if ($level=='aceForm'){
$queryJamb="SELECT * FROM jambrelease WHERE jambNo='$jambNo'";
$rsJamb=$db->query($queryJamb);
$rsJamb_fetch = $rsJamb->fetch (PDO::FETCH_BOTH);
$jambScore=$rsJamb_fetch['totalScore'];
$levelid="UTME";
$mode='FT';
$ndMatNo='0';
$ndResult=0;
$nddept='0';
$ndinst='0';
$ndit='0';
$nditaddr='0';
$nditF='0';
$nditT='0';
}elseif($level=='ptForm') {
$levelid="PT";
$jambNo='0';
$jambScore=0;
$mode='PT';
$ndMatNo='0';
$ndResult=0;
$nddept='0';
$ndinst='0';
$ndit='0';
$nditaddr='0';
$nditF='0';
$nditT='0';
}elseif ($level=='dptForm') {
$levelid="DPT";
$jambNo='0';
$jambScore=0;
$mode='PT';
$ndMatNo='0';
$ndResult=0;
$nddept='0';
$ndinst='0';
$ndit='0';
$nditaddr='0';
$nditF='0';
$nditT='0';
}elseif($level=='hndForm'){
$levelid="HND";
$jambNo=$jambNo;
$jambScore=0;
$mode='FT';
}elseif($level=='preForm'){
$levelid="PRE";
$jambNo='0';
$jambScore=0;
$mode='FT';
$ndMatNo='0';
$ndResult=0;
$nddept='0';
$ndinst='0';
$ndit='0';
$nditaddr='0';
$nditF='0';
$nditT='0';
}elseif($level=='remForm'){
$levelid="REM";
$jambNo='0';
$jambScore=0;
$mode='FT';
$ndMatNo='0';
$ndResult=0;
$nddept='0';
$ndinst='0';
$ndit='0';
$nditaddr='0';
$nditF='0';
$nditT='0';
}
//die($jambScore);
$surname=str_replace("'","''",$surname);
$otherName=str_replace("'","''",$otherName);
$address=str_replace("'","''",$address);
$gName=str_replace("'","''",$gName);
$gAddress=str_replace("'","''",$gAddress);
$nName=str_replace("'","''",$nName);
$nAddress=str_replace("'","''",$nAddress);
$ndit=str_replace("'","''",$ndit);
$nditaddr=str_replace("'","''",$nditaddr);
///===============================
$sql_fill=$db->query("select * from eace_stddata where formNo=$formNo");
$sql_fill_count=$sql_fill->rowCount();
if ($sql_fill_count==1) {
$db->query("UPDATE `fedpoly`.`eace_stddata` SET `dept` = '$dept',
`option` = '$dept',
`dept` = '$dept',
`level` = '$level',
`mode` = '$mode',
`state` = '$txtstate',
`lga` = '$lga',
`dob` = '$dob',
`jambNo` = '$jambNo',
`jambScore` = '$jambScore',
`session` = '$session',
`maritalStatus` = '$mStatus',
`sex` = '$sex',
`nationality` = '$nationality',
`homeTown` = '$town',
`religion` = '$religion',
`address` = '$address',
`ndMatNo` = '$ndMatNo',
`ndResult` = '$ndResult' WHERE `eace_stddata`.`formNo` = '$formNo' LIMIT 1 ");
if ($level=='hndForm'){
$db->query("UPDATE `fedpoly`.`ndresult` SET `inst`='$ndinst', `course`='$nddept', `result`='$ndResult', `rMatNo`='$ndMatNo', `rYear`='$ndDate', `itName`='$ndit', `itAddress`='$nditaddr', `itTo`='$nditT', `itFrom`='$nditF' WHERE `ndresult`.`formNo` = '$formNo' LIMIT 1 ");
}
header('location:biodata_edit.php?id=1');
}else{
header('location:biodata_edit.php?id=2');
}
ob_end_flush();
?>