| Server IP : 172.64.80.1 / Your IP : 172.70.50.62 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/eClass/ |
Upload File : |
<?php
ob_start();
session_start();
/**
* Created by PhpStorm.
* User: adisa
* Date: 2/19/2016
* Time: 11:31 PM
*/
require_once('../connect.php');
//require_once(../connect)
$db=db_connect();
extract($_POST);
$aa=$db->query("select * from dept where sn='$dept'");
if ($aa->rowCount()==1){
$dept_fetch=$aa->fetch(PDO::FETCH_BOTH);
$deptName=$dept_fetch['dOption'];
}
$aspoa="select * from coursepool where school='$txtschools' and levelID='$level' and dept='$deptName' and courseCode='$course' and semester='$semester'";
//die();
$aspoa_exe=$db->query($aspoa);
$aspoa_count=$aspoa_exe->rowCount();
if ($aspoa_count==1) {
$as_fetch = $aspoa_exe->fetch(PDO::FETCH_BOTH);
$sn = $as_fetch['sn'];
$staffID_check = $as_fetch['staffID'];
if ($staffID_check == '') {
$staffID = $_SESSION['staffID'];
$sql = "UPDATE coursepool SET staffID='$staffID' where sn='$sn'";
//die();
$result = $db->query($sql);
$num = $result->rowCount();
$result_fetch = $result->fetch(PDO::FETCH_BOTH);
header('location:' . 'staff_assign_courses.php?id=2');
} else {
header('location:' . 'staff_assign_courses.php?id=5');
}
}else{
header('location:' . 'staff_assign_courses.php?id=1');
}
ob_end_flush();
?>