Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php class AdminController { private $account; private $auth; private $siteDb; public f..

Decoded Output download

<?php 
 class AdminController { private $account; private $auth; private $siteDb; public function __construct() { if (!defined("DB_HOST") || !defined("DB_USER") || !defined("DB_PASS")) { throw new Exception("Database configuration constants are not defined."); } $this->auth = new Auth(DB_HOST, DB_USER, DB_PASS); $database = new Database(); $this->account = $database->dbConnection(DB_HOST, "account", DB_USER, DB_PASS); $this->siteDb = $database->dbConnection('', '', '', '', "yes"); } public function isAdmin($userId) { try { $stmt = $this->account->prepare("SELECT web_admin FROM account WHERE id = :userId"); $stmt->bindParam(":userId", $userId, PDO::PARAM_INT); $stmt->execute(); if ($stmt->rowCount() > 0) { $result = $stmt->fetch(PDO::FETCH_ASSOC); return intval($result["web_admin"]) === 99; } return false; } catch (PDOException $e) { error_log("Error checking admin status: " . $e->getMessage()); return false; } } public function index() { if (!isset($_SESSION["user_id"]) || !$this->isAdmin($_SESSION["user_id"])) { header("Location: /"); die; } $downloadLinks = $this->getDownloadLinks(); ob_start(); require __DIR__ . "/../views/admin_dashboard.php"; return ob_get_clean(); } public function checkAdminStatus() { if (!isset($_SESSION["user_id"])) { return false; } return $this->isAdmin($_SESSION["user_id"]); } public function getDownloadLinks() { try { $stmt = $this->siteDb->prepare("SELECT * FROM downloads ORDER BY type, platform"); $stmt->execute(); $links = array("client" => array("links" => array(), "size" => '', "last_update" => ''), "patcher" => array("links" => array(), "size" => '', "last_update" => '')); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (!empty($row["url"])) { $links[$row["type"]]["links"][$row["platform"]] = $row["url"]; } $links[$row["type"]]["size"] = $row["size"]; $links[$row["type"]]["last_update"] = $row["last_update"]; } return $links; } catch (PDOException $e) { error_log("Error fetching download links: " . $e->getMessage()); return false; } } public function updateDownloadLink($type, $platform, $url, $size, $lastUpdate) { if (!isset($_SESSION["user_id"]) || !$this->isAdmin($_SESSION["user_id"])) { return array("success" => false, "message" => "Unauthorized access"); } try { $stmt = $this->siteDb->prepare("
                UPDATE downloads \xa                SET url = :url, size = :size, last_update = :lastUpdate \xa                WHERE type = :type AND platform = :platform\xa            "); $result = $stmt->execute(array(":url" => $url, ":size" => $size, ":lastUpdate" => $lastUpdate, ":type" => $type, ":platform" => $platform)); if (!$result) { throw new Exception("Failed to update download link"); } return array("success" => true, "message" => "Download link updated successfully"); } catch (PDOException $e) { error_log("Error updating download link: " . $e->getMessage()); throw new Exception("Database error occurred"); } } public function handleDownloadAction($action, $data) { if (!isset($_SESSION["user_id"]) || !$this->isAdmin($_SESSION["user_id"])) { return array("success" => false, "message" => "Unauthorized access"); } try { if ($action === "update") { if (isset($data["client"])) { $this->updateDownloadLink("client", "direct", $data["client"]["direct"] ?? '', $data["client"]["size"] ?? '', $data["client"]["last_update"] ?? ''); $this->updateDownloadLink("client", "gdrive", $data["client"]["gdrive"] ?? '', $data["client"]["size"] ?? '', $data["client"]["last_update"] ?? ''); $this->updateDownloadLink("client", "mega", $data["client"]["mega"] ?? '', $data["client"]["size"] ?? '', $data["client"]["last_update"] ?? ''); } if (isset($data["patcher"])) { $this->updateDownloadLink("patcher", "direct", $data["patcher"]["direct"] ?? '', $data["patcher"]["size"] ?? '', $data["patcher"]["last_update"] ?? ''); $this->updateDownloadLink("patcher", "gdrive", $data["patcher"]["gdrive"] ?? '', $data["patcher"]["size"] ?? '', $data["patcher"]["last_update"] ?? ''); $this->updateDownloadLink("patcher", "mega", $data["patcher"]["mega"] ?? '', $data["patcher"]["size"] ?? '', $data["patcher"]["last_update"] ?? ''); } return array("success" => true, "message" => "Download settings updated successfully"); } if ($action === "get") { $links = $this->getDownloadLinks(); return array("success" => true, "data" => $links); } return array("success" => false, "message" => "Invalid action"); } catch (Exception $e) { error_log("Error in handleDownloadAction: " . $e->getMessage()); return array("success" => false, "message" => "Error processing request: " . $e->getMessage()); } } public function getNews($id = null) { try { if ($id) { $stmt = $this->siteDb->prepare("SELECT * FROM news WHERE id = :id"); $stmt->execute(array(":id" => $id)); return $stmt->fetch(\PDO::FETCH_ASSOC); } $stmt = $this->siteDb->prepare("SELECT * FROM news WHERE status = 1 ORDER BY created_at DESC"); $stmt->execute(); $news = $stmt->fetchAll(\PDO::FETCH_ASSOC); return $news ?: array(); } catch (\PDOException $e) { error_log("Error fetching news: " . $e->getMessage()); return array(); } } public function createNews($title, $content, $date) { if (!$this->checkAdminStatus()) { return array("success" => false, "message" => "Unauthorized"); } try { $stmt = $this->siteDb->prepare("\xa                INSERT INTO news (title, content, date) \xa                VALUES (:title, :content, :date)\xa            "); $stmt->execute(array(":title" => $title, ":content" => $content, ":date" => $date)); $newId = $this->siteDb->lastInsertId(); return array("success" => true, "message" => "News created successfully", "id" => $newId); } catch (\PDOException $e) { error_log("Error creating news: " . $e->getMessage()); return array("success" => false, "message" => "Error creating news"); } } public function updateNews($id, $title, $content, $date) { if (!$this->checkAdminStatus()) { return array("success" => false, "message" => "Unauthorized"); } try { $stmt = $this->siteDb->prepare("\xa                UPDATE news \xa                SET title = :title, 
                    content = :content, \xa                    date = :date,
                    updated_at = CURRENT_TIMESTAMP\xa                WHERE id = :id\xa            "); $stmt->execute(array(":id" => $id, ":title" => $title, ":content" => $content, ":date" => $date)); return array("success" => true, "message" => "News updated successfully"); } catch (\PDOException $e) { error_log("Error updating news: " . $e->getMessage()); return array("success" => false, "message" => "Error updating news"); } } public function deleteNews($id) { if (!$this->checkAdminStatus()) { return array("success" => false, "message" => "Unauthorized"); } try { $stmt = $this->siteDb->prepare("DELETE FROM news WHERE id = :id"); $stmt->execute(array(":id" => $id)); return array("success" => true, "message" => "News deleted successfully"); } catch (\PDOException $e) { error_log("Error deleting news: " . $e->getMessage()); return array("success" => false, "message" => "Error deleting news"); } } } ?>

Did this file decode correctly?

Original Code

<?php
 class AdminController { private $account; private $auth; private $siteDb; public function __construct() { if (!defined("\104\102\137\110\117\x53\x54") || !defined("\x44\x42\x5f\125\x53\x45\x52") || !defined("\104\x42\137\x50\101\123\123")) { throw new Exception("\104\141\x74\x61\142\x61\163\145\x20\x63\157\156\x66\151\147\x75\162\x61\x74\x69\157\156\x20\143\157\156\x73\164\141\x6e\164\x73\x20\x61\162\145\40\156\157\x74\40\x64\145\146\151\x6e\x65\x64\56"); } $this->auth = new Auth(DB_HOST, DB_USER, DB_PASS); $database = new Database(); $this->account = $database->dbConnection(DB_HOST, "\x61\143\143\x6f\x75\x6e\164", DB_USER, DB_PASS); $this->siteDb = $database->dbConnection('', '', '', '', "\x79\145\163"); } public function isAdmin($userId) { try { $stmt = $this->account->prepare("\123\105\114\105\x43\124\x20\x77\x65\142\137\141\144\155\151\x6e\40\106\x52\x4f\115\x20\x61\x63\x63\157\165\x6e\164\40\127\x48\105\x52\105\40\x69\144\x20\x3d\40\x3a\165\x73\x65\x72\111\x64"); $stmt->bindParam("\72\x75\163\145\162\111\144", $userId, PDO::PARAM_INT); $stmt->execute(); if ($stmt->rowCount() > 0) { $result = $stmt->fetch(PDO::FETCH_ASSOC); return intval($result["\x77\x65\x62\x5f\x61\144\155\x69\x6e"]) === 99; } return false; } catch (PDOException $e) { error_log("\105\162\x72\157\x72\40\x63\150\x65\143\x6b\x69\x6e\147\x20\x61\144\x6d\x69\156\40\x73\x74\x61\x74\165\163\72\40" . $e->getMessage()); return false; } } public function index() { if (!isset($_SESSION["\x75\x73\145\x72\x5f\x69\144"]) || !$this->isAdmin($_SESSION["\165\x73\145\162\x5f\x69\144"])) { header("\x4c\157\143\x61\x74\151\157\156\x3a\40\57"); die; } $downloadLinks = $this->getDownloadLinks(); ob_start(); require __DIR__ . "\57\56\56\x2f\x76\x69\145\167\163\57\x61\144\x6d\151\156\137\144\141\x73\150\142\x6f\141\162\144\x2e\x70\x68\160"; return ob_get_clean(); } public function checkAdminStatus() { if (!isset($_SESSION["\x75\x73\x65\162\137\x69\144"])) { return false; } return $this->isAdmin($_SESSION["\x75\163\145\162\x5f\x69\x64"]); } public function getDownloadLinks() { try { $stmt = $this->siteDb->prepare("\x53\105\x4c\x45\x43\x54\40\52\40\x46\122\x4f\115\40\144\157\x77\156\154\157\141\144\x73\40\x4f\x52\x44\105\122\x20\102\x59\40\164\171\160\x65\x2c\40\x70\154\x61\164\x66\x6f\x72\155"); $stmt->execute(); $links = array("\143\x6c\151\x65\156\164" => array("\x6c\151\156\x6b\x73" => array(), "\163\x69\172\145" => '', "\154\141\x73\x74\x5f\165\x70\x64\x61\164\145" => ''), "\x70\141\x74\143\150\145\162" => array("\x6c\x69\156\153\x73" => array(), "\163\x69\x7a\145" => '', "\x6c\x61\163\x74\137\165\160\x64\x61\164\145" => '')); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (!empty($row["\165\x72\154"])) { $links[$row["\x74\x79\160\x65"]]["\x6c\151\x6e\x6b\163"][$row["\x70\154\x61\164\146\x6f\162\x6d"]] = $row["\x75\162\x6c"]; } $links[$row["\x74\171\160\145"]]["\163\x69\x7a\145"] = $row["\x73\151\172\x65"]; $links[$row["\164\x79\160\145"]]["\x6c\141\163\x74\137\x75\160\144\x61\164\x65"] = $row["\154\141\x73\164\x5f\x75\x70\144\x61\x74\x65"]; } return $links; } catch (PDOException $e) { error_log("\x45\162\162\x6f\x72\40\146\x65\164\143\150\151\x6e\147\x20\144\x6f\x77\x6e\x6c\x6f\x61\144\40\x6c\151\x6e\x6b\163\x3a\40" . $e->getMessage()); return false; } } public function updateDownloadLink($type, $platform, $url, $size, $lastUpdate) { if (!isset($_SESSION["\x75\163\145\x72\137\151\144"]) || !$this->isAdmin($_SESSION["\165\163\145\162\x5f\151\144"])) { return array("\x73\x75\143\x63\x65\x73\163" => false, "\155\145\x73\163\141\147\x65" => "\125\x6e\x61\165\164\150\157\x72\x69\x7a\x65\x64\40\x61\143\143\145\163\x73"); } try { $stmt = $this->siteDb->prepare("\12\40\x20\40\x20\40\x20\40\x20\40\40\40\40\x20\x20\40\x20\x55\120\x44\x41\x54\x45\40\144\x6f\167\x6e\x6c\157\141\x64\x73\x20\xa\x20\x20\40\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\x20\40\123\x45\x54\x20\165\x72\154\40\x3d\x20\x3a\165\162\154\x2c\x20\x73\x69\172\145\x20\x3d\x20\72\163\x69\x7a\145\x2c\40\154\141\x73\x74\x5f\x75\x70\x64\x61\x74\x65\40\x3d\x20\72\x6c\x61\x73\164\125\160\x64\x61\x74\x65\40\xa\x20\x20\40\40\x20\40\x20\x20\40\x20\40\40\x20\x20\x20\40\127\x48\x45\122\x45\x20\x74\x79\x70\x65\x20\x3d\40\x3a\164\171\x70\x65\x20\x41\x4e\104\40\x70\x6c\x61\x74\x66\x6f\162\x6d\40\75\40\x3a\x70\x6c\x61\x74\146\x6f\162\x6d\xa\40\x20\40\x20\x20\40\40\x20\40\x20\x20\x20"); $result = $stmt->execute(array("\x3a\x75\x72\154" => $url, "\x3a\x73\x69\172\145" => $size, "\72\154\141\x73\164\x55\x70\x64\x61\x74\145" => $lastUpdate, "\x3a\164\x79\x70\145" => $type, "\72\x70\x6c\141\164\x66\x6f\x72\x6d" => $platform)); if (!$result) { throw new Exception("\x46\141\x69\154\x65\144\40\x74\157\40\165\160\144\141\164\145\40\144\157\x77\x6e\x6c\157\x61\144\40\154\x69\156\153"); } return array("\163\x75\x63\x63\145\x73\163" => true, "\x6d\x65\163\x73\x61\147\145" => "\104\x6f\x77\156\154\x6f\141\x64\40\154\x69\156\153\40\x75\x70\x64\x61\164\145\144\x20\x73\165\143\143\145\163\163\146\x75\x6c\x6c\171"); } catch (PDOException $e) { error_log("\x45\162\x72\x6f\x72\40\165\160\144\141\164\151\x6e\x67\40\144\x6f\x77\x6e\154\157\x61\x64\x20\154\151\x6e\153\x3a\40" . $e->getMessage()); throw new Exception("\104\141\164\141\x62\x61\163\145\40\x65\x72\162\x6f\x72\40\157\143\x63\165\x72\162\145\144"); } } public function handleDownloadAction($action, $data) { if (!isset($_SESSION["\x75\x73\x65\x72\137\x69\144"]) || !$this->isAdmin($_SESSION["\x75\x73\x65\x72\x5f\x69\x64"])) { return array("\x73\165\x63\x63\145\163\x73" => false, "\x6d\145\163\x73\x61\x67\145" => "\125\156\x61\x75\164\x68\x6f\x72\151\x7a\x65\x64\40\x61\143\x63\x65\x73\163"); } try { if ($action === "\x75\160\144\141\x74\x65") { if (isset($data["\x63\x6c\x69\x65\156\164"])) { $this->updateDownloadLink("\x63\154\x69\x65\x6e\x74", "\144\151\162\145\x63\x74", $data["\143\154\151\145\x6e\164"]["\x64\151\x72\x65\x63\x74"] ?? '', $data["\143\x6c\x69\x65\x6e\164"]["\163\151\172\145"] ?? '', $data["\x63\x6c\x69\x65\x6e\x74"]["\154\x61\163\x74\137\x75\160\144\141\164\x65"] ?? ''); $this->updateDownloadLink("\143\x6c\151\145\x6e\x74", "\x67\144\x72\151\x76\x65", $data["\x63\154\x69\x65\x6e\164"]["\147\144\x72\151\x76\145"] ?? '', $data["\143\x6c\151\x65\x6e\164"]["\163\151\172\x65"] ?? '', $data["\x63\154\x69\x65\x6e\164"]["\154\x61\x73\164\x5f\165\160\x64\141\164\145"] ?? ''); $this->updateDownloadLink("\x63\154\151\x65\x6e\x74", "\x6d\x65\x67\141", $data["\x63\x6c\x69\145\x6e\164"]["\x6d\x65\x67\x61"] ?? '', $data["\143\x6c\x69\x65\x6e\x74"]["\x73\x69\x7a\x65"] ?? '', $data["\x63\x6c\x69\145\x6e\x74"]["\154\x61\163\x74\137\x75\x70\x64\141\164\x65"] ?? ''); } if (isset($data["\x70\x61\x74\143\x68\145\162"])) { $this->updateDownloadLink("\160\x61\164\143\150\145\162", "\144\x69\x72\145\x63\164", $data["\160\141\x74\143\x68\x65\x72"]["\144\x69\162\x65\x63\x74"] ?? '', $data["\160\x61\164\x63\150\x65\162"]["\163\x69\x7a\x65"] ?? '', $data["\160\141\x74\143\150\x65\162"]["\154\141\163\164\137\x75\160\144\141\x74\145"] ?? ''); $this->updateDownloadLink("\160\x61\164\x63\150\145\162", "\147\x64\162\x69\166\145", $data["\160\141\x74\x63\150\x65\x72"]["\147\x64\x72\x69\x76\145"] ?? '', $data["\160\x61\164\x63\150\x65\162"]["\x73\151\172\x65"] ?? '', $data["\160\141\164\143\150\145\162"]["\154\x61\163\x74\x5f\165\x70\x64\141\x74\x65"] ?? ''); $this->updateDownloadLink("\160\x61\x74\143\150\x65\x72", "\155\145\147\x61", $data["\160\x61\x74\143\150\145\x72"]["\x6d\145\x67\x61"] ?? '', $data["\x70\x61\164\x63\150\x65\x72"]["\x73\x69\172\145"] ?? '', $data["\160\141\164\143\150\x65\x72"]["\154\x61\x73\164\137\165\160\x64\x61\x74\145"] ?? ''); } return array("\x73\x75\x63\x63\145\x73\x73" => true, "\155\x65\163\163\x61\x67\145" => "\104\x6f\x77\x6e\x6c\157\141\144\40\163\145\164\x74\151\156\147\x73\40\x75\160\144\x61\x74\x65\144\x20\163\x75\x63\x63\145\163\163\x66\165\154\x6c\171"); } if ($action === "\147\145\164") { $links = $this->getDownloadLinks(); return array("\x73\x75\x63\x63\x65\x73\x73" => true, "\x64\141\164\141" => $links); } return array("\x73\165\x63\143\145\x73\163" => false, "\x6d\x65\x73\x73\141\x67\x65" => "\111\156\166\x61\154\151\144\x20\141\143\164\x69\x6f\x6e"); } catch (Exception $e) { error_log("\x45\x72\162\x6f\x72\x20\x69\x6e\x20\x68\141\156\x64\x6c\x65\104\157\x77\x6e\x6c\157\141\144\x41\x63\164\151\157\156\72\40" . $e->getMessage()); return array("\163\165\143\143\145\x73\163" => false, "\155\145\163\163\141\x67\145" => "\105\x72\x72\157\x72\40\160\162\x6f\143\145\x73\163\151\x6e\147\x20\162\145\161\165\x65\x73\x74\x3a\40" . $e->getMessage()); } } public function getNews($id = null) { try { if ($id) { $stmt = $this->siteDb->prepare("\123\105\x4c\105\x43\124\x20\x2a\x20\106\122\x4f\x4d\x20\x6e\x65\167\163\40\127\x48\105\x52\105\40\x69\x64\40\75\40\72\x69\x64"); $stmt->execute(array("\x3a\151\x64" => $id)); return $stmt->fetch(\PDO::FETCH_ASSOC); } $stmt = $this->siteDb->prepare("\x53\x45\114\105\x43\124\40\x2a\x20\x46\122\117\115\x20\x6e\145\167\163\x20\127\110\105\x52\x45\x20\163\164\141\x74\165\x73\40\x3d\x20\61\x20\x4f\122\x44\105\x52\40\x42\x59\x20\143\x72\145\141\x74\145\144\137\x61\164\x20\104\x45\x53\x43"); $stmt->execute(); $news = $stmt->fetchAll(\PDO::FETCH_ASSOC); return $news ?: array(); } catch (\PDOException $e) { error_log("\105\x72\x72\157\162\40\x66\x65\x74\x63\150\151\x6e\147\x20\156\145\x77\163\72\x20" . $e->getMessage()); return array(); } } public function createNews($title, $content, $date) { if (!$this->checkAdminStatus()) { return array("\163\x75\x63\143\145\x73\x73" => false, "\x6d\x65\x73\163\141\147\x65" => "\x55\156\x61\x75\x74\150\157\x72\x69\x7a\145\x64"); } try { $stmt = $this->siteDb->prepare("\xa\40\40\40\40\x20\40\x20\40\40\x20\40\40\40\x20\x20\x20\111\116\x53\x45\122\124\x20\111\x4e\x54\x4f\40\x6e\145\167\x73\x20\x28\164\x69\164\x6c\x65\54\40\x63\157\x6e\x74\145\x6e\164\x2c\x20\x64\141\164\x65\x29\x20\xa\40\40\40\40\x20\40\40\x20\x20\40\x20\40\40\40\x20\40\126\101\114\x55\x45\x53\40\50\x3a\x74\151\164\154\145\x2c\40\72\x63\157\156\x74\145\156\164\54\x20\72\x64\x61\164\x65\51\xa\x20\x20\x20\40\x20\40\40\40\x20\x20\40\x20"); $stmt->execute(array("\72\x74\x69\x74\154\145" => $title, "\x3a\x63\x6f\x6e\164\145\156\164" => $content, "\x3a\144\141\x74\x65" => $date)); $newId = $this->siteDb->lastInsertId(); return array("\163\x75\143\143\x65\163\163" => true, "\155\145\163\x73\x61\147\x65" => "\x4e\145\x77\x73\40\x63\162\x65\141\x74\x65\x64\40\163\x75\x63\x63\x65\163\x73\146\165\154\154\x79", "\x69\144" => $newId); } catch (\PDOException $e) { error_log("\105\162\162\x6f\162\x20\x63\162\145\141\164\x69\x6e\147\x20\x6e\145\167\x73\x3a\40" . $e->getMessage()); return array("\163\x75\143\143\145\163\163" => false, "\x6d\145\163\x73\x61\147\145" => "\x45\162\x72\x6f\x72\40\x63\162\x65\x61\x74\151\x6e\147\40\156\145\x77\163"); } } public function updateNews($id, $title, $content, $date) { if (!$this->checkAdminStatus()) { return array("\x73\x75\143\143\x65\x73\x73" => false, "\155\x65\x73\163\x61\147\145" => "\125\x6e\141\165\x74\x68\157\x72\x69\x7a\145\x64"); } try { $stmt = $this->siteDb->prepare("\xa\40\x20\x20\40\x20\x20\x20\40\40\40\40\x20\40\x20\x20\x20\125\x50\104\101\x54\x45\x20\x6e\145\167\x73\x20\xa\x20\40\x20\40\40\40\x20\40\x20\x20\40\40\x20\40\x20\40\x53\105\x54\x20\164\x69\x74\x6c\145\40\75\x20\x3a\x74\151\x74\154\x65\x2c\40\12\40\40\x20\40\x20\40\x20\x20\40\40\40\40\40\40\x20\x20\40\40\x20\x20\x63\157\x6e\164\145\x6e\164\x20\x3d\x20\x3a\143\x6f\x6e\164\145\156\x74\x2c\x20\xa\40\x20\x20\40\x20\40\x20\40\40\x20\40\x20\x20\40\40\40\x20\40\x20\40\144\141\x74\145\x20\75\x20\x3a\x64\x61\x74\145\x2c\12\40\x20\x20\x20\40\40\x20\x20\40\x20\x20\40\40\x20\40\x20\40\40\40\40\x75\160\x64\141\x74\x65\x64\x5f\141\x74\x20\x3d\x20\103\125\122\122\105\x4e\x54\x5f\x54\111\115\105\x53\124\x41\115\x50\xa\40\x20\x20\40\40\40\x20\x20\40\40\x20\40\40\40\x20\40\x57\110\105\122\105\40\x69\144\40\x3d\x20\72\x69\144\xa\40\40\x20\40\40\40\x20\40\x20\x20\x20\x20"); $stmt->execute(array("\x3a\151\x64" => $id, "\x3a\164\151\x74\x6c\x65" => $title, "\x3a\x63\x6f\x6e\164\x65\x6e\164" => $content, "\72\x64\141\164\145" => $date)); return array("\x73\x75\143\143\145\163\163" => true, "\x6d\x65\x73\x73\141\147\145" => "\x4e\x65\x77\163\x20\165\160\144\x61\164\145\144\x20\x73\165\x63\143\x65\x73\163\x66\x75\x6c\x6c\171"); } catch (\PDOException $e) { error_log("\x45\x72\x72\157\x72\40\165\160\144\x61\164\x69\x6e\x67\x20\156\145\167\163\72\x20" . $e->getMessage()); return array("\163\x75\x63\143\145\163\x73" => false, "\155\x65\x73\x73\x61\147\x65" => "\x45\x72\x72\x6f\x72\40\165\x70\x64\141\x74\x69\156\147\40\x6e\145\x77\163"); } } public function deleteNews($id) { if (!$this->checkAdminStatus()) { return array("\163\x75\143\143\145\x73\x73" => false, "\155\145\x73\x73\x61\x67\145" => "\125\156\x61\165\164\x68\157\x72\151\x7a\x65\x64"); } try { $stmt = $this->siteDb->prepare("\x44\105\114\105\124\105\40\x46\122\117\115\40\x6e\x65\x77\163\x20\x57\x48\x45\122\x45\x20\151\x64\40\75\x20\72\151\x64"); $stmt->execute(array("\x3a\151\x64" => $id)); return array("\163\165\x63\143\x65\163\x73" => true, "\x6d\145\163\163\141\147\145" => "\x4e\145\x77\x73\x20\144\145\154\x65\164\x65\144\40\x73\x75\143\143\x65\163\163\x66\165\154\154\x79"); } catch (\PDOException $e) { error_log("\105\162\x72\x6f\x72\x20\144\x65\154\145\x74\x69\156\147\40\156\x65\x77\x73\x3a\40" . $e->getMessage()); return array("\x73\165\143\x63\x65\x73\x73" => false, "\155\145\x73\x73\x61\147\x65" => "\x45\x72\162\157\x72\40\144\x65\x6c\145\164\x69\156\x67\40\x6e\x65\167\x73"); } } }

Function Calls

None

Variables

None

Stats

MD5 efb3e829b5c54a368578c16a30b667cd
Eval Count 0
Decode Time 65 ms