is_loggedin()) { $user->redirect('login.php'); } else { $user_id = $_SESSION['user_session']; $user->getUserLoggedIn($user_id); $site_id=1; $user->checkDriversLicenseExpiry(); $user->checkVehicleInsuranceExpiry(); $user->checkVehicleFitnessExpiry(); $user->checkVehicleLicensceExpiry(); $user->checkBorrowedVehicleExpiry(); $user->SiteConfig($site_id); $user_logged_in=$user->userid; //echo $_SESSION['user_full_name']; ?> prepare("SELECT ems_leave_application.leave_applicationid, ems_leave_application.employeeid, ems_leave_application.leave_typeid, ems_leave_application.application_date, ems_leave_application.start_date, ems_leave_application.days_applied, ems_leave_application.days_approved, ems_leave_application.leave_pay, ems_leave_application.travel_perm, ems_leave_application.travel_address, ems_leave_application.travel_phone, ems_leave_application.arrangements, ems_leave_application.supervisorid, ems_leave_application.supervisor_approval_statusid, ems_leave_application.supervisor_approval_date, ems_leave_application.hr_approval_statusid, ems_leave_application.supervisor_remarks, ems_leave_application.hr_approval_date, ems_leave_application.created FROM ems_leave_application WHERE ems_leave_application.hr_approval_statusid = :hrpapp AND ems_leave_application.supervisor_approval_statusid = :supapp AND ems_leave_application.leave_typeid IN(1,2,4,5,6,7,8,9,11,12)"); $toApprove->bindParam(':supapp',$sup_app_status); $toApprove->bindParam(':hrpapp',$hr_app_status); $toApprove->execute(); $toApprove->setFetchMode(PDO::FETCH_ASSOC); $rowtoApp = $toApprove->fetch(); $counttoApp = $toApprove->rowCount(); // echo $rowtoApp['supervisorid']; ?> query($sql4); $stmt4->setFetchMode(PDO::FETCH_ASSOC); $emp_all = $stmt4->fetch(); $total_emp=$emp_all["count_emp"]; // get Total Number of in-active employees $sql9 = "SELECT count(ems_employee.employeeid) AS count_emp FROM ems_employee WHERE ems_employee.employee_statusid<>1"; $stmt9= $DB_con->query($sql9); $stmt9->setFetchMode(PDO::FETCH_ASSOC); $emp_all_inactive = $stmt9->fetch(); $total_emp_inactive=$emp_all_inactive["count_emp"]; // Get Employee Count $sql = 'SELECT * FROM view_employee_count_by_division'; $stmt = $DB_con->query($sql); $resultBar = $stmt->fetchAll(); //Get retirement $sql = "SELECT * FROM view_retirement_by_year Where RET_YEAR<=$five_year AND RET_YEAR>=$this_year"; $stmt = $DB_con->query($sql); $resultLine = $stmt->fetchAll(); //Get Travelling Officers $sql2 = "SELECT * FROM view_count_travelling_officers"; $stmt2 = $DB_con->query($sql2); $stmt2->setFetchMode(PDO::FETCH_ASSOC); $travelling = $stmt2->fetch(); $trav=$travelling["trav_count"]; //Get Online Leave Applications $sql2 = "SELECT * FROM view_count_travelling_officers"; $stmt2 = $DB_con->query($sql2); $stmt2->setFetchMode(PDO::FETCH_ASSOC); $travelling = $stmt2->fetch(); $trav=$travelling["trav_count"]; //Get Birthday Club $sqlBirthdays = "SELECT COUNT(*) AS birthday_count FROM ems_employee WHERE DATE_FORMAT(date_of_birth, '%m-%d') = DATE_FORMAT(CURDATE(), '%m-%d') AND employee_statusid = 1; "; $sqlBirthdays = $DB_con->query($sqlBirthdays); $sqlBirthdays->setFetchMode(PDO::FETCH_ASSOC); $Birthdays = $sqlBirthdays->fetch(); $bdayToday=$Birthdays["birthday_count"]; // get Number of employees on leave $sql3 = "SELECT count(ems_leave_transaction.employeeid) as emp_on_leave FROM ems_leave_transaction WHERE ems_leave_transaction.resume_date>curdate()"; $stmt3= $DB_con->query($sql3); $stmt3->setFetchMode(PDO::FETCH_ASSOC); $emp_leave = $stmt3->fetch(); $leave_emp=$emp_leave["emp_on_leave"]; // get sex $row=$DB_con->prepare ("SELECT count(ems_employee.employeeid) AS count_emp, ems_sex.sex FROM ems_employee INNER JOIN ems_sex ON ems_employee.sexid = ems_sex.sexid WHERE ems_employee.employee_statusid=1 GROUP BY ems_sex.sex"); $row->execute(); $json_data=array(); foreach($row as $rec) { $json_array['label']=$rec['sex']; $json_array['value']=$rec['count_emp']; array_push($json_data,$json_array); } // get education $sql_ed = 'SELECT count(ems_education.educationid) AS emp_count, ems_qualification.qualification_obtained FROM ems_education INNER JOIN ems_qualification ON ems_education.qualificationid = ems_qualification.qualificationid WHERE ems_qualification.qualificationid=4 OR ems_qualification.qualificationid=1 OR ems_qualification.qualificationid=2 OR ems_qualification.qualificationid=8 OR ems_qualification.qualificationid=13 OR ems_qualification.qualificationid=28 GROUP BY ems_qualification.qualification_obtained'; $stmt = $DB_con->query($sql_ed); $resultEd = $stmt->fetchAll(); ?> <?php echo $user->siteName;?> prepare($sql); $q->execute(array($change_code_yn, $passhash ,$user_logged_in)); $notice="Your Password has been sucessfully changed"; } ?>
  !
changePass==1) {//echo $user->changePass; ?>
You must change your password: You will not be able to login again using the Code :
=1){ ?>
Employee Search

All Employees

Employeeid Firstname Lastname ID No. Location
Employee Distribution

by Department

See Reports
Employees Retirement

Count by Year

See Reports
Gender Distribution

Mouseover to view

Employee Education

Summary

Employee CUG List

Firstname Lastname CUG Number