* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ require_once "Libs/autoload.php"; $config = new Config(); $webPage = new PJSWebPage($config->getTitle() . ' - Delete Job'); $act = Tools::Param('act'); if ("Delete Job" === $act) { $jobModel = new JobModel(); $jobModel->populateFromForm(); if (!$jobModel->validateForDelete()) { $jobView = new JobFormView('Delete Job', $jobModel); $body = "<h2>Invalid data</h2>\n" . $jobView->getForm(); } else { $jobController = new JobController(); $jobController->delete($jobModel); $body = "Deleted job # " . $jobModel->getId() . "<br />\n"; } } else { $jobController = new JobController(); $jobModel = $jobController->get(Tools::param('id')); $jobView = new JobFormView('Delete Job', $jobModel); $body = $jobView->getForm(); } $webPage->setBody($body); $webPage->displayPage();
echo ApplicationControllerAJAX::deleteCustom(); }); Router::register('employers/searchcustom', function () { echo ApplicationControllerAJAX::searchCustom(); }); Router::register('employers/editapplication', function (array $restOfRoute) { Controller::displayMetatags('/employers'); ApplicationController::edit($restOfRoute); }); Router::register('employers/editcompany', function () { Controller::displayMetatags('/employers'); GLOBALvarGet('CCompany')->edit(); }); Router::register('employers/deletejob', function (array $restOfRoute) { Controller::displayMetatags('/employers'); JobController::delete($restOfRoute); }); Router::register('employers/editjob', function () { Controller::displayMetatags('/employers'); GLOBALvarGet('CJob')->edit(); }); Router::register('employers/editprofile', function () { Controller::displayMetatags('/employers'); GLOBALvarGet('CRecruiter')->edit(); }); Router::register('employers/forgotpass', function () { Controller::displayMetatags('/employers'); GLOBALvarGet('CRecruiter')->forgotPass(); }); Router::register('employers/home', function () { Controller::displayMetatags('/employers');