| 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
ob_start();
include('headMain.php');
require_once('closedSemester.php');
require_once('check_payment_Consultant.php');
//die();
/*
require_once('../connect.php');
$db=db_connect();
if(!isset($_SESSION['matNo'])){
header('location:'.'login.php');
}
$matNo=$_SESSION['matNo'];
$semester=$_SESSION['asemester'];
$asession=$_SESSION['asession'];
$s="select * from remitaorder where regNo='$matNo'and paymenttype='School Fees' and transApproved='True'";
$r=$db->query($s);
$n=$r->rowCount();
if ($n==0){
header('location:'.'remitaschoolfee.php');
}
*/
$sql_current=$db->query("select * from current");
$sql_current_fetch=$sql_current->fetch(PDO::FETCH_BOTH);
$num_current=$sql_current->rowCount();
if ($num_current>0){
// $semester=$_SESSION['asemester']=$sql_current_fetch['asemester'];
$asession=$_SESSION['asession']=$sql_current_fetch['asession'];
}
//require_once('check_payment2.php');
require_once('check_payment_Consultant.php');
?>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="../js/jquery-1.7.1.js"></script>
<script type="text/javascript" language="javascript" src="../js/scriptFile.js"></script>
<table width="100%" align="center" cellpadding="3" cellspacing="5">
<tr>
<td><fieldset>
<legend>
<h2></h2></legend>
<div class="row">
<div class="col-lg-.5"></div>
<div class="col-lg-11">
<div class="panel panel-default">
<div class="panel-heading panel-title">
O'Level Update(<?php echo $_SESSION['matNo'] ;?>)
</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-12">
<form id="form1" role="form" name="form1" method="post" action="olevelupdate_process.php">
<table width="100%" cellspacing="5" cellpadding="3">
<?php
$matNo=$_SESSION['matNo'];
$sql="select * from realdata where matNo='$matNo'";
$result=$db->query($sql);
$result_fetch=$result->fetch(PDO::FETCH_BOTH);
$num=$result->rowCount();
if ($num>0){
$name=$result_fetch['names'];
$formNo=$result_fetch['formNo'];
$name=$result_fetch['names'];
$dept=$result_fetch['course'];
$level=$result_fetch['levelID'];
$mode=$result_fetch['mode'];
$state=$result_fetch['state'];
$lga=$result_fetch['lga'];
$dob=$result_fetch['dob'];
$gsm=$result_fetch['gsm'];
$sex=$result_fetch['sex'];
$address=$result_fetch['address'];
$email=$result_fetch['email'];
$_SESSION['deptID']=0;
$res=$db->query("select * from dept where dOption='$dept'");
$res_fetch=$res->fetch(PDO::FETCH_BOTH);
$n=$res->rowCount();
if ($n>0){
$deptID=$_SESSION['deptID']=$res_fetch['sn'];
}
// Checking Status
$checkFresher="select * from admitted where formNo='$formNo'";
$resultFresher=$db->query($checkFresher);
$resultFresher_fetch=$resultFresher->fetch(PDO::FETCH_BOTH);
$numFresher=$resultFresher->rowCount();
if ($numFresher>0){
$remark=$resultFresher_fetch['status'];
}else{
//=========================================================
// $checkRemark="select * from rawcgpa where matNo='$matNo' and `remark` LIKE '%REPE%'";
// $resultRemark=$db->query($checkRemark);
// $numRemark=$resultRemark->rowCount();
// if ($numRemark>0){
// $remark='Repeater';
// $_SESSION['repeater']=$remark;
// }else{
$remark='Normal';
// }
}
// die();
if ( $_SESSION['ndStatus']==1){
$remark="Ex-Student";
}
// SELECT * FROM `stdstatus`
//End status
// echo $_SESSION['ndStatus'];
$checkAmount="select * from schoolfee where dept='$deptID' and level='$level' and status='$remark' and asession='$asession'" ;
$resultAmount=$db->query($checkAmount);
$resultAmount_fetch=$resultAmount->fetch(PDO::FETCH_BOTH);
$numAmount=$resultAmount->rowCount();
if ($numAmount>0){
// $amount= $resultAmount_fetch['amount']-$resultAmount_fetch['amount']/100*5;
$amount= $resultAmount_fetch['amount'];
}
}
?>
<tr><?php
if (isset($_GET['id'])){
if ($_GET['id']==1){
echo '<td colspan="5" class="alert alert-success" align="center" ><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>O\'Level Updated Successfully';
}elseif($_GET['id']==2){
echo ' <td colspan="5" class="alert alert-danger" align="center" ><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>O\'Level Inserted Successfully';
}elseif($_GET['id']==3){
echo ' <td colspan="5" class="alert alert-danger" align="center" ><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>Fill All Required Fields';
}
}
?>
</strong></td>
</tr>
<tr><td> </td></tr>
<tr>
<td><strong>Form Number</strong></td>
<td> </td>
<td class="form-control alert-warning"><?php echo $formNo; ?>.</td>
<td colspan="2" id="load" rowspan="3" align="right"><img src="../passport/Reg<?php echo $matNo;?>.jpg" width="115" height="125" /></td>
</tr>
<tr>
<td><strong>Matric Number</strong></td>
<td> </td>
<td class="form-control alert-warning"><?php echo $matNo; ?></td>
</tr>
<tr>
<td><strong>Name</strong></td>
<td> </td>
<td class="form-control alert-warning"><?php echo $name; ?></td>
<td> </td>
</tr>
<tr>
<td colspan="4">
<div class="col-lg-10"><table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td>Exam Type</td>
<td colspan="2"><select name="eType1" id="eType1" class="form-control">
<option>WAEC</option>
<option>NECO</option>
<option>NABTEB</option>
<option selected="selected">Select Type</option>
</select></td>
<td><label for="eType1"></label>
<?php
// begining of result 2$sAmt
$sAmtount=$_SESSION['amtPaidSF'];
$fresherConfirm=$db->query("select * from realdata where matNo='$matNo' and (fresher='10' or fresher='100') and levelID not in ('0')");
$fresherNum=$fresherConfirm->rowCount();
// die($fresherNum);
// $fresherNum=1;
if ($fresherNum>0){
//$result2=mysql_query("select * from remitaorder where (regNo='$formNo' or regNo='$matNo') and paymenttype='School Fees' and transApproved='True'");
$result2=$db->query("select sum(amtPaid) as amtPaid from remitaorder where `regNo`='$matNo' and transApproved='True' and (paymentType='School Fees' or paymentType='Additional School Fees')");
$result2_fetch=$result2->fetch(PDO::FETCH_BOTH);
$payNum=$result2->rowCount();
if ($payNum>0){
$amtPaidADD=$result2_fetch['amtPaid'];
$amtPaid=$_SESSION['amtPaidSF0']+$amtPaidADD;
// echo $amount;
$olevelAmt=$amtPaid-$amount;
// echo $_SESSION['ndStatus'];
// die();
// if ($matNo=='TM20240110963'){
// echo $payNum=$result2->rowCount();
// die();
// }
if ($matNo=='CR202401115271'){
echo 'Amount Paid-'.$amtPaid;
echo 'Amount Paid-'.$_SESSION['amtPaidSF0'];
echo '<br>Amount supposed-'.$amount.'<br>';
echo $olevelAmt=$amtPaid-$amount .'<br>';
echo $resultAmount_fetch['amount'].'1<br>';
echo $resultAmount_fetch['amount']/100*5;
die();
}
if ($olevelAmt>=2499){
$statusResult='True';
}else{
$statusResult='False';
}
}else{
$statusResult='False';
}
}else{
$statusResult='True';
}
//echo $statusResult;
// $statusResult='True';
//echo $olevelAmt.'kljdkan';
?></td>
<td> </td>
</tr>
<tr>
<td>Exam Date</td>
<td>
<table width="100%"><tr>
<td>Month</td>
<td>
<select class="form-control" name="month1" id="select43">
<?php
for ($i=1;$i<=12;++$i){ echo '<option>'.$i.'</option>';}
?>
</select></td>
<td>Year</td>
<td>
<select class="form-control" name="year1" id="select44">
<?php
$d_end=date('Y');
for ($i=1994;$i<=$d_end;++$i){ echo '<option>'.$i.'</option>';}
?>
</select></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Exam Number</td>
<td><label for="examNo3"></label>
<input type="text" class="form-control" name="examNo1" id="examNo3" required="required" /></td>
</tr>
<tr>
<td colspan="2" valign="top"><table width="100%" cellspacing="5" cellpadding="3">
<?php for($h=0;$h<9;++$h){ ?>
<tr>
<td><?php echo $h+1; ?></td>
<td><label for="sub1a4"></label>
<select class="form-control" name="<?php echo 'sub1['.$h.']'; ?>" id="sub">
<option class="form-control" selected="selected" value="0">Select Subject</option>
<?php
//require_once('../connect.php');
$sql="select * from olevelcourses order by subject";
$result=$db->query($sql);
//$result_fetch=$result->fetch(PDO::FETCH_BOTH);
$num=$result->rowCount();
while($row=$result->fetch(PDO::FETCH_BOTH)){
?>
<option value="<?php echo $row['subject'];?>">
<?php echo $row['subject'];?>
</option>
<?php
// $i++;
}
?>
</select></td>
<td><label for="resa[1]4"></label>
<select class="form-control" name="<?php echo 'res1['.$h.']'; ?>" id="res">
<option value="A1">A1</option>
<option value="B2">B2</option>
<option value="B3">B3</option>
<option value="C4">C4</option>
<option value="C5">C5</option>
<option value="C6">C6</option>
<option value="D7">D7</option>
<option value="E8">E8</option>
<option value="F9">F9</option>
<option selected="selected" value="0"> </option>
</select></td>
</tr>
<?php
}
?>
</table></td>
</tr>
</table></td>
<td>
<?php
if (($statusResult=='True') or ($matNo=='HB20230106713')) {
//echo $olevelAmt;
?>
<div class="col-lg-10"> <table width="100%" cellspacing="5"
cellpadding="3">
<tr>
<td>Exam Type</td>
<td colspan="4"><select
class="form-control"
name="eType2" id="eType2">
<option>WAEC</option>
<option>NECO
</option6>
</option>
<option>NABTEB</option>
<option selected="selected">
Select Type
</option>
</select></td>
</tr>
<tr>
<td>Exam Date</td>
<td>Month
<label for="month4"></label></td>
<td><select class="form-control"
name="month2" id="select43">
<?php
for ($i = 1; $i <= 12; ++$i) {
echo '<option>' . $i . '</option>';
}?>
</select></td>
<td>Year
<label for="year3"></label></td>
<td><select class="form-control"
name="year2" id="select44">
<?php
for ($i = 1994; $i <= $d_end; ++$i) {
echo '<option>' . $i . '</option>';
}?>
</select></td>
</tr>
<tr>
<td>Exam Number</td>
<td colspan="4"><input
class="form-control" type="text"
name="examNo2" id="examNo"/>
</td>
</tr>
<tr>
<td colspan="5" valign="top">
<table width="100%" cellspacing="5"
cellpadding="3">
<?php for ($h = 0; $h < 9; ++$h) { ?>
<tr>
<td><?php echo $h + 1; ?></td>
<td><label
for="sub1a3"></label>
<select
class="form-control"
name="<?php echo 'sub2[' . $h . ']'; ?>"
id="<?php echo 'sub2[' . $h . ']'; ?>">
<option
selected="selected"
value="0">
Select
Subject
</option>
<?php
//require_once('../connect.php');
$sql = "select * from olevelcourses order by subject";
$result = $db->query($sql);
// $result_fetch = $result->fetch(PDO::FETCH_BOTH);
$num = $result->rowCount();
while ($row = $result->fetch(PDO::FETCH_BOTH)) {
?>
<option
value="<?php echo $row['subject'];?>">
<?php echo $row['subject'];?>
</option>
<?php
// $i++;
}
?>
</select></td>
<td><label
for="resa[1]3"></label>
<select
class="form-control"
name="<?php echo 'res2[' . $h . ']'; ?>2"
id="<?php echo 'res2[' . $h . ']'; ?>">
<option
value="A1">
A1
</option>
<option
value="B2">
B2
</option>
<option
value="B3">
B3
</option>
<option
value="C4">
C4
</option>
<option
value="C5">
C5
</option>
<option
value="C6">
C6
</option>
<option
value="D7">
D7
</option>
<option
value="E8">
E8
</option>
<option
value="F9">
F9
</option>
<option
selected="selected"
value="0"></option>
</select></td>
</tr>
<?php
}
}
?>
</table></td>
</tr>
</table></td>
</tr><tr>
<td> </td>
<td> </td>
<td> </td>
<td colspan="2"><input type="submit" class="btn btn-primary btn-block" name="button" id="button" value="Update" /></td>
</tr>
<tr>
<td colspan="4"><fieldset>
<legend>Results</legend>
<table width="100%" cellspacing="5" cellpadding="3">
<?php
$sql3="select * from olevel where formNo='$matNo'";
$result3=$db->query($sql3);
$result3_fetch=$result3->fetch(PDO::FETCH_BOTH);
$num3=$result3->rowCount();
if ($num3>0){
$k=$result3_fetch['olevel1'];
$olevel=explode(',',$k);
$count=count($olevel);
$k2=$result3_fetch['olevel2'];
$olevel2=explode(',',$k2);
$count2=count($olevel2);
//echo mysql_result($result3,0,'olevel1')
?>
<tr>
<td valign="top"><table width="97%" height="20" cellpadding="3" cellspacing="5">
<tr>
<td><?php
echo '<b>Exam Type: </b>'.$result3_fetch['eType1'].'<br>';
echo '<b>Exam Number: </b>'.$result3_fetch['examNo1'].'<br>';
echo '<b>Exam Year: </b>'.$result3_fetch['eYear1'].'<br>';
echo '<hr>';
?></td>
</tr>
<tr>
<td><?php
for ($a=0;$a<$count;++$a){
echo $olevel[$a].'<br>';
}
?></td>
</tr>
</table></td>
<td valign="top"><table width="100%" cellspacing="5" cellpadding="3">
<tr>
<td><?php
if ($result3_fetch['examNo2']!=''){
echo '<b>Exam Type: </b>'.$result3_fetch['eType2'].'<br>';
echo '<b>Exam Number: </b>'.$result3_fetch['examNo2'].'<br>';
echo '<b>Exam Year: </b>'.$result3_fetch['eYear2'].'<br>';
echo '<hr>';
}
?></td>
</tr>
<tr>
<td><?php
if ($result3_fetch['examNo2']!=''){
for ($a=0;$a<$count2;++$a){
echo $olevel2[$a].'<br>';
}
}
} ?></td>
</tr>
</table></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</td>
</tr>
</table>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "email", {useCharacterMasking:true, validateOn:["blur"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "phone_number", {format:"phone_custom", pattern:"0000-000-0000", useCharacterMasking:true, validateOn:["blur"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "date", {useCharacterMasking:true, format:"dd/mm/yyyy", validateOn:["blur"]});
</script>
<script type="text/javascript">
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "phone_number", {format:"phone_custom", pattern:"0000-000-0000", useCharacterMasking:true, validateOn:["blur"]});
</script>
<div class="col-lg-.5"></div>
<?php
include('footMain.php');
ob_end_flush();
?>