<?php
namespace Claromentis\News\Controller;

$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] ?: array()) + array("_0c5123aa744f69bbc0e8b3ea2" . "f6e847d" => base64_decode("bG1zZw" . "=="), "_559824e0ac2e0f7e96c810473f78f" . "5fe" => base64_decode("L2" . "5l" . "d3" . "Mv"), "_d05b4bf6682d2121411e2" . "46bd4eac357" => base64_decode("bmV3cy5hZG1p" . "bi5oZWFkbGlu" . "ZV9uZXdzLmRl" . "bGV0ZWQ="));
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["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_559824e0ac2" . "e0f7e96c8104" . "73f78f5fe"]);
        }
        $_3df4de5f7ffdb557d4dbde163f74af21 = NewsBrowser::I();
        if (!$_3df4de5f7ffdb557d4dbde163f74af21->DeleteNewsById($news_id)) {
            return RedirectResponse::httpRedirect($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_559824e0ac2e0f7e96" . "c810473f78f5fe"], $_3df4de5f7ffdb557d4dbde163f74af21->GetErrMsg(), true);
        } else {
            return RedirectResponse::httpRedirect($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_559824e0ac2e0f7e96c" . "810473f78f5fe"], $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_0c5123aa744f6" . "9bbc0e8b3ea2f6" . "e847d"]($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_d05b4bf6682d2121411e246b" . "d4eac357"]));
        }
    }
}