| Server IP : 172.64.80.1 / Your IP : 172.71.120.136 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_main/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: adisa
* Date: 3/2/2016
* Time: 3:18 PM
*/
include('headMain_ord.php');
?>
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="../js/jquery-1.7.1.js"></script>
<script type="text/javascript" language="javascript" src="../js/scriptFileLong.js"></script>
<div class="row">
<div class="col-lg-1"></div>
<div class="col-lg-8">
<div class="panel panel-default">
<div class="panel-heading">
Uploading Biometric Enrolled List
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-12">
<?php
if(isset($_POST["submit"])) {
$file = $_FILES['file']['tmp_name'];
$handle = fopen($file, "r");
$c = 0;
$counter=0;
// $db->query("DELETE from jambrelease where id>0");
while (($filesop = fgetcsv($handle, 100000000, ",")) !== false) {
$Biometric_Enrollment_Id=$filesop[0];
$Matric_No = $filesop[1];
$Date_Enrolled = $filesop[2];
if ($Biometric_Enrollment_Id<>'Biometric_Enrollment_Id'){
$check_data = $db->query("select * from biometric_enrollment where Matric_No='$Matric_No'");
$check_num = $check_data->rowCount();
$dataNow = $check_data->fetch(PDO::FETCH_BOTH);
if ($check_num > 0) {
echo 'Already Exist=> Matric No: ' . $Matric_No . '=>Date Enrolled: ' . $Date_Enrolled . '<br>';
echo 'Present Record=> Matric No: ' . $dataNow['Matric_No'] . '=>Date Enrolled: ' . $dataNow['Date_Enrolled'] . '<br>';
} else {
//$sql=$db->query("INSERT INTO `fedpoly`.`jambregu` (`sn`, `matNo`, `names`, `dateSent`) VALUES (NULL, '$matNo', '$names', 'datestamp')");
// $sql = mysql_query("INSERT INTO `fedpoly`.`admitted` (`sn`, `formNo`, `jambNo`, `names`, `course`, `levelID`, `mode`, `state`, `lga`, `address`, `dob`, `email`, `gsm`, `sex`, `batch`, `acceptance`, `datepay`) VALUES (NULL, '$formNo', '$jambNo', '$fullName', '$dept', '$level', '$mode', '0', '0', '0', '0', '0', '0', '0', '4', '0', CURRENT_TIMESTAMP)");
echo $sql_query = "INSERT INTO `biometric_enrollment` (`ID`, `Biometric_Enrollment_Id`, `Matric_No`, `Date_Enrolled`) VALUES (NULL, '$Biometric_Enrollment_Id', '$Matric_No', '$Date_Enrolled')";
$sql = $db->query($sql_query);
//$sql = mysql_query("INSERT INTO `fedpoly`.`nooo` (`formNo`, `course`, `names`) VALUES ('$formNo', '$dept', '$fullName')");
$counter += 1;
// die();
}
}
}
echo $counter;
if ($sql) {
echo $counter. " Record Inserted Successfully";
} else {
echo "Sorry! There is some problem.";
}
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include('footMain.php');
?>