コード例 #1
0
     $searchBy = isset($_REQUEST['searchBy']) ? $_REQUEST['searchBy'] : "employee";
     $sortBy = isset($_REQUEST['sortField']) ? $_REQUEST['sortField'] : null;
     $sortOrder = null;
     if ($sortBy != null) {
         $sortParam = "sortOrder" . $sortBy;
         if (isset($_REQUEST[$sortParam])) {
             $sortOrder = $_REQUEST[$sortParam];
         }
     }
     if (isset($_REQUEST['pageNO'])) {
         $pageNO = $_REQUEST['pageNO'];
     } else {
         $pageNO = 1;
     }
     $leaveController->setId($id);
     $leaveController->setLeaveTypeId($leaveTypeId);
     $leaveController->viewLeaves("summary", $year, $searchBy, $sortBy, $sortOrder, $pageNO);
     break;
 case 'Leave_Edit_Summary':
     $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : $_SESSION['empID'];
     $year = isset($_REQUEST['year']) ? $_REQUEST['year'] : date('Y');
     $leaveTypeId = isset($_REQUEST['leaveTypeId']) ? $_REQUEST['leaveTypeId'] : LeaveQuota::LEAVEQUOTA_CRITERIA_ALL;
     $searchBy = isset($_REQUEST['searchBy']) ? $_REQUEST['searchBy'] : "employee";
     $sortBy = isset($_REQUEST['sortField']) ? $_REQUEST['sortField'] : null;
     $sortOrder = null;
     if ($sortBy != null) {
         $sortParam = "sortOrder" . $sortBy;
         if (isset($_REQUEST[$sortParam])) {
             $sortOrder = $_REQUEST[$sortParam];
         }
     }