$_SESSION['hp-userType'] = 'ESS'; } break; case 'hr': $_SESSION['hp-module'] = 'PIM'; $_SESSION['hp-action'] = isset($_POST['pane']) ? $_POST['pane'] : ''; break; case 'leave': $_SESSION['hp-module'] = 'Leave'; $_SESSION['hp-action'] = $_GET['action']; break; } /* Help page session variables: End */ switch ($moduletype) { case 'admin': $locRights = $rights->getRights($_SESSION['userGroup'], Admin); break; case 'hr': $locRights = $rights->getRights($_SESSION['userGroup'], PIM); break; case 'rep': $locRights = $rights->getRights($_SESSION['userGroup'], REP); break; case 'leave': $locRights = $rights->getRights($_SESSION['userGroup'], LEAVE); break; case 'timeMod': $locRights = $rights->getRights($_SESSION['userGroup'], TIMEMOD); break; case 'benefits': include ROOT_PATH . '/lib/controllers/Benefits.inc.php';
require_once ROOT_PATH . '/lib/models/maintenance/UserGroups.php'; require_once ROOT_PATH . '/lib/common/CommonFunctions.php'; require_once ROOT_PATH . '/lib/common/Config.php'; $_SESSION['path'] = ROOT_PATH; /* For checking TimesheetPeriodStartDaySet status : Begins */ if (Config::getTimePeriodSet()) { $_SESSION['timePeriodSet'] = 'Yes'; } else { $_SESSION['timePeriodSet'] = 'No'; } /* For checking TimesheetPeriodStartDaySet status : Ends */ if ($_SESSION['isAdmin'] == 'Yes') { $rights = new Rights(); // $arrRights=array('add'=> true , 'edit'=> true, 'delete'=> true, 'view'=> true); foreach ($arrAllRights as $moduleCode => $currRights) { $arrAllRights[$moduleCode] = $rights->getRights($_SESSION['userGroup'], $moduleCode); } $ugroup = new UserGroups(); $ugDet = $ugroup->filterUserGroups($_SESSION['userGroup']); $arrRights['repDef'] = $ugDet[0][2] == '1' ? true : false; } else { /* Assign supervisors edit and view rights to the PIM * They have PIM rights over their subordinates, but they cannot add/delete * employees. But they have add/delete rights in the employee details page. */ if ($_SESSION['isSupervisor']) { $arrAllRights[PIM] = array('add' => false, 'edit' => true, 'delete' => false, 'view' => true); } /* * Assign Manager's access to recruitment module */