sendRejectFormHtml(); exit; } protected function _doRejectFile() { exit; } protected function _doRejectFileAjax() { $fileId = Qs_Request::getGetValue('fileId'); $comment = Qs_Request::getPostValue('comment'); if (empty($fileId)) { header('400 Bad Request'); exit('Bad Request'); } if (false == ($this->_getDataObj()->rejectUserReport($fileId, $comment))) { header('500 Internal Server Error'); exit; } $helper = new App_Report_Reject_Helper($this, $this->_getDataObj()); $helper->sendNotification($fileId); $row = $this->_getDataObj()->getReportFileRow($fileId); $html = $this->_renderListRow(array('schoolId' => $row['schoolId'])); $this->_displayJson(array('html' => $html)); exit; } protected function _doForceStatus() { header('400 Bad Request'); exit; } protected function _doForceStatusAjax() { $reportId = Qs_Request::getPostValue('reportId'); $schoolId = Qs_Request::getPostValue('schoolId'); $statusId = Qs_Request::getPostValue('statusId'); $allowedStatuses = App_Report_AdminObj::getForceStatusPairs(); if (empty($reportId) || empty($schoolId) || ($statusId && !array_key_exists($statusId, $allowedStatuses))) { header('400 Bad Request'); exit; } if (false == ($this->_getDataObj()->forceReportStatus($reportId, $schoolId, $statusId))) { header('500 Internal Server Error'); exit; } $html = $this->_renderListRow(array('schoolId' => $schoolId, 'reportId' => $reportId)); $this->_displayJson(array('html' => $html)); } /** * Delete user report */ protected function _doDeleteFile() { if (($reportId = Qs_Request::getGetValue('id')) && ($fileId = Qs_Request::getGetValue('fileId'))) { $this->_getDataObj()->deleteUserReport($reportId, $fileId); } $this->_doBack(); } abstract protected function _renderListRow(array $filter); }