| Server IP : 172.64.80.1 / Your IP : 172.70.131.125 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_main/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: adisa
* Date: 3/2/2016
* Time: 3:18 PM
*/
include('headMain_2.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-10">
<div class="panel panel-default">
<div class="panel-heading">
Uploading School Fees Schedule
</div>
<div align="right"><a href="javascript:history.go(-1)"> Go to Previous page</a></div
<div class="panel-body">
<div class="row">
<div class="col-lg-12">
<?php
if(isset($_POST["submit"]))
require_once('../connect.php');
$db=db_connect();
extract($_POST);
$insertQuery='false';
//echo $school;
$check=$db->query("select * from dept where feesSchool='$school'");
$result_check=$check->rowCount();
//echo $result_check;
// die();
$i=0;
$t=0;
$t1=0;
while ($row=$check->fetch(PDO::FETCH_BOTH)){
$dept=$row['sn'];
$sql="select * from schoolfee where asession='$asession' and dept='$dept' and level='$levelID' and status='$status'";
$resulta=$db->query($sql);
$num=$resulta->rowCount();
$resulta_fetch=$resulta->fetch(PDO::FETCH_BOTH);
if ($num>0){
$t=$t+1;
$sn=$resulta_fetch['sn'];
$insertQuery=$db->query("UPDATE `fedpoly`.`schoolfee` SET `amount` = '$amount' WHERE `schoolfee`.`sn` ='$sn'");
}else{
$insertQuery=$db->query("INSERT INTO `fedpoly`.`schoolfee` (`sn`, `dept`, `asession`, `amount`, `level`, `status`) VALUES (NULL, '$dept', '$asession', '$amount', '$levelID', '$status')");
$t1=$t1+1;
}
++$i;
}
if($insertQuery){
echo 'Type :'.$school.'<br>';
echo 'Level :'.$levelID.'<br>';
echo 'Status :'.$status.'<br>';
echo 'Session :'.$asession.'<br>';
echo $t1. 'Records Inserted Successfully<br>';
echo $t. 'Records Updated Successfully';
//echo "Fees Setup Successfully";
}else{
echo "Eror while Adding";
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include('footMain.php');
?>