$start_limit = 0; @($page = isset($_GET['page']) ? $_GET['page'] : $_POST['page']); if (!isset($page)) { $page = 1; } if ($page > 1) { $start_limit = $page * ROW_PER_PAGE - ROW_PER_PAGE; } @($action = isset($_GET['action']) ? $_GET['action'] : $_POST['action']); @($id = isset($_GET['id']) ? $_GET['id'] : $_POST['id']); switch ($action) { case "Add": $sMsg1 = $objEmployee->addEmployee($_POST); case "Edit": if ($action == "Edit") { $sMsg1 = $objEmployee->updateEmployee($_POST); } if ($sMsg1 == 1) { $sMsg = $objMessages->addupdatesucessIndication($moduleLabel, $action); $count = $objEmployee->getEmployeeCount(); if ($count > 0) { $employeeList = $objEmployee->getEmployeeList(); } include "layouts/employee.html"; } else { if ($sMsg1 == 0) { $sMsg = $objMessages->errorIndication($moduleLabel, $action); } else { if ($sMsg1 == 2) { $sMsg = $objMessages->duplicateIndication($moduleLabel); }