$time) {
// Your Code Here to logout
header("location: logout.php");
session_destroy();
exit();
}
if (isset($_SESSION['compID'])){
$companyID = $_SESSION['compID'];
$uID = $_SESSION['userID'];
echo "";
$_SESSION['time'] = time();
}else{
header("location: logout.php");
}
include_once("./functions/menuScript.php");
include_once("../../cfg/conn.php");
include_once("../../cfg/connasa.php");
include ("./functions/users.php");
date_default_timezone_set('Asia/Singapore');
//$myTimeStamp = date_create() ->format("Y-m-d h:i:sa"); WITH AM/PM note
//$myTimeStamp = date_create() ->format("Y-m-d h:i:s");
$imgF= getEmployeeEmpInformation($uID)[4];
//echo $imgF;
// $imgF="aee_a.png";
// if(isset($_SESSION['userID'])) {
// // echo "Session ID is '" . $_SESSION['userID'];
// //`echo "
Session Name id " . $_SESSION['userID'];
// $uID = $_SESSION['userID'];
// $imgF= $_SESSION['profilePic'];
// } else {
// header("location: index.php");
// }
//CHECK if ACCOUNT STILL ACTIVE
$uPro ="SELECT `account_status` FROM `pms_employee_data` WHERE `id`='$uID'";
$quPro = mysqli_query($conn,$uPro);
while($acc = mysqli_fetch_array($quPro)){
$accStatus = $acc['account_status'];
}
if($accStatus == 0){
header("location: logout.php");
exit();
}
//echo "Value is: " . $_COOKIE['pms_cook'];
$queryUName = "SELECT * FROM `pms_employee_data` WHERE `id`='$uID'";
$result = mysqli_query($conn,$queryUName);
while($row=mysqli_fetch_array($result)){
$uFname = $row['first_name'];
$uLname = $row['last_name'];
$uPosition = $row['position'];
$compID= $row['comp_id'];
}
?>