$auto_dec = TRUE; } else { $auto_inc = TRUE; } } } if (Request::submitted('delete_request') || Request::quoted('approveDelete')) { if(!Request::quoted('approveDelete')){ $approval=array('approveDelete' => TRUE); echo createQuestion(_("Wollen Sie diese Raumanfrage wirklich löschen?"), $approval); } if(Request::quoted('approveDelete')){ require_once ($RELATIVE_PATH_RESOURCES."/lib/RoomRequest.class.php"); $reqObj = new RoomRequest($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["request_id"]);//Request::quoted('request_id')); unset($_SESSION['resources_data']["requests_open"][$reqObj->getId()]); $reqObj->delete(); $_SESSION['resources_data']['requests_working_pos'] = 0; $_SESSION['resources_data']['requests_working_on'] = array_values($_SESSION['resources_data']['requests_working_on']); unset($_REQUEST['approveDelete']); if (sizeof($_SESSION['resources_data']["requests_open"]) == 0) { $_SESSION['resources_data']["view"] = "requests_start"; $view = "requests_start"; } else { if ($_SESSION['resources_data']["requests_working_pos"] == sizeof($_SESSION['resources_data']["requests_working_on"])-1) { $auto_dec = TRUE; } else { $auto_inc = TRUE; } }