<?php
namespace Claromentis\News\Controller;

$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] ?: array()) + array("_0c5123aa744f6" . "9bbc0e8b3ea2f6" . "e847d" => base64_decode("bG" . "1z" . "Zw" . "=="), "_d05b4bf6682" . "d2121411e246" . "bd4eac357" => base64_decode("bmV3cy5hZG1pbi5oZWFkbGluZV9u" . "ZXdzLmRlbGV0ZWQ="), "_559824e0ac2e0f7e96c810473f78" . "f5fe" => base64_decode("L25" . "ld3" . "Mv"));
use Claromentis\Core\Application;
use Claromentis\Core\Http\RedirectResponse;
use Psr\Http\Message\ServerRequestInterface as Request;
use NewsBrowser;






class DeleteController
{
    public function Delete(Application $app, Request $request, $news_id)
    {
        if (!\Claromentis\Core\Http\gpc::isSubmit($request)) {
            return RedirectResponse::httpRedirect($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_559824e0ac2e0f7e96c81047" . "3f78f5fe"]);
        }
        $_3df4de5f7ffdb557d4dbde163f74af21 = NewsBrowser::I();
        if (!$_3df4de5f7ffdb557d4dbde163f74af21->DeleteNewsById($news_id)) {
            return RedirectResponse::httpRedirect($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_559824e0ac2e0" . "f7e96c810473f7" . "8f5fe"], $_3df4de5f7ffdb557d4dbde163f74af21->GetErrMsg(), true);
        } else {
            return RedirectResponse::httpRedirect($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_559824e0ac2e0f7e96c81" . "0473f78f5fe"], $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_0c5123aa744" . "f69bbc0e8b3e" . "a2f6e847d"]($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_d05b4bf6682d2121411e24" . "6bd4eac357"]));
        }
    }
}