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 namespace Alumentum; class Config { protected static $settings = array(); public s..
Decoded Output download
<?php
namespace Alumentum; class Config { protected static $settings = array(); public static function get($EMrXw, $xoUHz = null) { if (!empty($EMrXw)) { goto elatS; } return $xoUHz; elatS: $A6Df_ = null; if ($EMrXw[strlen($EMrXw) - 1] == "*") { goto wMGBd; } $A6Df_ = isset(self::$settings[$EMrXw]) ? self::$settings[$EMrXw] : $xoUHz; goto F1Srk; wMGBd: $EMrXw = substr($EMrXw, 0, -1); if (empty($EMrXw)) { goto VmvD2; } $A6Df_ = array(); foreach (self::$settings as $p5e6p => $mCvrK) { if (!(strpos($p5e6p, $EMrXw) === 0)) { goto AK5jT; } $A6Df_[$p5e6p] = $mCvrK; AK5jT: rg2l2: } zeWy1: goto C1rgu; VmvD2: $A6Df_ = self::$settings; C1rgu: F1Srk: return $A6Df_; } public static function set($FIAo6, $mCvrK = null) { if (is_array($FIAo6)) { goto iPW__; } self::$settings[$FIAo6] = $mCvrK; goto mMoKI; iPW__: self::$settings = array_merge(self::$settings, $FIAo6); mMoKI: } public static function remove($EMrXw) { unset(self::$settings[$EMrXw]); } public static function clear() { self::$settings = array(); } } namespace Alumentum; class Events { const REMOVE_HANDLER = "remove_handler"; protected static $listeners = array(); public static function triggerEvent($EMrXw, array $cNacg = array()) { if (!isset(self::$listeners[$EMrXw])) { goto FtB_F; } foreach (self::$listeners[$EMrXw] as $FQVnq) { $A6Df_ = call_user_func_array($FQVnq, $cNacg); if (!($A6Df_ === self::REMOVE_HANDLER)) { goto hW2xL; } self::removeEventListener($EMrXw, $FQVnq); hW2xL: AmbzD: } LHOt7: FtB_F: } public static function addEventListener($EMrXw, $FQVnq) { if (isset(self::$listeners[$EMrXw])) { goto EDePz; } self::$listeners[$EMrXw] = array($FQVnq); goto MviVa; EDePz: self::$listeners[$EMrXw][] = $FQVnq; MviVa: } public static function removeEventListener($EMrXw, $FQVnq) { if (!isset(self::$listeners[$EMrXw])) { goto nluZz; } $wl7tJ = array_search($FQVnq, self::$listeners[$EMrXw]); if (!($wl7tJ !== false)) { goto bFGN3; } unset(self::$listeners[$EMrXw][$wl7tJ]); if (!empty(self::$listeners[$EMrXw])) { goto XJH4U; } unset(self::$listeners[$EMrXw]); XJH4U: bFGN3: nluZz: } } namespace Alumentum; class Request { const GET = "GET"; const POST = "POST"; protected $uri; protected $params = array(); public function __construct() { $yWe9Y = strpos($_SERVER["REQUEST_URI"], "?"); $this->uri = $yWe9Y !== false ? substr($_SERVER["REQUEST_URI"], 0, $yWe9Y) : $_SERVER["REQUEST_URI"]; $this->filterInvalidValues($_GET); $this->filterInvalidValues($_POST); $this->filterInvalidValues($_COOKIE); } protected function filterInvalidValues(array &$VZkEp, $lolFM = "UTF-8") { foreach ($VZkEp as $p5e6p => &$mCvrK) { if (is_array($mCvrK)) { goto vjtUD; } if (mb_convert_encoding($mCvrK, $lolFM, $lolFM) != $mCvrK) { goto rfo04; } goto X2Tv1; vjtUD: $this->filterInvalidValues($mCvrK, $lolFM); goto X2Tv1; rfo04: unset($VZkEp[$p5e6p]); X2Tv1: puxJY: } NY7M3: } public function get($EMrXw, $dXlVr = "UGPC") { foreach (str_split($dXlVr) as $C8vCK) { switch ($C8vCK) { case "U": if (!isset($this->params[$EMrXw])) { goto ogQtb; } return $this->params[$EMrXw]; ogQtb: goto xy_Hk; case "G": if (!isset($_GET[$EMrXw])) { goto hVs4Y; } return $_GET[$EMrXw]; hVs4Y: goto xy_Hk; case "P": if (!isset($_POST[$EMrXw])) { goto pDpoT; } return $_POST[$EMrXw]; pDpoT: goto xy_Hk; case "C": if (!isset($_COOKIE[$EMrXw])) { goto s9Rlq; } return $_COOKIE[$EMrXw]; s9Rlq: goto xy_Hk; default: throw new \Exception("Nem letezik a kovetkezo request parameter tipus: " . $C8vCK); } T2cmB: xy_Hk: uaJeR: } z8Wnb: return null; } private function hasParam($EMrXw) { if (isset($this->params[$EMrXw])) { goto GrzsV; } if (isset($_GET[$EMrXw])) { goto yUbLa; } if (isset($_POST[$EMrXw])) { goto IXavo; } if (isset($_COOKIE[$EMrXw])) { goto P9e2R; } goto k4mbr; GrzsV: return true; goto k4mbr; yUbLa: return true; goto k4mbr; IXavo: return true; goto k4mbr; P9e2R: return true; k4mbr: return false; } public function has($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if ($this->hasParam($EMrXw)) { goto dEKl9; } $A6Df_ = false; goto M9bD1; dEKl9: bFy1x: } M9bD1: return $A6Df_; } public function hasGet($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if (isset($_GET[$EMrXw])) { goto q7u3S; } $A6Df_ = false; goto ni6cu; q7u3S: GbC0f: } ni6cu: return $A6Df_; } public function hasPost($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if (isset($_POST[$EMrXw])) { goto vSHzj; } $A6Df_ = false; goto lD8WX; vSHzj: WGnuY: } lD8WX: return $A6Df_; } public function hasCookie($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if (isset($_COOKIE[$EMrXw])) { goto x3VGj; } $A6Df_ = false; goto mPtyY; x3VGj: QU9Uf: } mPtyY: return $A6Df_; } public function getGet($EMrXw, $xoUHz = null) { return isset($_GET[$EMrXw]) ? $_GET[$EMrXw] : $xoUHz; } public function getPost($EMrXw, $xoUHz = null) { return isset($_POST[$EMrXw]) ? $_POST[$EMrXw] : $xoUHz; } public function getCookie($EMrXw, $xoUHz = null) { return isset($_COOKIE[$EMrXw]) ? $_COOKIE[$EMrXw] : $xoUHz; } public function set($EMrXw, $mCvrK) { $this->params[$EMrXw] = $mCvrK; } public function getAll() { return array_merge($_COOKIE, $_POST, $_GET, $this->params); } public function getAllGet() { return $_GET; } public function getAllPost() { return $_POST; } public function getAllCookie() { return $_COOKIE; } public function getFiles() { $Zd1QX = array(); foreach ($_FILES as $C8IsG => $mxjrD) { foreach ($mxjrD as $T4ImC => $VfSG9) { if (is_array($VfSG9)) { goto s5opl; } $Zd1QX[$C8IsG][$T4ImC] = $VfSG9; goto nkRCB; s5opl: foreach ($VfSG9 as $khRCI => $yJcpi) { $Zd1QX[$C8IsG][$khRCI][$T4ImC] = $yJcpi; vxlt8: } dt6_5: nkRCB: ASiYZ: } J06s7: IcDs1: } RRXbB: return $Zd1QX; } public function getMethod() { return $_SERVER["REQUEST_METHOD"]; } public function getUri() { return $this->uri; } public function getUrl() { return $_SERVER["REQUEST_URI"]; } public function getDomain() { return $_SERVER["SERVER_NAME"]; } public function getIp() { return isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : ''; } public function getReferrer() { return isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : ''; } public function isReferrerOnSameDomain($Sp7na = true) { if (isset($_SERVER["HTTP_REFERER"])) { goto hk040; } return false; hk040: $CG1FE = @parse_url($_SERVER["HTTP_REFERER"], PHP_URL_HOST); if (!($CG1FE === false)) { goto JJnyd; } return false; JJnyd: if ($Sp7na) { goto dphU1; } return $CG1FE === $_SERVER["SERVER_NAME"]; goto GDGkU; dphU1: return $CG1FE === $_SERVER["SERVER_NAME"] || stristr($CG1FE, "." . $_SERVER["SERVER_NAME"]) === "." . $_SERVER["SERVER_NAME"] || stristr($_SERVER["SERVER_NAME"], "." . $CG1FE) === "." . $CG1FE; GDGkU: } public function isRobotGenerated() { static $D2HV0 = array("bot", "crawl", "check_http", "spider", "flash", "search", "ia_archiver"); $bMaJx = !empty($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : ''; foreach ($D2HV0 as $Vitn0) { if (!(stripos($bMaJx, $Vitn0) !== false)) { goto AqXyi; } return true; AqXyi: RM_zR: } PShx3: return false; } public function isSecure() { return !empty($_SERVER["HTTPS"]); } public function isAjaxRequest() { return isset($_SERVER["HTTP_X_REQUESTED_WITH"]) && $_SERVER["HTTP_X_REQUESTED_WITH"] == "XMLHttpRequest"; } public function getUserAgent() { return isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : ''; } public function getBrowserInfo($bMaJx = '') { if (!empty($bMaJx)) { goto C_DaY; } $bMaJx = $this->getUserAgent(); C_DaY: $bMaJx = strtolower($bMaJx); $tU4FW = array("os" => "?", "browser" => "?", "version" => "?"); if (!empty($bMaJx)) { goto Qtca7; } return $tU4FW; Qtca7: if (strpos($bMaJx, "windows") !== false) { goto BIKo1; } if (strpos($bMaJx, "macintosh") !== false) { goto dNp9R; } if (strpos($bMaJx, "linux") !== false) { goto h76xV; } goto Um_z7; BIKo1: $tU4FW["os"] = "win"; goto Um_z7; dNp9R: $tU4FW["os"] = "mac"; goto Um_z7; h76xV: $tU4FW["os"] = "linux"; Um_z7: $lr35b = array("opera" => array("name" => "opera", "versionPattern" => "#version/(\d+(?:\.\d+)?)#"), "msie" => array("name" => "ie", "versionPattern" => "#msie (\d+)#"), "firefox" => array("name" => "ff", "versionPattern" => "#firefox/(\d+(?:\.\d+)?)#"), "chrome" => array("name" => "chrome", "versionPattern" => "#chrome/(\d+(?:\.\d+)?)#")); WHlY4: foreach ($lr35b as $L3dyo => $RJVp7) { if (!(strpos($bMaJx, $L3dyo) !== false)) { goto t0ZrJ; } $tU4FW["browser"] = $RJVp7["name"]; $Y0OLK = array(); if (!preg_match($RJVp7["versionPattern"], $bMaJx, $Y0OLK)) { goto UvgGw; } $tU4FW["version"] = $Y0OLK[1]; UvgGw: goto HQy2n; t0ZrJ: O6fZM: } wOHFT: if (!(strpos($bMaJx, "safari") !== false)) { goto pI9r5; } $tU4FW["browser"] = "safari"; if (preg_match("#version/(\d+)#", $bMaJx, $Y0OLK)) { goto Q3aOi; } if (preg_match("#applewebkit/(\d+)#", $bMaJx, $Y0OLK)) { goto dLjbh; } goto Etw4l; Q3aOi: $tU4FW["version"] = $Y0OLK[1]; goto Etw4l; dLjbh: $iuIG4 = array(85 => "1", 401 => "2", 521 => "3", 528 => "4", 533 => "5"); $FXh5q = $Y0OLK[1]; $k4OJC = array_keys($iuIG4); $TKkiI = current($k4OJC); u3No9: if (!($TKkiI > $FXh5q)) { goto egVpa; } $tU4FW["version"] = $iuIG4[prev($k4OJC)]; goto YAf9U; egVpa: if (($TKkiI = next($k4OJC)) !== false) { goto u3No9; } YAf9U: Etw4l: goto HQy2n; pI9r5: if (false) { goto WHlY4; } HQy2n: return $tU4FW; } } namespace Alumentum; class Response { const FORMAT_ATOM = "atom"; const FORMAT_CSV = "csv"; const FORMAT_GIF = "gif"; const FORMAT_HTML = "html"; const FORMAT_JPG = "jpg"; const FORMAT_JS = "js"; const FORMAT_JSON = "json"; const FORMAT_PNG = "png"; const FORMAT_RDF = "rdf"; const FORMAT_RSS = "rss"; const FORMAT_RSS2 = "rss2"; const FORMAT_TXT = "txt"; const FORMAT_XML = "xml"; const FORMAT_PDF = "pdf"; protected static $contentTypes = array(self::FORMAT_ATOM => "application/atom+xml", self::FORMAT_CSV => "application/vnd.ms-excel", self::FORMAT_GIF => "image/gif", self::FORMAT_HTML => "text/html", self::FORMAT_JPG => "image/jpeg", self::FORMAT_JS => "text/javascript", self::FORMAT_JSON => "application/json", self::FORMAT_PNG => "image/png", self::FORMAT_RDF => "application/rdf+xml", self::FORMAT_RSS => "application/rss+xml", self::FORMAT_RSS2 => "application/rss+xml", self::FORMAT_TXT => "text/plain", self::FORMAT_XML => "application/xml", self::FORMAT_PDF => "application/pdf"); protected static $formatHandlers = array(); protected static $textFormats = array(self::FORMAT_ATOM, self::FORMAT_CSV, self::FORMAT_HTML, self::FORMAT_JS, self::FORMAT_JSON, self::FORMAT_RDF, self::FORMAT_RSS, self::FORMAT_RSS2, self::FORMAT_TXT, self::FORMAT_XML); protected $format = self::FORMAT_HTML; protected $charset = "utf-8"; protected static $httpStatusCodes = array(100 => "Continue", 101 => "Switching Protocols", 200 => "OK", 201 => "Created", 202 => "Accepted", 203 => "Non-Authoritative Information", 204 => "No Content", 205 => "Reset Content", 206 => "Partial Content", 300 => "Multiple Choices", 301 => "Moved Permanently", 302 => "Found", 303 => "See Other", 304 => "Not Modified", 305 => "Use Proxy", 307 => "Temporary Redirect", 400 => "Bad Request", 401 => "Unauthorized", 402 => "Payment Required", 403 => "Forbidden", 404 => "Not Found", 405 => "Method Not Allowed", 406 => "Not Acceptable", 407 => "Proxy Authentication Required", 408 => "Request Timeout", 409 => "Conflict", 410 => "Gone", 411 => "Length Required", 412 => "Precondition Failed", 413 => "Request Entity Too Large", 414 => "Request-URI Too Long", 415 => "Unsupported Media Type", 416 => "Requested range not satisfiable", 417 => "Expectation Failed", 500 => "Internal Server Error", 501 => "Not Implemented", 502 => "Bad Gateway", 503 => "Service Unavailable", 504 => "Gateway Timeout", 505 => "HTTP Version Not Supported"); protected $httpStatusCode = 200; protected $cacheTtl; protected $headers = array(); protected $cookies = array(); protected $filename = ''; protected $content = ''; public function __construct() { $this->cacheTtl = Config::get("system.response.cacheTtl", -1); } public static function getHttpStatusMessage($dnbH6) { return isset(self::$httpStatusCodes[$dnbH6]) ? self::$httpStatusCodes[$dnbH6] : ''; } public static function addFormat($b_2w4, $gEfJs, $JqTr8) { self::$contentTypes[$b_2w4] = $gEfJs; if (!$JqTr8) { goto TS2Q6; } self::$textFormats[] = $b_2w4; TS2Q6: } public static function registerFormatHandler($b_2w4, IResponseFormatHandler $NJuGc) { self::$formatHandlers[$b_2w4] = $NJuGc; } public static function getFormatHandler($b_2w4) { return isset(self::$formatHandlers[$b_2w4]) ? self::$formatHandlers[$b_2w4] : null; } public function getFormat() { return $this->format; } public function setFormat($b_2w4) { if (isset(self::$contentTypes[$b_2w4])) { goto nonCi; } throw new \Exception("Ismeretlen valasz formatum: " . $b_2w4); nonCi: $this->format = $b_2w4; } public function getCharset() { return $this->charset; } public function setCharset($Jdk_3) { $this->charset = $Jdk_3; } public function getHttpStatusCode() { return $this->httpStatusCode; } public function setHttpStatusCode($dnbH6) { if (isset(self::$httpStatusCodes[$dnbH6])) { goto tpev9; } throw new \Exception("Ismeretlen HTTP statusz kod: " . $dnbH6); tpev9: $this->httpStatusCode = $dnbH6; } public function setHeader($EMrXw, $mCvrK, $KdiFb = true) { if ($KdiFb || !isset($this->headers[$EMrXw])) { goto fM2lN; } $this->headers[$EMrXw][] = $mCvrK; goto jNsFn; fM2lN: $this->headers[$EMrXw] = array($mCvrK); jNsFn: } public function clearHeaders() { $this->headers = array(); header_remove(); } public function setCookie($EMrXw, $mCvrK = '', $gX0i7 = 0, $hnSkN = '', $MM7Ld = '', $n8a7o = false, $IsPMy = false, $KxW6s = '') { if (!empty($MM7Ld)) { goto zvSEZ; } $MM7Ld = $_SERVER["HTTP_HOST"]; goto TXARN; zvSEZ: if (!(substr($MM7Ld, 0, 4) == "www.")) { goto Mizov; } $MM7Ld = substr($MM7Ld, 4); Mizov: TXARN: $CzmK9 = strpos($MM7Ld, ":"); if (!($CzmK9 !== false)) { goto K291m; } $MM7Ld = substr($MM7Ld, 0, $CzmK9); K291m: $QuZND = rawurlencode($EMrXw) . "=" . rawurlencode($mCvrK); if (!($mCvrK === '')) { goto SXCnO; } $QuZND .= "; Max-Age=0"; SXCnO: if (empty($gX0i7)) { goto nd0rU; } $QuZND .= "; Expires=" . gmdate("D, d-M-Y H:i:s", $gX0i7) . " GMT"; nd0rU: if (!empty($hnSkN)) { goto ijJqo; } $QuZND .= "; Path=/"; goto DXc2h; ijJqo: $QuZND .= "; Path=" . $hnSkN; DXc2h: $QuZND .= "; Domain=" . $MM7Ld; if (!$IsPMy) { goto pPwMl; } $QuZND .= "; HttpOnly"; pPwMl: if (Application::getInstance()->getRequest()->isSecure()) { goto jZPHQ; } if (empty($KxW6s)) { goto wWP2q; } $QuZND .= "; SameSite=" . $KxW6s; wWP2q: if (!$n8a7o) { goto hsckF; } $QuZND .= "; Secure"; hsckF: goto lK3eF; jZPHQ: $QuZND .= "; SameSite=" . ($KxW6s ?: "None"); if (!($n8a7o || empty($KxW6s) || $KxW6s === "None")) { goto svOeN; } $QuZND .= "; Secure"; svOeN: lK3eF: $this->cookies[$EMrXw] = $QuZND; } public function deleteCookie($EMrXw, $hnSkN = '', $MM7Ld = '', $n8a7o = false, $IsPMy = false) { $this->setCookie($EMrXw, '', 1, $hnSkN, $MM7Ld, $n8a7o, $IsPMy); } public function getFilename() { return $this->filename; } public function setFilename($Saw4x) { $this->filename = str_replace(""", "'", $Saw4x); } public function getContent() { return $this->content; } public function setContent($dl6OX) { $this->content = $dl6OX; } public function appendToContent($dl6OX) { $this->content .= $dl6OX; } public function clear() { $this->clearHeaders(); $this->setContent(''); } public function generateOutput($AhHrL) { $NJuGc = self::getFormatHandler($this->format); if (!($NJuGc === null)) { goto ZiXg0; } throw new \Exception("A "" . $this->format . "" kimeneti formatumhoz nincs megadva kezelo"); ZiXg0: return $NJuGc->generateOutput($AhHrL); } public function setCacheTtl($G6U3Z) { $this->cacheTtl = $G6U3Z; } protected function sendHeaders() { header_remove("Set-Cookie"); header("HTTP/1.1 " . $this->httpStatusCode . " " . self::$httpStatusCodes[$this->httpStatusCode]); $gEfJs = self::$contentTypes[$this->format]; if (!in_array($this->format, self::$textFormats)) { goto tuXHi; } $gEfJs .= "; charset=" . $this->charset; tuXHi: $this->setHeader("Content-Type", $gEfJs); if (empty($this->filename)) { goto RjbjN; } $this->setCacheTtl(0); $this->setHeader("Content-Disposition", "attachment; filename="" . $this->filename . """); RjbjN: if ($this->cacheTtl === 0) { goto OhJxo; } if ($this->cacheTtl > 0) { goto rb7YC; } goto kCRkU; OhJxo: $this->setHeader("Cache-Control", "max-age=0,no-cache,no-store,must-revalidate,post-check=0,pre-check=0"); $this->setHeader("Expires", 0); $this->setHeader("Pragma", "no-cache"); goto kCRkU; rb7YC: $this->setHeader("Cache-Control", "max-age=" . $this->cacheTtl); $this->setHeader("Expires", date("r", time() + $this->cacheTtl)); kCRkU: foreach ($this->headers as $wzw7C => $RjlQP) { foreach ($RjlQP as $mCvrK) { header($wzw7C . ": " . $mCvrK); dfQ6U: } uA5nW: pa_GX: } gsJof: foreach ($this->cookies as $mCvrK) { header("Set-Cookie: " . $mCvrK, false); z9WtU: } IEOwm: } public function send() { Events::triggerEvent("system.before_send_response"); $this->sendHeaders(); echo $this->content; Events::triggerEvent("system.after_send_response"); } } namespace Alumentum; interface IResponseFormatHandler { public function generateOutput($AhHrL); } namespace Alumentum; class ResponseFormatHandlerJson implements IResponseFormatHandler { public function generateOutput($AhHrL) { return json_encode($AhHrL); } } namespace Alumentum; class Router { protected $routes = array(); protected $namespace = ''; protected $ignoreUriTrailingSlash = false; public function addRoutes(array $M6fNV) { if (empty($this->routes)) { goto O0FYK; } $this->routes = array_merge($this->routes, $M6fNV); goto b1vgL; O0FYK: $this->routes = $M6fNV; b1vgL: } public function setIgnoreUriTrailingSlash($JqJy2) { $this->ignoreUriTrailingSlash = $JqJy2; } public function setNamespace($JZE13) { $this->namespace = $JZE13; } public function getNamespace() { return $this->namespace; } protected function generateRegExpFromUriPattern($TjWA0) { $cNacg = array(); preg_match_all("#\{(?P<name>\w+):(?P<type>\w+|\*)(?:\((?P<param>.+?)\))?\}#", $TjWA0, $cNacg, PREG_SET_ORDER); $de3YX = array("{*}"); $bV75g = array(".*?"); foreach ($cNacg as $Fj3Fc) { $de3YX[] = $Fj3Fc[0]; switch ($Fj3Fc["type"]) { case "num": $bV75g[] = "(?P<" . $Fj3Fc["name"] . ">[0-9]+)"; goto Ey9U1; case "alpha": $bV75g[] = "(?P<" . $Fj3Fc["name"] . ">[a-zA-Z]+)"; goto Ey9U1; case "alnum": $bV75g[] = "(?P<" . $Fj3Fc["name"] . ">[a-zA-Z0-9]+)"; goto Ey9U1; case "enum": if (preg_match("/^[a-zA-Z0-9_-]+(?:\|[a-zA-Z0-9_-]+)*$/", $Fj3Fc["param"])) { goto jVvpl; } throw new \Exception("Hibas enum tipus: " . $Fj3Fc["param"]); jVvpl: $bV75g[] = "(?P<" . $Fj3Fc["name"] . ">" . $Fj3Fc["param"] . ")"; goto Ey9U1; case "regexp": $bV75g[] = "(?P<" . $Fj3Fc["name"] . ">" . str_replace("#", "\#", $Fj3Fc["param"]) . ")"; goto Ey9U1; case "any": $bV75g[] = "(?P<" . $Fj3Fc["name"] . ">[^/]+)"; goto Ey9U1; case "*": $bV75g[] = "(?P<" . $Fj3Fc["name"] . ">.*?)"; goto Ey9U1; default: throw new \Exception("Ismeretlen routing parameter tipus: " . $Fj3Fc["type"]); } iXMQh: Ey9U1: q8sCt: } gDVVP: return "#^" . str_replace($de3YX, $bV75g, $TjWA0) . "$#"; } public function getRouteHandler($TjWA0, $UXc0i = "GET", $tGICc = true) { if (!$this->ignoreUriTrailingSlash) { goto UKYyR; } $TjWA0 = rtrim($TjWA0, "/"); UKYyR: $cNacg = array(); $NJuGc = null; foreach ($this->routes as $p5Lm2 => $g_c2o) { if (!($g_c2o[0] === "[")) { goto trTP9; } list($U44ST, $g_c2o) = explode("]", substr($g_c2o, 1), 2); if (!($U44ST !== $UXc0i)) { goto szWG6; } goto z0Xpo; szWG6: trTP9: $Wv4q9 = strpos($g_c2o, "{"); if ($Wv4q9 === false) { goto AJ7jx; } if (!(strncmp($TjWA0, $g_c2o, $Wv4q9) === 0)) { goto qZSWd; } $Hpjyk = $this->generateRegExpFromUriPattern($g_c2o); if (!preg_match($Hpjyk, $TjWA0, $cNacg)) { goto r3Tl9; } $NJuGc = $p5Lm2; foreach ($cNacg as $p5e6p => $mCvrK) { if (!is_int($p5e6p)) { goto NpjKy; } unset($cNacg[$p5e6p]); NpjKy: ZONoJ: } r_rXX: goto R0hgU; r3Tl9: qZSWd: goto v3kCZ; AJ7jx: if (!($TjWA0 === $g_c2o)) { goto XAJar; } $NJuGc = $p5Lm2; goto R0hgU; XAJar: v3kCZ: z0Xpo: } R0hgU: if (empty($NJuGc)) { goto RdSJ6; } list($qKnWr, $DcRAY) = explode("/", $NJuGc); return array("controller" => (!empty($this->namespace) && $tGICc ? $this->namespace . "\" : '') . $qKnWr, "action" => $DcRAY, "params" => $cNacg); goto lsDaz; RdSJ6: return null; lsDaz: } public function generateUrl($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { if (isset($this->routes[$p5Lm2])) { goto wm6V3; } throw new \Exception("Nem letezik a kovetkezo route kezelo: " . $p5Lm2); wm6V3: $TjWA0 = $this->routes[$p5Lm2]; if (!($TjWA0[0] === "[")) { goto uLY00; } $TjWA0 = substr($TjWA0, strpos($TjWA0, "]") + 1); uLY00: if (!(strpos($TjWA0, "{") !== false)) { goto axHCM; } if (empty($u6GFy)) { goto W4pDu; } foreach ($u6GFy as $n1oX6 => $zmRXc) { $TjWA0 = preg_replace("#\{" . $n1oX6 . ":(?:\w+|\*)(?:\((.+?)\))?\}#", $zmRXc, $TjWA0); cxU5z: } Cj9cx: W4pDu: if (!(strpos($TjWA0, "{") !== false)) { goto em2bL; } throw new \Exception("Nincs megadva minden route parameter (" . $p5Lm2 . ")"); em2bL: axHCM: return $TjWA0 . (empty($wyQsJ) ? '' : "?" . http_build_query($wyQsJ)) . (empty($oA9V3) ? '' : "#" . $oA9V3); } } namespace Alumentum; class RedirectException extends \Exception { } namespace Alumentum; class PageNotFoundException extends \Exception { } namespace Alumentum; abstract class ControllerAbstract { const PARAM_PATTERN = "/\xa @param\xa \x9\s+\xa\x9 (?P<type>\w+)
(?::(?<method>[UGPC]{1,4}))?\xa\x9 (?:\/(?<initAction>t))?
\x9 \s+
\x9\x9(?P<isReference>&)?\xa\x9 \$(?P<name>\w+)\xa \x9/x"; protected $request; protected $response; protected $router; public function __construct(Request $RtklE, Response $cYK4f, Router $JGqH2) { $this->request = $RtklE; $this->response = $cYK4f; $this->router = $JGqH2; } protected function preDispatch($DcRAY) { return true; } protected function getCommentParameters($aiYau) { $A6Df_ = array(); $Y0OLK = array(); preg_match_all(self::PARAM_PATTERN, $aiYau, $Y0OLK, PREG_SET_ORDER); foreach ($Y0OLK as $Fj3Fc) { $A6Df_[$Fj3Fc["name"]] = array("type" => $Fj3Fc["type"], "method" => $Fj3Fc["method"], "initAction" => $Fj3Fc["initAction"], "isReference" => !empty($Fj3Fc["isReference"])); BVFK8: } v9wsU: return $A6Df_; } protected function getArguments($Nc_3k) { $a2cAg = new \ReflectionMethod($this, $Nc_3k); $cNacg = $a2cAg->getParameters(); $M8AdO = $a2cAg->getDocComment(); if (!($M8AdO === false)) { goto eyk80; } throw new \Exception("A metodus nincs dokumentalva: " . get_class($this) . "->" . $Nc_3k . "()"); eyk80: $vJ9Z1 = $this->getCommentParameters($M8AdO); $lyToz = array(); foreach ($cNacg as $Fj3Fc) { $EMrXw = $Fj3Fc->getName(); $mCvrK = empty($vJ9Z1[$EMrXw]["method"]) ? $this->request->get($EMrXw) : $this->request->get($EMrXw, $vJ9Z1[$EMrXw]["method"]); if ($mCvrK !== null) { goto P2lVM; } if ($Fj3Fc->isOptional()) { goto f96iZ; } throw new \Exception("Nincs megadva egy kotelezo parameter erteke: " . get_class($this) . "->" . $Nc_3k . "() : $" . $EMrXw); f96iZ: $mCvrK = $Fj3Fc->getDefaultValue(); goto GufeR; P2lVM: if (isset($vJ9Z1[$EMrXw]["type"])) { goto SxyNn; } throw new \Exception("A parameternek nincs (vagy hibas a megadott) tipusa: " . get_class($this) . "->" . $Nc_3k . "() : $" . $EMrXw); SxyNn: $izSho = $vJ9Z1[$EMrXw]["type"]; if (!in_array($izSho, array("bool", "int", "float", "string", "array"))) { goto quFh0; } settype($mCvrK, $izSho); quFh0: if (!($izSho == "string" && $vJ9Z1[$EMrXw]["initAction"] == "t")) { goto GIhLg; } $mCvrK = trim($mCvrK); GIhLg: GufeR: $lyToz[] = $mCvrK; iRnkB: } ahdpr: return $lyToz; } public function dispatch($DcRAY) { ob_start(); try { if (!($this->preDispatch($DcRAY) !== false)) { goto M3P_6; } $Nc_3k = "do" . $DcRAY; $A6Df_ = call_user_func_array(array($this, $Nc_3k), $this->getArguments($Nc_3k)); if (!($A6Df_ !== null)) { goto cG7w7; } if ($A6Df_ instanceof TemplateAbstract) { goto aunsV; } echo $this->response->generateOutput($A6Df_); goto H2eah; aunsV: $A6Df_->render(); H2eah: cG7w7: M3P_6: } catch (\Exception $VJ0SS) { ob_end_clean(); throw $VJ0SS; } $this->response->appendToContent(ob_get_clean()); } protected function generateUrl($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { return $this->router->generateUrl($p5Lm2, $u6GFy, $wyQsJ, $oA9V3); } protected function redirectToUrl($qHQZy, array $wyQsJ = array()) { if (empty($wyQsJ)) { goto RlaJN; } $qHQZy .= (strpos($qHQZy, "?") !== false ? ini_get("arg_separator.output") : "?") . http_build_query($wyQsJ); RlaJN: $this->response->setContent(''); $UcKdL = $this->request->getReferrer(); if (empty($UcKdL)) { goto ESNX0; } $this->response->setHeader("Referer", $UcKdL); ESNX0: $this->response->setHeader("Location", $qHQZy); throw new RedirectException(); } protected function redirectToRoute($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { $this->redirectToUrl($this->generateUrl($p5Lm2, $u6GFy, $wyQsJ, $oA9V3)); } protected function forwardTo404() { throw new PageNotFoundException(); } protected function forwardTo404If($QlDGX) { if (!$QlDGX) { goto W3H8R; } $this->forwardTo404(); W3H8R: } } namespace Alumentum; class ClassLoaderPool { private $classLoaders = array(); public function __construct() { spl_autoload_register(array($this, "loadClass")); } public function __destruct() { spl_autoload_unregister(array($this, "loadClass")); } public function addClassLoader(IClassLoader $zd33n) { $this->classLoaders[] = $zd33n; } public function removeClassLoader(IClassLoader $zd33n) { $wl7tJ = array_search($zd33n, $this->classLoaders, true); if (!($wl7tJ !== false)) { goto OnAU5; } unset($this->classLoaders[$wl7tJ]); OnAU5: } public function reset() { foreach ($this->classLoaders as $zd33n) { $zd33n->reset(); s1Vnm: } N56TI: } public function loadClass($dcDkQ) { $JKGEt = false; foreach ($this->classLoaders as $zd33n) { $zd33n->loadClass($dcDkQ); $JKGEt = class_exists($dcDkQ, false) || interface_exists($dcDkQ, false) || trait_exists($dcDkQ, false); if (!$JKGEt) { goto kD59O; } goto fDM4W; kD59O: CovT2: } fDM4W: if ($JKGEt) { goto YjR_Z; } Events::triggerEvent("system.events.class_not_found", array($dcDkQ)); YjR_Z: } } namespace Alumentum; class ErrorHandlerPool { protected $debugConsole = null; const STRATEGY_UNIQUE_ERRORS = 1; const STRATEGY_GROUP_USER_ERRORS = 2; const STRATEGY_GROUP_SYSTEM_ERRORS = 3; const STRATEGY_GROUP_ALL_ERRORS = 4; protected $strategy = self::STRATEGY_GROUP_SYSTEM_ERRORS; protected $groupTime = 300; protected $errorHandlers = array(); protected $lastErrorId = null; public function __construct() { set_error_handler(array($this, "handleError")); set_exception_handler(array($this, "handleException")); register_shutdown_function(array($this, "handleFatalError")); } public function __destruct() { restore_error_handler(); restore_exception_handler(); } public function setStrategy($xccAZ) { $this->strategy = $xccAZ; } public function setGroupTime($h5H6Y) { $this->groupTime = $h5H6Y; } public function setDebugConsole(DebugConsole $LLwXX) { $this->debugConsole = $LLwXX; } public function addErrorHandler(ErrorHandlerAbstract $FAxMQ) { $this->errorHandlers[] = $FAxMQ; } public function removeErrorHandler(ErrorHandlerAbstract $FAxMQ) { $wl7tJ = array_search($FAxMQ, $this->errorHandlers, true); if (!($wl7tJ !== false)) { goto xspWk; } unset($this->errorHandlers[$wl7tJ]); xspWk: } public function removeAllErrorHandlers() { $this->errorHandlers = array(); } public function handleError($dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch) { if (!(($dnbH6 & error_reporting()) === 0 && $dnbH6 !== ErrorHandlerAbstract::E_EXCEPTION)) { goto l1IpT; } return true; l1IpT: $Sba0r = time(); $v_QMR = (bool) ($dnbH6 & (E_USER_DEPRECATED | E_USER_NOTICE | E_USER_WARNING | E_USER_ERROR | ErrorHandlerAbstract::E_EXCEPTION)); switch ($this->strategy) { case self::STRATEGY_UNIQUE_ERRORS: $this->lastErrorId = hash("md5", $dnbH6 . "|" . $CBRMl . "|" . $oHn6t . "|" . $CJfhk . "|" . mt_rand()); goto HEidD; case self::STRATEGY_GROUP_ALL_ERRORS: $this->lastErrorId = hash("md5", $dnbH6 . "|" . $CBRMl . "|" . $oHn6t . "|" . $CJfhk . "|" . floor($Sba0r / $this->groupTime)); goto HEidD; case self::STRATEGY_GROUP_USER_ERRORS: $this->lastErrorId = hash("md5", $dnbH6 . "|" . $CBRMl . "|" . $oHn6t . "|" . $CJfhk . "|" . ($v_QMR ? floor($Sba0r / $this->groupTime) : mt_rand())); goto HEidD; default: case self::STRATEGY_GROUP_SYSTEM_ERRORS: $this->lastErrorId = hash("md5", $dnbH6 . "|" . $CBRMl . "|" . $oHn6t . "|" . $CJfhk . "|" . ($v_QMR ? mt_rand() : floor($Sba0r / $this->groupTime))); goto HEidD; } wmKJf: HEidD: foreach ($this->errorHandlers as $FAxMQ) { $FAxMQ->handleError($this->lastErrorId, $dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch, $Sba0r); DYQWD: } P4adj: if (!($this->debugConsole !== null)) { goto XHyKl; } $this->debugConsole->logError($dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch); XHyKl: return ini_get("display_errors") != "0"; } public function handleException(\Throwable $VJ0SS) { $this->handleError(ErrorHandlerAbstract::E_EXCEPTION, $VJ0SS->getMessage(), $VJ0SS->getFile(), $VJ0SS->getLine(), array("code" => $VJ0SS->getCode(), "trace" => $VJ0SS->getTrace())); } public function handleFatalError() { $JcnAN = error_get_last(); if (!(!empty($JcnAN) && in_array($JcnAN["type"], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR)))) { goto zh7Oq; } $this->handleError($JcnAN["type"], $JcnAN["message"], $JcnAN["file"], $JcnAN["line"], array()); if (!($this->debugConsole !== null && !$this->debugConsole->isDisplayed())) { goto oUSua; } $this->debugConsole->display(); oUSua: zh7Oq: } public function getLastErrorId() { return $this->lastErrorId; } } namespace Alumentum; class Application { protected $request = null; protected $response = null; protected $router = null; protected $classLoaderPool; protected $errorHandlerPool; protected $errorController = "Error"; protected $debugConsole = null; private static $instance = null; private function __construct() { $this->classLoaderPool = new ClassLoaderPool(); $this->errorHandlerPool = new ErrorHandlerPool(); } private function __clone() { } public static function getInstance() { if (!(self::$instance === null)) { goto o3G4f; } self::$instance = new static(); o3G4f: return self::$instance; } public function getRequest() { if (!($this->request === null)) { goto A94QH; } $this->request = new Request(); A94QH: return $this->request; } public function setRequest(Request $RtklE) { $this->request = $RtklE; return $this; } public function getResponse() { if (!($this->response === null)) { goto grHa2; } $this->response = new Response(); grHa2: return $this->response; } public function setResponse(Response $cYK4f) { $this->response = $cYK4f; return $this; } public function getRouter() { if (!($this->router === null)) { goto pHc0h; } $this->router = new Router(); pHc0h: return $this->router; } public function setRouter(Router $JGqH2) { $this->router = $JGqH2; return $this; } public function getClassLoaderPool() { return $this->classLoaderPool; } public function addClassLoader(IClassLoader $zd33n) { $this->classLoaderPool->addClassLoader($zd33n); return $this; } public function removeClassLoader(IClassLoader $zd33n) { $this->classLoaderPool->removeClassLoader($zd33n); return $this; } public function getErrorHandlerPool() { return $this->errorHandlerPool; } public function addErrorHandler(ErrorHandlerAbstract $FAxMQ) { $this->errorHandlerPool->addErrorHandler($FAxMQ); return $this; } public function removeErrorHandler(ErrorHandlerAbstract $FAxMQ) { $this->errorHandlerPool->removeErrorHandler($FAxMQ); return $this; } public function removeAllErrorHandlers() { $this->errorHandlerPool->removeAllErrorHandlers(); return $this; } public function setErrorController($juQti) { $this->errorController = $juQti; return $this; } public function getDebugConsole() { return $this->debugConsole; } public function setDebugConsole(DebugConsole $LLwXX) { $this->debugConsole = $LLwXX; $this->errorHandlerPool->setDebugConsole($LLwXX); Events::addEventListener("system.after_send_response", array($this->debugConsole, "display")); return $this; } protected function dispatch($doydK, $DcRAY) { $qKnWr = new $doydK($this->request, $this->response, $this->router); try { $qKnWr->dispatch($DcRAY); } catch (RedirectException $VJ0SS) { } catch (PageNotFoundException $VJ0SS) { $this->response->clear(); $this->response->setHttpStatusCode(404); $this->dispatch($this->errorController . "Controller", "404"); } catch (\Exception $VJ0SS) { $this->errorHandlerPool->handleException($VJ0SS); $this->response->clear(); $this->response->setHttpStatusCode(500); $this->request->set("e", $VJ0SS); $this->dispatch($this->errorController . "Controller", "500"); } } public function run(array $lTuP1, $cVhrz = true) { $RtklE = $this->getRequest(); $cYK4f = $this->getResponse(); $JGqH2 = $this->getRouter(); $JGqH2->addRoutes($lTuP1); Events::triggerEvent("system.events.init_done"); $NJuGc = $JGqH2->getRouteHandler($RtklE->getUri(), $RtklE->getMethod()); if (!($NJuGc === null)) { goto BOFWO; } $cYK4f->clear(); $cYK4f->setHttpStatusCode(404); $NJuGc = array("controller" => $this->errorController, "action" => "404", "params" => array()); BOFWO: foreach ($NJuGc["params"] as $n1oX6 => $zmRXc) { $RtklE->set($n1oX6, urldecode($zmRXc)); qIOWx: } FOMyr: $this->dispatch($NJuGc["controller"] . "Controller", $NJuGc["action"]); if (!$cVhrz) { goto q62pN; } $cYK4f->send(); q62pN: } } namespace Alumentum; abstract class TemplateAbstract { const RENDER_CONTENT_METHOD = "renderContent"; protected $escapeMethod = array("\Alumentum\TemplateAbstract", "escapeHtml"); protected $unescapeMethod = array("\Alumentum\TemplateAbstract", "unescapeHtml"); protected $rawParams = array(); protected $params = array(); public static function escapeHtml($mCvrK) { switch (gettype($mCvrK)) { case "string": return htmlspecialchars($mCvrK); case "array": foreach ($mCvrK as $fF82p => $CPkeA) { $mCvrK[$fF82p] = self::escapeHtml($CPkeA); iXagA: } daQGo: return $mCvrK; default: return $mCvrK; } auNQe: PchuZ: } public static function unescapeHtml($mCvrK) { switch (gettype($mCvrK)) { case "string": return htmlspecialchars_decode($mCvrK); case "array": foreach ($mCvrK as $fF82p => $CPkeA) { $mCvrK[$fF82p] = self::unescapeHtml($CPkeA); EPcnC: } SFm4v: return $mCvrK; default: return $mCvrK; } IQMX4: esHHf: } public function setEscapeMethod($Ni8KF) { $this->escapeMethod = $Ni8KF; } public function setUnescapeMethod($IsuPO) { $this->unescapeMethod = $IsuPO; } protected function escape($mCvrK) { return empty($this->escapeMethod) ? $mCvrK : call_user_func($this->escapeMethod, $mCvrK); } protected function unescape($mCvrK) { return empty($this->unescapeMethod) ? $mCvrK : call_user_func($this->unescapeMethod, $mCvrK); } public function has($EMrXw) { return isset($this->params[$EMrXw]); } public function get($EMrXw) { return $this->params[$EMrXw]; } protected function getRaw($EMrXw) { return $this->rawParams[$EMrXw]; } public function set($EMrXw, $mCvrK) { $this->rawParams[$EMrXw] = $mCvrK; $this->params[$EMrXw] = $this->escape($mCvrK); } protected function clearParams() { $this->rawParams = array(); $this->params = array(); } protected function _($NnBmC, array $cNacg = array()) { return I18n::getInstance()->getTranslation($NnBmC, $cNacg); } protected function setDefaultParamValues() { $a2cAg = new \ReflectionMethod($this, self::RENDER_CONTENT_METHOD); $cNacg = $this->rawParams; $this->clearParams(); foreach ($a2cAg->getParameters() as $Fj3Fc) { $EMrXw = $Fj3Fc->getName(); if (array_key_exists($EMrXw, $cNacg)) { goto x_kvk; } if ($Fj3Fc->isOptional()) { goto xI1GO; } throw new \Exception("Nincs megadva egy kotelezo template parameter erteke: " . get_class($this) . "->" . self::RENDER_CONTENT_METHOD . "() : $" . $EMrXw); goto WXfSV; x_kvk: $this->set($EMrXw, $cNacg[$EMrXw]); unset($cNacg[$EMrXw]); goto NSyx0; goto WXfSV; xI1GO: $this->set($EMrXw, $Fj3Fc->getDefaultValue()); WXfSV: NSyx0: } hXi2R: if (empty($cNacg)) { goto Uai5b; } foreach ($cNacg as $EMrXw => $mCvrK) { $this->set($EMrXw, $mCvrK); O8H0r: } CG4lY: Uai5b: } public function render() { $this->setDefaultParamValues(); call_user_func_array(array($this, self::RENDER_CONTENT_METHOD), $this->params); } public function __toString() { ob_start(); $this->render(); return ob_get_clean(); } } namespace Alumentum; class TemplateBlock extends TemplateAbstract { protected $layout = null; public function setLayout(Layout $nEx6y) { $this->layout = $nEx6y; } protected function renderBlock(TemplateBlock $ipmc1, array $cNacg = array()) { if (!($this->layout !== null)) { goto VYZ66; } $ipmc1->setLayout($this->layout); VYZ66: foreach ($cNacg as $EMrXw => $mCvrK) { $ipmc1->set($EMrXw, $this->unescape($mCvrK)); bGN5B: } x6uiz: $ipmc1->render(); } } namespace Alumentum; class Template extends TemplateBlock { public function render() { if ($this->layout !== null) { goto yhmNs; } parent::render(); goto i7iOb; yhmNs: ob_start(); parent::render(); $dl6OX = ob_get_clean(); $this->layout->setInnerContent($dl6OX); $this->layout->render(); i7iOb: } } namespace Alumentum; class Layout extends TemplateAbstract { private $innerContent = ''; protected $title = array(); protected $titleSeparator = " - "; protected $metas = array(); protected $propertyMetas = array(); protected $httpMetas = array(); protected $links = array(); protected $headerJavaScripts = array(); protected $headerJavaScriptConditions = array(); protected $footerJavaScripts = array(); protected $styleSheets = array(); protected $styleSheetConditions = array(); protected $activeSlotNames = array(); protected $slots = array(); public function setInnerContent($dl6OX) { $this->innerContent = $dl6OX; } protected function renderInnerContent() { echo $this->innerContent; } public function setTitleSeparator($qOMqM) { $this->titleSeparator = $qOMqM; } public function prependToTitle($pZKts) { array_unshift($this->title, $pZKts); } public function appendToTitle($pZKts) { $this->title[] = $pZKts; } public function setTitle($gG2lm) { $this->title = array($gG2lm); } protected function renderTitle() { echo "<title>" . implode($this->titleSeparator, $this->title) . "</title>"; } public function addMeta($EMrXw, $dl6OX, $B0mTj = true) { if ($B0mTj || !isset($this->metas[$EMrXw])) { goto srZvE; } $this->metas[$EMrXw] .= $dl6OX; goto Gp1TZ; srZvE: $this->metas[$EMrXw] = $dl6OX; Gp1TZ: } protected function renderMetas() { $A6Df_ = ''; foreach ($this->metas as $EMrXw => $dl6OX) { $A6Df_ .= "<meta name="" . $EMrXw . "" content="" . $dl6OX . "" />" . "\xa"; VxJfm: } xuuR2: echo $A6Df_; } public function addPropertyMeta($EMrXw, $dl6OX, $B0mTj = true) { if ($B0mTj || !isset($this->propertyMetas[$EMrXw])) { goto yfcBU; } $this->propertyMetas[$EMrXw] .= $dl6OX; goto BzqCl; yfcBU: $this->propertyMetas[$EMrXw] = $dl6OX; BzqCl: } protected function renderPropertyMetas() { $A6Df_ = ''; foreach ($this->propertyMetas as $EMrXw => $dl6OX) { $A6Df_ .= "<meta property="" . $EMrXw . "" content="" . $dl6OX . "" />" . "
"; Npt_N: } vEg0u: echo $A6Df_; } public function addHttpMeta($EMrXw, $dl6OX, $B0mTj = true) { if ($B0mTj || !isset($this->httpMetas[$EMrXw])) { goto yrGUv; } $this->httpMetas[$EMrXw] .= $dl6OX; goto IrRVU; yrGUv: $this->httpMetas[$EMrXw] = $dl6OX; IrRVU: } protected function renderHttpMetas() { $A6Df_ = ''; foreach ($this->httpMetas as $EMrXw => $dl6OX) { $A6Df_ .= "<meta http-equiv="" . $EMrXw . "" content="" . $dl6OX . "" />" . "\xa"; GS0cc: } kgBtD: echo $A6Df_; } public function addLink($W6KqI, $OOnpL, $izSho = '', $gG2lm = '', $CQArO = '', $e640m = '') { $this->links[] = array("href" => $W6KqI, "rel" => $OOnpL, "type" => $izSho, "title" => $gG2lm, "sizes" => $CQArO, "hreflang" => $e640m); } protected function renderLinks() { $A6Df_ = ''; foreach ($this->links as $DvIry) { $A6Df_ .= "<link rel="" . $DvIry["rel"] . "" href="" . $DvIry["href"] . """ . (empty($DvIry["type"]) ? '' : " type="" . $DvIry["type"] . """) . (empty($DvIry["title"]) ? '' : " title="" . $DvIry["title"] . """) . (empty($DvIry["sizes"]) ? '' : " sizes="" . $DvIry["sizes"] . """) . (empty($DvIry["hreflang"]) ? '' : " hreflang="" . $DvIry["hreflang"] . """) . " />" . "\xa"; yIXiR: } nQBBE: echo $A6Df_; } public function addHeaderJavaScript($oHn6t, $QlDGX = '') { if (empty($QlDGX)) { goto tj8xf; } $this->headerJavaScriptConditions[$oHn6t] = $QlDGX; tj8xf: $this->headerJavaScripts[] = $oHn6t; } protected function renderHeaderJavaScripts() { $A6Df_ = ''; foreach (array_unique($this->headerJavaScripts) as $oHn6t) { if (!empty($this->headerJavaScriptConditions[$oHn6t])) { goto AEFnp; } $A6Df_ .= "<script type="text/javascript" src="" . $oHn6t . ""></script>" . PHP_EOL; goto giaDU; AEFnp: $A6Df_ .= "<!--[if " . $this->headerJavaScriptConditions[$oHn6t] . "]><script type="text/javascript" src="" . $oHn6t . ""></script><![endif]-->" . PHP_EOL; giaDU: S6hij: } oD0UR: echo $A6Df_; } public function addFooterJavaScript($oHn6t) { $this->footerJavaScripts[] = $oHn6t; } protected function renderFooterJavaScripts() { $A6Df_ = ''; foreach (array_unique($this->footerJavaScripts) as $oHn6t) { $A6Df_ .= "<script type="text/javascript" src="" . $oHn6t . ""></script>" . "\xa"; nrRlb: } kHlCk: echo $A6Df_; } public function addStyleSheet($oHn6t, $QlDGX = '') { if (empty($QlDGX)) { goto LZOaJ; } $this->styleSheetConditions[$oHn6t] = $QlDGX; LZOaJ: $this->styleSheets[] = $oHn6t; } protected function renderStyleSheets() { $A6Df_ = ''; foreach (array_unique($this->styleSheets) as $oHn6t) { if (!empty($this->styleSheetConditions[$oHn6t])) { goto LIEia; } $A6Df_ .= "<link rel="stylesheet" type="text/css" href="" . $oHn6t . "" />" . PHP_EOL; goto hG3ek; LIEia: $A6Df_ .= "<!--[if " . $this->styleSheetConditions[$oHn6t] . "]><link rel="stylesheet" type="text/css" href="" . $oHn6t . "" /><![endif]-->" . PHP_EOL; hG3ek: ojnKX: } Pula3: echo $A6Df_; } public function beginSlot($EMrXw) { array_push($this->activeSlotNames, $EMrXw); ob_start(); } public function endSlot($B2A1A = false) { $Txn_h = array_pop($this->activeSlotNames); if (!($Txn_h === null)) { goto qIjB4; } return; qIjB4: if (!isset($this->slots[$Txn_h]) || !$B2A1A) { goto usp7k; } $this->slots[$Txn_h] .= ob_get_clean(); goto Cm203; usp7k: $this->slots[$Txn_h] = ob_get_clean(); Cm203: } public function hasSlot($EMrXw) { return isset($this->slots[$EMrXw]); } public function renderSlot($EMrXw) { echo isset($this->slots[$EMrXw]) ? $this->slots[$EMrXw] : ''; } protected function renderBlock(TemplateBlock $ipmc1, array $cNacg = array()) { foreach ($cNacg as $EMrXw => $mCvrK) { $ipmc1->set($EMrXw, $this->unescape($mCvrK)); NRYaB: } JdBuU: $ipmc1->render(); } } namespace Alumentum; abstract class AbstractConnection { protected $pdo; protected $database; protected $username; protected $password; protected $host; protected $port; protected $debugConsole = null; protected $params; protected $lastUsedTimestamp = null; public function __construct($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, array $cNacg = array()) { $cNacg[\PDO::ATTR_ERRMODE] = \PDO::ERRMODE_EXCEPTION; $this->database = $hwv4R; $this->username = $y9VTC; $this->password = $DeoAY; $this->host = $NcgPG; $this->port = $VtVxF; $this->params = $cNacg; $this->connect(); } public function setDebugConsole(DebugConsole $LLwXX) { $this->debugConsole = $LLwXX; } protected abstract function connect(); public function query($LMXXm, array $cNacg = array()) { if (!$this->isLastUsedTimeLimitExceeded(Config::get("database.connection.timeoutSeconds", 20))) { goto KSvgb; } trigger_error("Kapcsolat ujranyitasa nyitvatartasi idotullepes miatt", E_USER_NOTICE); $this->connect(); KSvgb: $hnhD9 = 0; if (!($this->debugConsole !== null && !$this->filteredQuery($LMXXm))) { goto xbFgu; } $Op1dN = $this->getLogParams($cNacg); $hnhD9 = $this->debugConsole->logDbQuery($LMXXm, $Op1dN); xbFgu: $pN6Rx = $this->pdo->prepare($LMXXm); foreach ($cNacg as $p5e6p => $mCvrK) { $PGG9t = is_int($p5e6p) ? $p5e6p + 1 : ":" . $p5e6p; if (is_string($mCvrK)) { goto F8VnP; } if ($mCvrK === null) { goto LnH4r; } if (is_bool($mCvrK)) { goto tiYe3; } if (is_float($mCvrK)) { goto Eg6U9; } $izSho = \PDO::PARAM_INT; goto Cxcj_; F8VnP: $izSho = \PDO::PARAM_STR; goto Cxcj_; LnH4r: $izSho = \PDO::PARAM_NULL; goto Cxcj_; tiYe3: $izSho = \PDO::PARAM_INT; $mCvrK = (int) $mCvrK; goto Cxcj_; Eg6U9: $izSho = \PDO::PARAM_STR; Cxcj_: $pN6Rx->bindValue($PGG9t, $mCvrK, $izSho); D3f5c: } BLzJI: $gjh5D = microtime(true); $pN6Rx->execute(); $this->updateLastUsedTimestamp(); $gZdvn = microtime(true) - $gjh5D; if (!($this->debugConsole !== null)) { goto po038; } $this->debugConsole->logDbQueryExecutionTime($hnhD9, $gZdvn); po038: $gpiBF = Config::get("database.longExecutionTimeLimit", 0); if (!($gpiBF > 0 && $gZdvn * 1000 > $gpiBF)) { goto h3qSJ; } trigger_error("Hosszu query fut\xc3\xa1s: " . $gZdvn . "ms", E_USER_NOTICE); h3qSJ: return new DbResult($pN6Rx); } public abstract function queryPaged($LMXXm, array $cNacg, $Bb8eI, $rA4yF, &$oFS50 = false); public function beginTransaction() { $this->pdo->beginTransaction(); } public function commitTransaction() { $this->pdo->commit(); } public function rollBackTransaction($fW8dX = false) { $this->pdo->rollBack(); } public function quote($mCvrK) { if (is_string($mCvrK)) { goto qYI6h; } if ($mCvrK === null) { goto KiUnA; } if (is_bool($mCvrK)) { goto LTBBk; } $izSho = \PDO::PARAM_INT; goto klwLd; qYI6h: $izSho = \PDO::PARAM_STR; goto klwLd; KiUnA: $izSho = \PDO::PARAM_NULL; goto klwLd; LTBBk: $izSho = \PDO::PARAM_INT; $mCvrK = (int) $mCvrK; klwLd: return $this->pdo->quote($mCvrK, $izSho); } public function ping() { try { $this->query("SELECT 1"); } catch (\Exception $VJ0SS) { $this->connect(); } } public function getErrorCode() { return $this->pdo->errorCode(); } public function getErrorInfo() { return $this->pdo->errorInfo(); } public function isLastUsedTimeLimitExceeded($NvGTE) { return $this->lastUsedTimestamp !== null && $this->lastUsedTimestamp + $NvGTE < time(); } protected function updateLastUsedTimestamp() { $this->lastUsedTimestamp = time(); } protected function getLogParams($cNacg) { $A6Df_ = array(); foreach ($cNacg as $EMrXw => $mCvrK) { $A6Df_[$EMrXw] = substr($mCvrK, 0, 1000); if (!($mCvrK != $A6Df_[$EMrXw])) { goto oel2D; } $A6Df_[$EMrXw] .= "(...)"; oel2D: yLgcq: } LpnNX: return $A6Df_; } protected function filteredQuery($LMXXm) { return empty($LMXXm) || preg_match("/INSERT\s+INTO\s*`?error_log[`\s]/i", $LMXXm); } } namespace Alumentum; class Db { const TYPE_READ_ONLY = "ro"; const TYPE_READ_WRITE = "rw"; const ORDER_ASC = "ASC"; const ORDER_DESC = "DESC"; const DATE_FORMAT = "Y-m-d"; const TIME_FORMAT = "H:i:s"; const TIMESTAMP_FORMAT = "Y-m-d H:i:s"; const DB_TYPE_MYSQL = "mysql"; const DB_TYPE_PGSQL = "pgsql"; private $connections = array(); private static $instance = null; public static function getInstance() { if (!(self::$instance === null)) { goto BJH7a; } self::$instance = new static(); BJH7a: return self::$instance; } public static function getCurrentTimestamp() { return date(self::TIMESTAMP_FORMAT); } public static function getCurrentTime() { return date(self::TIME_FORMAT); } public static function getCurrentDate() { return date(self::DATE_FORMAT); } private function __construct() { } private function __clone() { } private function getReplicatedConnectionNames($DtQ3r, $izSho) { $qGvt8 = Config::get("database.replication." . $DtQ3r . "." . $izSho); if (!empty($qGvt8)) { goto C0V4l; } return array(); C0V4l: if (strpos($qGvt8, ",") !== false) { goto q8EPn; } $qGvt8 = array($qGvt8); goto DGZHy; q8EPn: $qGvt8 = array_map("trim", explode(",", $qGvt8)); if (!(count($qGvt8) > 1 && Config::get("database.replication." . $DtQ3r . "." . $izSho . "SelectionMethod") === "random")) { goto DbYXu; } shuffle($qGvt8); DbYXu: DGZHy: return $qGvt8; } private function connect($aufVH) { $hwv4R = Config::get("database.connection." . $aufVH . ".database"); $y9VTC = Config::get("database.connection." . $aufVH . ".username"); $DeoAY = Config::get("database.connection." . $aufVH . ".password"); $NcgPG = Config::get("database.connection." . $aufVH . ".host"); $VtVxF = Config::get("database.connection." . $aufVH . ".port", false); $Jdk_3 = Config::get("database.connection." . $aufVH . ".charset"); $cNacg = Config::get("database.connection." . $aufVH . ".params", array()); $izSho = Config::get("database.connection." . $aufVH . ".type", self::DB_TYPE_PGSQL); if (isset($hwv4R, $y9VTC, $DeoAY, $NcgPG)) { goto RXmF8; } throw new \PDOException("Nincs megadva a(z) "" . $aufVH . "" adatbazis kapcsolat minden " . "kotelezo parametere [database, username, password, host]"); RXmF8: $mwC1X = 0; U1sc9: if (!($mwC1X < 3)) { goto ysut1; } try { switch ($izSho) { case self::DB_TYPE_PGSQL: return new PostgreSqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3, Config::get("database.connection." . $aufVH . ".schema")); case self::DB_TYPE_MYSQL: return new MysqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3); default: throw new \Exception("Ismeretlen kapcsolat tipus: " . $izSho); } Ohc1w: Gl2MI: } catch (\PDOException $VJ0SS) { if ($mwC1X < 2) { goto RyzbY; } throw $VJ0SS; goto P_gJy; RyzbY: usleep(10000); P_gJy: } oDtn2: $mwC1X++; goto U1sc9; ysut1: throw new \Exception("Nem kiepitheto adatbazis kapcsolat: " . $aufVH); } public static function staticConnect($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF = 0, $Jdk_3 = '', array $cNacg = array(), $izSho = self::DB_TYPE_PGSQL, $FfZAf = '') { if (isset($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF)) { goto Zs9IA; } throw new \PDOException("Nincs megadva az adatbazis kapcsolat minden kotelezo parametere"); Zs9IA: $uwSdB = null; $mwC1X = 0; cmB6c: if (!($mwC1X < 3)) { goto YX5UW; } try { switch ($izSho) { case self::DB_TYPE_PGSQL: $uwSdB = new PostgreSqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3, $FfZAf); goto D0JlU; case self::DB_TYPE_MYSQL: $uwSdB = new MysqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3); goto D0JlU; default: throw new \Exception("Ismeretlen kapcsolat tipus: " . $izSho); } G4J7T: D0JlU: if (!($uwSdB !== null && Application::getInstance()->getDebugConsole() !== null)) { goto CPA4i; } $uwSdB->setDebugConsole(Application::getInstance()->getDebugConsole()); CPA4i: } catch (\PDOException $VJ0SS) { if ($mwC1X < 2) { goto fQRVZ; } throw $VJ0SS; goto UbMGE; fQRVZ: usleep(10000); UbMGE: } if (!($uwSdB !== null)) { goto F2dbL; } goto YX5UW; F2dbL: sJuRX: $mwC1X++; goto cmB6c; YX5UW: return $uwSdB; } private function connectWithFallback(array $qGvt8) { $uwSdB = null; foreach ($qGvt8 as $aufVH) { try { $uwSdB = $this->connect($aufVH); } catch (\Exception $VJ0SS) { trigger_error("Nem sikerult a(z) "" . $aufVH . "" adatbazis kapcsolat kiepitese", E_USER_WARNING); } tpL3j: } jaK5Q: return $uwSdB; } public function getConnection($EMrXw, $izSho = self::TYPE_READ_ONLY) { if (!isset($this->connections[$EMrXw][$izSho])) { goto qJtEC; } $uwSdB = $this->connections[$EMrXw][$izSho]; if (!$uwSdB->isLastUsedTimeLimitExceeded(Config::get("database.connection.timeoutSeconds", 20))) { goto AjKvG; } unset($this->connections[$EMrXw][$izSho]); trigger_error("Kapcsolat torolve nyitvatartasi idotullepes miatt: " . $EMrXw, E_USER_NOTICE); goto sKGr3; AjKvG: return $this->connections[$EMrXw][$izSho]; sKGr3: qJtEC: $VAooq = Config::get("database.replication." . $EMrXw . ".master", '') !== ''; $PT5hW = false; $qGvt8 = $VAooq ? $this->getReplicatedConnectionNames($EMrXw, $izSho === self::TYPE_READ_ONLY ? "slave" : "master") : array($EMrXw); $uwSdB = $this->connectWithFallback($qGvt8); if (!($uwSdB === null && $VAooq && $izSho === self::TYPE_READ_ONLY)) { goto cjA0a; } $PT5hW = true; $uwSdB = $this->connectWithFallback($this->getReplicatedConnectionNames($EMrXw, "master")); cjA0a: if (!($uwSdB === null)) { goto SgOQk; } throw new \PDOException("Nem sikerult a(z) "" . $EMrXw . "" adatbazis kapcsolat kiepitese"); SgOQk: if (!(Application::getInstance()->getDebugConsole() !== null)) { goto WXotT; } $uwSdB->setDebugConsole(Application::getInstance()->getDebugConsole()); WXotT: if ($VAooq) { goto QnEHE; } $this->connections[$EMrXw][Db::TYPE_READ_ONLY] = $uwSdB; $this->connections[$EMrXw][Db::TYPE_READ_WRITE] = $uwSdB; goto myXYj; QnEHE: $this->connections[$EMrXw][$izSho] = $uwSdB; if (!($izSho === Db::TYPE_READ_ONLY && $PT5hW)) { goto WSSdy; } $this->connections[$EMrXw][Db::TYPE_READ_WRITE] = $uwSdB; WSSdy: myXYj: return $uwSdB; } } namespace Alumentum; class DbResult implements \Iterator { private $statement = null; private $row = null; private $rowIndex = -1; public function __construct(\PDOStatement $pN6Rx) { $this->statement = $pN6Rx; } public function fetchRow() { return $this->statement->fetch(\PDO::FETCH_ASSOC); } public function fetchAll($znEM0 = '') { $Gq3xm = $this->statement->fetchAll(\PDO::FETCH_ASSOC); if (!($znEM0 !== '' && isset($Gq3xm[0][$znEM0]))) { goto A0jNR; } $A6Df_ = array(); foreach ($Gq3xm as $cIsTQ) { $A6Df_[$cIsTQ[$znEM0]] = $cIsTQ; cikmB: } z4Ouk: $Gq3xm = $A6Df_; A0jNR: return $Gq3xm; } public function fetchColumn($cycy1 = 0) { return $this->statement->fetchColumn($cycy1); } public function fetchAllColumn($cycy1 = 0) { $A6Df_ = array(); in4f2: if (!(($Lpfa6 = $this->statement->fetchColumn($cycy1)) !== false)) { goto rizUh; } $A6Df_[] = $Lpfa6; goto in4f2; rizUh: return $A6Df_; } public function rowCount() { return $this->statement->rowCount(); } public function current() { if (!($this->rowIndex == -1)) { goto R7LqL; } return $this->next(); R7LqL: return $this->row; } public function key() { if (!($this->rowIndex == -1)) { goto udyTh; } $this->next(); udyTh: return $this->rowIndex; } public function next() { if (!(($this->row = $this->statement->fetch(\PDO::FETCH_ASSOC)) !== false)) { goto wFfeY; } $this->rowIndex++; wFfeY: return $this->row; } public function valid() { return $this->current() !== false; } public function rewind() { } } namespace Alumentum; class MysqlConnection extends AbstractConnection { private $transactionLevel = 0; private $nestedTransactionRollback = false; public function __construct($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF = 3306, array $cNacg = array(), $Jdk_3 = '') { $VtVxF = $VtVxF ?: 3306; if (empty($Jdk_3)) { goto J2TQr; } $cNacg[\PDO::MYSQL_ATTR_INIT_COMMAND] = "SET NAMES " . $Jdk_3; J2TQr: parent::__construct($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg); } protected function connect() { $this->pdo = new \PDO("mysql:host=" . $this->host . ";port=" . $this->port . ";dbname=" . $this->database, $this->username, $this->password, $this->params); $this->updateLastUsedTimestamp(); } public function setDatabase($hwv4R) { if (!($this->database === $hwv4R)) { goto GlEfW; } return; GlEfW: $this->database = $hwv4R; $this->query("USE " . $this->database); } public function queryPaged($LMXXm, array $cNacg, $Bb8eI, $rA4yF, &$oFS50 = false) { if (!($oFS50 !== false)) { goto CuEJl; } $LMXXm = preg_replace("/SELECT/i", "$0 SQL_CALC_FOUND_ROWS", $LMXXm, 1); CuEJl: $LMXXm .= "
\x9 LIMIT
\x9\x9\x9\x9" . (int) $rA4yF . "
OFFSET\xa\x9\x9\x9\x9" . (int) ($Bb8eI > 1 ? ($Bb8eI - 1) * $rA4yF : 0); $A6Df_ = $this->query($LMXXm, $cNacg); if (!($oFS50 !== false)) { goto sB1uP; } $oFS50 = (int) $this->query("SELECT FOUND_ROWS()")->fetchColumn(); sB1uP: return $A6Df_; } public function beginTransaction() { if (!($this->transactionLevel === 0)) { goto Gj2uh; } $this->pdo->beginTransaction(); $this->nestedTransactionRollback = false; Gj2uh: $this->transactionLevel++; $this->pdo->exec("SAVEPOINT trans" . $this->transactionLevel); } public function commitTransaction() { if (!($this->transactionLevel === 0)) { goto Hll1h; } return; Hll1h: $this->transactionLevel--; if (!($this->transactionLevel === 0)) { goto hatNz; } if (!$this->nestedTransactionRollback) { goto TqGH8; } throw new \PDOException("COMMIT sikertelen; egy beagyazott tranzakcio korabban ROLLBACK-et hivott"); TqGH8: $this->pdo->commit(); hatNz: } public function rollBackTransaction($fW8dX = false) { if (!($this->transactionLevel === 0)) { goto pCkJd; } return; pCkJd: $this->transactionLevel--; if ($this->transactionLevel === 0) { goto XsKdq; } if ($fW8dX) { goto Vk2aI; } $this->nestedTransactionRollback = true; goto EuTax; Vk2aI: $this->nestedTransactionRollback = false; $this->pdo->exec("ROLLBACK TO trans" . ($this->transactionLevel + 1)); EuTax: goto xfOaS; XsKdq: $this->pdo->rollBack(); xfOaS: } public function getLastInsertId() { return (int) $this->pdo->lastInsertId(); } public function ping() { try { $this->query("SELECT 1"); } catch (\Exception $VJ0SS) { $this->connect(); } } public function getErrorCode() { return $this->pdo->errorCode(); } public function getErrorInfo() { return $this->pdo->errorInfo(); } } namespace Alumentum; abstract class MysqlTable { protected $tableName; protected $dbConnection; protected $defaultDbConnectionName; protected function __construct(MysqlConnection $EBPEU = null) { if (!($EBPEU !== null)) { goto bWz12; } $this->dbConnection = $EBPEU; bWz12: } protected function __clone() { } public function getTableName() { return $this->tableName; } public function setTableName($wzeSX) { $this->tableName = $wzeSX; } protected function getDbConnection($izSho) { if ($this->dbConnection !== null) { goto LqUec; } return Db::getInstance()->getConnection($this->defaultDbConnectionName, $izSho); goto upqn2; LqUec: return $this->dbConnection; upqn2: } protected function quoteEntity($EMrXw) { return "`" . $EMrXw . "`"; } protected function buildSetParam($LN5do) { return $this->quoteEntity($LN5do) . " = ?"; } protected function buildWhereParam($LN5do, $FfXTh) { return $this->quoteEntity($LN5do) . " " . ($FfXTh === null ? "IS" : "=") . " ?"; } protected function buildInsertQuery(array $AhHrL) { return "
\x9\x9 INSERT INTO\xa \x9 " . $this->quoteEntity($this->tableName) . "\xa (" . implode(", ", array_map(array($this, "quoteEntity"), array_keys($AhHrL))) . ")
\x9 \x9VALUES\xa \x9 (" . substr(str_repeat("?, ", count($AhHrL)), 0, -2) . ")\xa\x9\x9"; } protected function buildInsertOnDuplicateKeyUpdateQuery(array $e396F, array $ZrHCE) { return $this->buildInsertQuery($e396F) . "
\x9\x9\x9ON DUPLICATE KEY UPDATE
\x9\x9\x9\x9" . implode(", ", array_map(array($this, "buildSetParam"), array_keys($ZrHCE))); } protected function buildInsertManyQuery(array $VEpYp, $uiTHf) { return "\xa\x9 INSERT INTO
\x9 \x9\x9" . $this->quoteEntity($this->tableName) . "
\x9 \x9(" . implode(", ", array_map(array($this, "quoteEntity"), $VEpYp)) . ")\xa \x9\x9VALUES\xa\x9\x9\x9\x9" . substr(str_repeat("(" . substr(str_repeat("?, ", count($VEpYp)), 0, -2) . "),
\x9", $uiTHf), 0, -3); } protected function buildUpdateQuery(array $AhHrL, array $OA0M6) { return "
\x9\x9UPDATE
\x9 \x9 " . $this->quoteEntity($this->tableName) . "
\x9\x9 SET\xa \x9" . implode(", ", array_map(array($this, "buildSetParam"), array_keys($AhHrL))) . "
\x9WHERE
\x9 \x9\x9" . (empty($OA0M6) ? "TRUE" : implode(" AND ", array_map(array($this, "buildWhereParam"), array_keys($OA0M6), $OA0M6))); } protected function buildDeleteQuery(array $OA0M6) { return "
\x9\x9DELETE FROM\xa\x9 \x9\x9" . $this->quoteEntity($this->tableName) . "
\x9 WHERE\xa \x9 \x9" . (empty($OA0M6) ? "TRUE" : implode(" AND ", array_map(array($this, "buildWhereParam"), array_keys($OA0M6), $OA0M6))); } protected function buildSelectQuery(array $OA0M6, array $AnN0_, $NvGTE = 0) { $LMXXm = "
\x9\x9\x9SELECT\xa\x9\x9 \x9*\xa \x9\x9FROM\xa \x9\x9 " . $this->quoteEntity($this->tableName) . "
\x9WHERE\xa\x9 \x9\x9" . (empty($OA0M6) ? "TRUE" : implode(" AND ", array_map(array($this, "buildWhereParam"), array_keys($OA0M6), $OA0M6))); foreach ($AnN0_ as $LN5do => &$qXCvR) { $qXCvR = $this->quoteEntity($LN5do) . " " . $qXCvR; oEk_r: } mtdTW: $LMXXm .= empty($AnN0_) ? '' : "\xa \x9ORDER BY
\x9\x9 " . implode(", ", $AnN0_); $LMXXm .= $NvGTE <= 0 ? '' : "\xa\x9\x9 LIMIT " . $NvGTE; return $LMXXm; } public function insert(array $AhHrL, &$aBS3L = false) { $X8Xns = $this->getDbConnection(Db::TYPE_READ_WRITE); $X8Xns->query($this->buildInsertQuery($AhHrL), array_values($AhHrL)); if (!($aBS3L !== false)) { goto K2PdL; } $aBS3L = $X8Xns->getLastInsertId(); K2PdL: } public function insertOnDuplicateKeyUpdate(array $e396F, array $ZrHCE, &$aBS3L = false) { $X8Xns = $this->getDbConnection(Db::TYPE_READ_WRITE); $X8Xns->query($this->buildInsertOnDuplicateKeyUpdateQuery($e396F, $ZrHCE), array_merge(array_values($e396F), array_values($ZrHCE))); if (!($aBS3L !== false)) { goto ncFeU; } $aBS3L = $X8Xns->getLastInsertId(); ncFeU: } public function insertMany(array $VEpYp, array $Gq3xm) { if (!empty($Gq3xm)) { goto OZopK; } trigger_error("User beszurando elem tomb az insertMany()-nel", E_USER_WARNING); OZopK: $o7mmW = count($VEpYp); $wyQsJ = array(); foreach ($Gq3xm as $cIsTQ) { $wyQsJ = array_merge($wyQsJ, array_slice(array_values($cIsTQ), 0, $o7mmW)); l8xFW: } eRDWs: $this->getDbConnection(Db::TYPE_READ_WRITE)->query($this->buildInsertManyQuery($VEpYp, count($Gq3xm)), $wyQsJ); } public function update(array $AhHrL, array $OA0M6 = array()) { $this->getDbConnection(Db::TYPE_READ_WRITE)->query($this->buildUpdateQuery($AhHrL, $OA0M6), array_merge(array_values($AhHrL), array_values($OA0M6))); } public function delete(array $OA0M6) { $this->getDbConnection(Db::TYPE_READ_WRITE)->query($this->buildDeleteQuery($OA0M6), array_values($OA0M6)); } public function select(array $OA0M6, array $AnN0_ = array(), $znEM0 = '') { return $this->getDbConnection(Db::TYPE_READ_ONLY)->query($this->buildSelectQuery($OA0M6, $AnN0_), array_values($OA0M6))->fetchAll($znEM0); } public function selectPaged(array $OA0M6, array $AnN0_, $Bb8eI, $rA4yF, &$oFS50 = false) { if (!empty($AnN0_)) { goto RFkRK; } trigger_error("Rendezes nelkul nem javasolt LIMIT-et hasznalo lekerdezest futtatni", E_USER_WARNING); RFkRK: return $this->getDbConnection(Db::TYPE_READ_ONLY)->queryPaged($this->buildSelectQuery($OA0M6, $AnN0_), array_values($OA0M6), $Bb8eI, $rA4yF, $oFS50)->fetchAll(); } public function selectOne(array $OA0M6, array $AnN0_) { if (!empty($AnN0_)) { goto MO0u0; } trigger_error("Rendezes nelkul nem javasolt LIMIT-et hasznalo lekerdezest futtatni", E_USER_WARNING); MO0u0: return $this->getDbConnection(Db::TYPE_READ_ONLY)->query($this->buildSelectQuery($OA0M6, $AnN0_, 1), array_values($OA0M6))->fetchRow(); } } namespace Alumentum; class MysqlSemaphore { protected $connection; protected $name; public function __construct($uwSdB, $EMrXw) { $this->connection = Db::getInstance()->getConnection($uwSdB, Db::TYPE_READ_WRITE); $this->name = $EMrXw; } public function lock($t3Gab = 0) { return $this->connection->query("SELECT GET_LOCK(:name, :timeout)", array("name" => $this->name, "timeout" => (int) $t3Gab))->fetchColumn() == "1"; } public function release() { return $this->connection->query("SELECT RELEASE_LOCK(:name)", array("name" => $this->name))->fetchColumn() == "1"; } } namespace Alumentum; abstract class Form { const METHOD_GET = "get"; const METHOD_POST = "post"; protected $controls = array(); protected $labels = array(); protected $errorMessage = ''; protected $id = ''; public function addControl(FormControl $WlnIq, $PGG9t = '', $dNbD1 = '') { $WlnIq->setForm($this); if ($dNbD1 !== '') { goto oAnF4; } $this->controls[$WlnIq->getName()] = $WlnIq; goto mQNuQ; oAnF4: $yDa0O = array_search($dNbD1, array_keys($this->controls), true); if (!($yDa0O === false)) { goto cn8be; } $yDa0O = count($this->controls); cn8be: $this->controls = array_merge(array_slice($this->controls, 0, $yDa0O, true), array($WlnIq->getName() => $WlnIq), array_slice($this->controls, $yDa0O, null, true)); mQNuQ: if (!($PGG9t !== '')) { goto RnCQL; } $this->labels[$WlnIq->getName()] = $PGG9t; RnCQL: return $this; } public function getControl($EMrXw) { return isset($this->controls[$EMrXw]) ? $this->controls[$EMrXw] : null; } public function getControlLabel($EMrXw) { return isset($this->labels[$EMrXw]) ? $this->labels[$EMrXw] : ''; } public function isValid() { $A6Df_ = true; foreach ($this->controls as $WlnIq) { $A6Df_ = $WlnIq->isValid() && $A6Df_; la6eK: } uxOFi: return $A6Df_; } public function hasError() { return $this->errorMessage !== ''; } public function getErrorMessage() { return $this->errorMessage; } public function setErrorMessage($FJUS8) { $this->errorMessage = $FJUS8; } public function getId() { return $this->id; } public function renderControl($WlnIq, $xDouB = 0) { if (!$WlnIq->isRendered()) { goto WwkII; } return; WwkII: $vZSl9 = get_class($WlnIq); switch ($vZSl9) { case "FormHiddenInput": $WlnIq->render($xDouB); goto o9DJa; case "FormCheckbox": echo "<p><label for="" . $WlnIq->getId() . "">"; $WlnIq->render($xDouB); if (empty($this->labels[$WlnIq->getName()])) { goto RnA3v; } echo $this->labels[$WlnIq->getName()]; RnA3v: echo "</label>"; if (!$WlnIq->hasHint()) { goto XmDiu; } echo "<br/><em>" . $WlnIq->getHint() . "</em>"; XmDiu: if (!$WlnIq->hasError()) { goto mdFnp; } echo "<br/><strong>" . $WlnIq->getErrorMessage() . "</strong>"; mdFnp: echo "</p>"; goto o9DJa; case "FormCheckboxGroup": case "FormRadioGroup": echo "<p>"; if (empty($this->labels[$WlnIq->getName()])) { goto P4lLB; } echo "<label>" . $this->labels[$WlnIq->getName()] . "</label>"; P4lLB: foreach ($WlnIq->getValues() as $mCvrK) { echo "<br/><label for="" . $WlnIq->getControlId($mCvrK) . "">"; $WlnIq->renderControl($mCvrK, $xDouB); echo $WlnIq->getLabel($mCvrK) . "</label>"; h_3SD: } aabfc: if (!$WlnIq->hasHint()) { goto ddMo7; } echo "<br/><em>" . $WlnIq->getHint() . "</em>"; ddMo7: if (!$WlnIq->hasError()) { goto H1552; } echo "<br/><strong>" . $WlnIq->getErrorMessage() . "</strong>"; H1552: echo "</p>"; goto o9DJa; case "FormButton": echo "<p>"; $WlnIq->render($xDouB); echo "</p>"; goto o9DJa; case "FormTextInput": case "FormDropdown": default: echo "<p>"; if (empty($this->labels[$WlnIq->getName()])) { goto SX6Z7; } echo "<label for="" . $WlnIq->getId() . "">" . $this->labels[$WlnIq->getName()] . ":</label><br/>"; SX6Z7: $WlnIq->render($xDouB); if (!$WlnIq->hasHint()) { goto tEfex; } echo "<br/><em>" . $WlnIq->getHint() . "</em>"; tEfex: if (!$WlnIq->hasError()) { goto zoq6Z; } echo "<br/><strong>" . $WlnIq->getErrorMessage() . "</strong>"; zoq6Z: echo "</p>"; } T6vyX: o9DJa: $WlnIq->setRendered(); } public function renderControls($fxpSq = 1) { foreach ($this->controls as $WlnIq) { $this->renderControl($WlnIq, $fxpSq); $fxpSq++; xZ8dB: } IvfCA: } public function render($DcRAY, $Nc_3k, array $cSSMM = array(), $NnBmC = '', $fxpSq = 1) { $this->renderBegin($DcRAY, $Nc_3k, $cSSMM, $NnBmC); $this->renderError(); $this->renderControls($fxpSq); $this->renderEnd(); } public function renderBegin($DcRAY, $Nc_3k, array $cSSMM = array(), $NnBmC = '') { if (!($NnBmC !== '')) { goto TFGZc; } $cSSMM["id"] = $NnBmC; TFGZc: $this->id = $NnBmC; echo "<form action="" . $DcRAY . "" method="" . $Nc_3k . """; foreach ($cSSMM as $EzRJI => $HKULo) { echo " " . $EzRJI . "="" . $HKULo . """; UJ8sa: } wWc7J: echo ">"; } public function renderEnd() { echo "</form>"; } public function renderError() { if (!$this->hasError()) { goto YYvO2; } echo "<p>" . $this->errorMessage . "</p>"; YYvO2: } public function renderHiddenControls() { foreach ($this->controls as $WlnIq) { if (!($WlnIq instanceof FormHiddenInput || $WlnIq instanceof FormTextInput && $WlnIq->getType() === FormTextInput::TYPE_HIDDEN)) { goto fiojL; } $this->renderControl($WlnIq); fiojL: gx4fM: } UVFzm: } public function resetRendered() { foreach ($this->controls as $WlnIq) { $WlnIq->resetRendered(); sbiZF: } zN_PW: } } namespace Alumentum; abstract class FormControl { protected $name; protected $errorMessage = ''; protected $hint = ''; protected $attributes = array(); protected $form; protected $isRendered = false; public function __construct($EMrXw, array $cSSMM) { $this->name = $EMrXw; $this->attributes = $cSSMM; } public function getName() { return $this->name; } public function setName($EMrXw) { $this->name = $EMrXw; } public function getId() { $Zoauv = $this->form->getId(); return $Zoauv !== '' ? $Zoauv . ucfirst($this->name) . "Id" : $this->name . "Id"; } public function hasError() { return $this->errorMessage !== ''; } public function getErrorMessage() { return $this->errorMessage; } public function setErrorMessage($FJUS8) { $this->errorMessage = $FJUS8; } public function hasHint() { return $this->hint !== ''; } public function getHint() { return $this->hint; } public function isValid() { return true; } public function setForm(Form $VxTww) { $this->form = $VxTww; } public function addAttribute($EMrXw, $mCvrK, $B0mTj = true) { if (!($B0mTj || empty($this->attributes[$EMrXw]))) { goto n1CoI; } $this->attributes[$EMrXw] = $mCvrK; n1CoI: } public function isRendered() { return $this->isRendered; } public function setRendered() { $this->isRendered = true; } public function resetRendered() { $this->isRendered = false; } public abstract function render($xDouB = 0); } namespace Alumentum; class FormTextInput extends FormControl { const TYPE_TEXT = "text"; const TYPE_MULTIPLE = "multiple"; const TYPE_EMAIL = "email"; const TYPE_PASSWORD = "password"; const TYPE_HIDDEN = "hidden"; protected $type; protected $value; protected $mandatoryErrorMessage; protected $validators = array(); public function __construct($izSho, $EMrXw, $mCvrK = '', $p0cRv = '', $NDn1p = array(), array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->type = $izSho; $this->value = $mCvrK; $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; if (!$NDn1p instanceof Validator) { goto ZknQG; } $NDn1p = array($NDn1p); ZknQG: foreach ($NDn1p as $dhx3I) { $this->addValidator($dhx3I); AxY_s: } UwSlh: } public function getType() { return $this->type; } public function setType($izSho) { $this->type = $izSho; } public function getValue() { return $this->value; } public function setValue($mCvrK) { $this->value = $mCvrK; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function addValidator(Validator $dhx3I) { $this->validators[] = $dhx3I; } public function isValid() { $this->errorMessage = ''; if (!($this->value === '')) { goto Lw3Si; } if ($this->mandatoryErrorMessage !== '') { goto Z5ZKX; } return true; goto YUotU; Z5ZKX: $this->errorMessage = $this->mandatoryErrorMessage; return false; YUotU: Lw3Si: $A6Df_ = true; foreach ($this->validators as $dhx3I) { $A6Df_ = $dhx3I->isValid($this->value); if ($A6Df_) { goto hR93r; } $this->errorMessage = $dhx3I->getErrorMessage(); goto NC1_U; hR93r: eOygs: } NC1_U: return $A6Df_; } public function render($xDouB = 0) { $mCvrK = ''; if (!($this->type !== self::TYPE_PASSWORD)) { goto B8z13; } $mCvrK = htmlspecialchars($this->value, ENT_QUOTES); B8z13: $cSSMM = $this->attributes; if (!($xDouB > 0)) { goto pD5MG; } $cSSMM["tabindex"] = $xDouB; pD5MG: if ($this->type === self::TYPE_MULTIPLE) { goto dhy7y; } echo "<input type="" . $this->type . "" name="" . $this->name . "" id="" . $this->getId() . "" value="" . $mCvrK . "" "; foreach ($cSSMM as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; V_AkI: } t6tYt: echo "/>"; goto u34r3; dhy7y: $cSSMM += array("rows" => "10", "cols" => "40"); echo "<textarea name="" . $this->name . "" id="" . $this->getId() . "" "; foreach ($cSSMM as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; Ec5v6: } aP9Rg: echo ">", $mCvrK, "</textarea>"; u34r3: } } namespace Alumentum; class FormFileInput extends FormControl { protected $mandatoryErrorMessage; protected $showMandatoryError = false; public function __construct($EMrXw, $p0cRv = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function setShowMandatoryError($YDLX0 = true) { $this->showMandatoryError = $YDLX0; } public function isValid() { $this->errorMessage = ''; if ($this->showMandatoryError && $this->mandatoryErrorMessage !== '') { goto nWcCc; } return true; goto CPRmV; nWcCc: $this->errorMessage = $this->mandatoryErrorMessage; return false; CPRmV: } public function render($xDouB = 0) { if (!($xDouB > 0)) { goto yN4jK; } $this->attributes["tabindex"] = $xDouB; yN4jK: echo "<input type="file" name="" . $this->name . "" id="" . $this->getId() . "" "; foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; b3Jg7: } Abeo1: echo "/>"; } } namespace Alumentum; class FormHiddenInput extends FormControl { public function __construct($EMrXw, $mCvrK = '', array $cSSMM = array()) { parent::__construct($EMrXw, $cSSMM); $this->value = $mCvrK; } public function getValue() { return $this->value; } public function setValue($mCvrK) { $this->value = $mCvrK; } public function render($xDouB = 0) { echo "<input type="hidden" name="" . $this->name . "" id="" . $this->getId() . "" value="" . $this->value . "" "; foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; E0ORr: } Asc_k: echo "/>"; } } namespace Alumentum; class FormCheckbox extends FormControl { protected $value; protected $isChecked; protected $mandatoryErrorMessage; public function __construct($EMrXw, $mCvrK, $ZnN8t = false, $p0cRv = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->value = $mCvrK; $this->isChecked = $ZnN8t; $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; } public function getValue() { return $this->value; } public function setValue($mCvrK) { $this->value = $mCvrK; } public function isChecked() { return $this->isChecked; } public function setChecked($ZnN8t) { $this->isChecked = $ZnN8t; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function isValid() { if (!(!$this->isChecked && $this->isMandatory())) { goto za5Sq; } $this->errorMessage = $this->mandatoryErrorMessage; return false; za5Sq: return true; } public function render($xDouB = 0) { if (!($xDouB > 0)) { goto wZJr2; } $this->attributes["tabindex"] = $xDouB; wZJr2: echo "<input type="checkbox" name="" . $this->name . "" id="" . $this->getId() . "" value="" . $this->value . "" " . ($this->isChecked() ? "checked="checked" " : ''); foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; FkKls: } ZXxc1: echo "/>"; } } namespace Alumentum; class FormCheckboxGroup extends FormControl { protected $values; protected $selected; public function __construct($EMrXw, array $RjlQP, $kt0G2 = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->values = $RjlQP; $this->hint = $ecqkb; $this->setSelected($kt0G2); } public function getValues() { return array_keys($this->values); } public function setValues(array $RjlQP) { $this->values = $RjlQP; } public function isSelected($mCvrK) { return in_array($mCvrK, $this->selected, true); } public function getSelected() { return $this->selected; } public function setSelected($kt0G2) { if (!is_string($kt0G2)) { goto ZlI4u; } $kt0G2 = $kt0G2 === '' ? array() : array($kt0G2); ZlI4u: $this->selected = array_values(array_intersect(array_keys($this->values), $kt0G2)); } public function getLabel($mCvrK) { if (in_array($mCvrK, array_keys($this->values), true)) { goto ya079; } trigger_error("Nem letezik ilyen ertek a csoportban: " . $mCvrK, E_USER_WARNING); return ''; ya079: return $this->values[$mCvrK]; } public function getControlId($mCvrK) { $qlXxU = array_search($mCvrK, array_keys($this->values), true); $Zoauv = $this->form->getId(); return $Zoauv !== '' ? $Zoauv . ucfirst($this->name) . "Id" . $qlXxU : $this->name . "Id" . $qlXxU; } public function renderControl($mCvrK, $xDouB = 0) { if (array_key_exists($mCvrK, $this->values)) { goto Fa0eM; } trigger_error("Nem letezik ilyen ertek a csoportban: " . $mCvrK, E_USER_WARNING); return; Fa0eM: if (!($xDouB > 0)) { goto pA2Js; } $this->attributes["tabindex"] = $xDouB; pA2Js: echo "<input type="checkbox" name="" . $this->name . "[]" id="" . $this->getControlId($mCvrK) . "" value="" . $mCvrK . "" " . ($this->isSelected($mCvrK) ? "checked="checked" " : ''); foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; Cbnie: } a3GwP: echo "/>"; } public function render($xDouB = 0) { } } namespace Alumentum; class FormRadioGroup extends FormCheckboxGroup { protected $mandatoryErrorMessage; public function __construct($EMrXw, array $RjlQP, $kt0G2 = '', $p0cRv = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $RjlQP, $kt0G2, $cSSMM, $ecqkb); $this->mandatoryErrorMessage = $p0cRv; } public function getSelected() { return !empty($this->selected) ? $this->selected[0] : ''; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function isValid() { if (!($this->isMandatory() && $this->getSelected() === '')) { goto DaQNx; } $this->errorMessage = $this->mandatoryErrorMessage; return false; DaQNx: return true; } public function renderControl($mCvrK, $xDouB = 0) { if (array_key_exists($mCvrK, $this->values)) { goto OsTD1; } trigger_error("Nem letezik ilyen ertek a radio csoportban: " . $mCvrK, E_USER_WARNING); return; OsTD1: if (!($xDouB > 0)) { goto olm4V; } $this->attributes["tabindex"] = $xDouB; olm4V: echo "<input type="radio" name="" . $this->name . "" id="" . $this->getControlId($mCvrK) . "" value="" . $mCvrK . "" " . ($this->isSelected($mCvrK) ? "checked="checked" " : ''); foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; VjEcx: } XhSRD: echo "/>"; } } namespace Alumentum; class FormDropdown extends FormControl { protected $values; protected $selected; protected $mandatoryErrorMessage; protected $isMultiple; protected $groupLabels = array(); public function __construct($EMrXw, array $RjlQP, $kt0G2 = '', $p0cRv = '', array $cSSMM = array(), $ecqkb = '', $bhhXe = false, array $RhXP2 = array()) { parent::__construct($EMrXw, $cSSMM); $this->values = $RjlQP; $this->groupLabels = $RhXP2; $this->isMultiple = $bhhXe; $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; $this->setSelected($kt0G2); } public function getSelected() { return $this->selected; } public function setSelected($kt0G2) { if (!is_string($kt0G2)) { goto nguEl; } $kt0G2 = $kt0G2 === '' ? array() : array($kt0G2); nguEl: if ($this->isMultiple) { goto D_7Km; } $kt0G2 = array_slice($kt0G2, 0, 1); D_7Km: $RjlQP = array(); foreach ($this->values as $mCvrK => $pZKts) { if (is_array($pZKts)) { goto PKnRi; } $RjlQP[] = $mCvrK; goto pOXpv; PKnRi: foreach (array_keys($pZKts) as $c9khX) { $RjlQP[] = $c9khX; tz2rY: } NbUW8: pOXpv: xbkm7: } P8nBJ: $this->selected = array_intersect($RjlQP, $kt0G2); } public function getValues() { return $this->values; } public function getGroupLabel($mCvrK) { return !empty($this->groupLabels[$mCvrK]) ? $this->groupLabels[$mCvrK] : ''; } public function setValues(array $RjlQP) { $this->values = $RjlQP; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function isMultiple() { return $this->isMultiple; } public function setMultiple($bhhXe) { $this->isMultiple = $bhhXe; } public function isValid() { $this->errorMessage = ''; if (!(empty($this->selected) && $this->isMandatory())) { goto MgRgP; } $this->errorMessage = $this->mandatoryErrorMessage; return false; MgRgP: return true; } public function render($xDouB = 0) { $cSSMM = $this->attributes; if (!($xDouB > 0)) { goto nJ0rh; } $cSSMM["tabindex"] = $xDouB; nJ0rh: if (!$this->isMultiple) { goto Z1nr0; } $cSSMM["multiple"] = "multiple"; Z1nr0: echo "<select name="" . $this->name . ($this->isMultiple ? "[]" : '') . "" id="" . $this->getId() . "" "; foreach ($cSSMM as $EzRJI => $HKULo) { echo $EzRJI . "="" . $HKULo . "" "; ysJeD: } RnN5X: echo ">" . "
"; foreach ($this->values as $mCvrK => $pZKts) { if (is_array($pZKts)) { goto hIoqx; } echo "<option value="" . $mCvrK . """ . (in_array($mCvrK, $this->selected) ? " selected="selected"" : '') . ">" . $pZKts . "</option>" . "\xa"; goto akr2J; hIoqx: echo "<optgroup label="" . $this->getGroupLabel($mCvrK) . "">" . "
"; foreach ($pZKts as $c9khX => $TEAAZ) { echo "<option value="" . $c9khX . """ . (in_array($c9khX, $this->selected) ? " selected="selected"" : '') . ">" . $TEAAZ . "</option>" . "\xa"; K_T6a: } jkxzO: echo "</optgroup>" . "
"; akr2J: M6RUO: } RFXvQ: echo "</select>"; } } namespace Alumentum; class FormButton extends FormControl { const RENDER_TYPE_BUTTON = "button"; const RENDER_TYPE_INPUT = "input"; const TYPE_BUTTON = "button"; const TYPE_SUBMIT = "submit"; protected $renderType; protected $type; protected $value; public function __construct($voNXW, $izSho, $EMrXw, $mCvrK, array $cSSMM = array()) { parent::__construct($EMrXw, $cSSMM); $this->renderType = $voNXW; $this->type = $izSho; $this->value = $mCvrK; } public function getType() { return $this->type; } public function setType($izSho) { $this->type = $izSho; } public function getRenderType() { return $this->renderType; } public function setRenderType($voNXW) { $this->renderType = $voNXW; } public function render($xDouB = 0) { if (!($xDouB > 0)) { goto hlxO9; } $this->attributes["tabindex"] = $xDouB; hlxO9: $a7Lvd = ''; foreach ($this->attributes as $EzRJI => $HKULo) { $a7Lvd .= $EzRJI . "="" . $HKULo . "" "; y9Cwu: } wtcHT: switch ($this->renderType) { case self::RENDER_TYPE_INPUT: echo "<input type="" . $this->type . "" name="" . $this->name . "" id="" . $this->getId() . "" value="" . htmlspecialchars($this->value, ENT_QUOTES) . "" "; echo $a7Lvd, "/>"; goto OB3oR; case self::RENDER_TYPE_BUTTON: echo "<button type="" . $this->type . "" name="" . $this->name . "" id="" . $this->getId() . "" "; echo $a7Lvd, ">", $this->value, "</button>"; goto OB3oR; default: trigger_error("Ismeretlen gomb renderelesi mod: " . $this->renderType, E_USER_WARNING); } o16u9: OB3oR: } } namespace Alumentum; abstract class Validator { protected $errorMessage; public function __construct($FJUS8) { $this->errorMessage = $FJUS8; } public function getErrorMessage() { return $this->errorMessage; } public abstract function isValid($mCvrK); } namespace Alumentum; class ValidatorCallback extends Validator { protected $callback; protected $params; public function __construct($FJUS8, $stgKp, array $cNacg = array()) { parent::__construct($FJUS8); $this->callback = $stgKp; $this->params = $cNacg; } public function isValid($mCvrK) { $cNacg = $this->params; array_unshift($cNacg, $mCvrK); return (bool) call_user_func_array($this->callback, $cNacg); } } namespace Alumentum; class ValidatorRegExp extends Validator { const PATTERN_IP = "(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d)"; private $pattern; public function __construct($FJUS8, $kioZk) { parent::__construct($FJUS8); $this->pattern = $kioZk; } public function isValid($mCvrK) { return (bool) preg_match($this->pattern, $mCvrK); } } namespace Alumentum; class ValidatorEmail extends Validator { private $verifyOnServer; private $host; private $sender; public function __construct($FJUS8, $LaeMj = false, $NcgPG = '', $Z1GO6 = '') { parent::__construct($FJUS8); $this->verifyOnServer = $LaeMj; $this->host = empty($NcgPG) ? isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : "localhost" : $NcgPG; $this->sender = empty($Z1GO6) ? "postmaster@" . $this->host : $Z1GO6; } public function isValid($mCvrK) { return filter_var($mCvrK, FILTER_VALIDATE_EMAIL) !== false && (!$this->verifyOnServer || $this->isRealEmailAddress($mCvrK)); } private function isRealEmailAddress($mGpEk) { $lWyJq = substr(strstr($mGpEk, "@"), 1); if (!(empty($lWyJq) || !checkdnsrr($lWyJq, "ANY"))) { goto CUtIO; } return false; CUtIO: $duj2a = array(); if (getmxrr($lWyJq, $duj2a)) { goto rxGxH; } $duj2a[] = $lWyJq; rxGxH: $A6Df_ = true; $uZBSz = null; foreach ($duj2a as $xkeEo) { try { $uZBSz = new Socket($xkeEo, 25); } catch (\Exception $VJ0SS) { goto hVjMW; } try { $uZBSz->writeLine("HELO " . $this->host); if (!(substr($uZBSz->readLine(), 0, 3) !== "250")) { goto fWT2n; } $uZBSz->writeLine("QUIT"); goto ss5d6; fWT2n: $uZBSz->writeLine("MAIL FROM: <" . $this->sender . ">"); if (!(substr($uZBSz->readLine(), 0, 3) !== "250")) { goto z6vMM; } $uZBSz->writeLine("QUIT"); goto ss5d6; z6vMM: $uZBSz->writeLine("RCPT TO: <" . $mGpEk . ">"); $SeFjJ = $uZBSz->readLine(); if (!(substr($SeFjJ, 0, 3) !== "250" && strpos($SeFjJ, "greylisted") === false)) { goto yI1bK; } $A6Df_ = false; yI1bK: $uZBSz->writeLine("QUIT"); } catch (\Exception $VJ0SS) { } goto ss5d6; hVjMW: } ss5d6: if (!($uZBSz !== null)) { goto PkkbC; } $uZBSz->disconnect(); PkkbC: return $A6Df_; } } namespace Alumentum; abstract class EmailTemplateAbstract extends TemplateAbstract { const RENDER_TEXT_METHOD = "renderText"; const RENDER_HTML_METHOD = "renderHtml"; protected function getArguments($Nc_3k, array $cNacg) { $lyToz = array(); $a2cAg = new \ReflectionMethod($this, $Nc_3k); foreach ($a2cAg->getParameters() as $Fj3Fc) { $EMrXw = $Fj3Fc->getName(); if (array_key_exists($EMrXw, $cNacg)) { goto yHFcQ; } if ($Fj3Fc->isOptional()) { goto rAz0h; } throw new \Exception("Nincs megadva egy kotelezo template parameter erteke: " . get_class($this) . "->" . $Nc_3k . "() : $" . $EMrXw); goto cjJ1A; yHFcQ: $mCvrK = $cNacg[$EMrXw]; goto cjJ1A; rAz0h: $mCvrK = $Fj3Fc->getDefaultValue(); cjJ1A: $lyToz[] = $mCvrK; ilEgw: } rfvqh: return $lyToz; } public function getTextContent() { ob_start(); call_user_func_array(array($this, self::RENDER_TEXT_METHOD), $this->getArguments(self::RENDER_TEXT_METHOD, $this->rawParams)); return ob_get_clean(); } public function getHtmlContent() { ob_start(); call_user_func_array(array($this, self::RENDER_HTML_METHOD), $this->getArguments(self::RENDER_HTML_METHOD, $this->params)); return ob_get_clean(); } public function render() { throw new \Exception("Email template objektumra nincs engedelyezve a render() hivas"); } } namespace Alumentum; class EmailLayout extends EmailTemplateAbstract { private $innerText = ''; private $innerHtml = ''; public function setInnerText($dl6OX) { $this->innerText = $dl6OX; } public function setInnerHtml($dl6OX) { $this->innerHtml = $dl6OX; } protected function renderInnerText() { echo $this->innerText; } protected function renderInnerHtml() { echo $this->innerHtml; } } namespace Alumentum; class Email extends EmailTemplateAbstract { const MAILER_SMTP = "smtp"; const MAILER_MAIL = "mail"; const MAILER_SENDMAIL = "sendmail"; const MAILER_QMAIL = "qmail"; const SECURITY_SSL = "ssl"; const SECURITY_TLS = "tls"; const FORMAT_PLAINTEXT = "text"; const FORMAT_HTML = "html"; const FORMAT_COMBINED = "text+html"; protected $mailer; protected $layout = null; public function __construct() { $this->mailer = new \PHPMailer\PHPMailer\PHPMailer(); $this->mailer->CharSet = "utf-8"; } public function setMailerType($izSho) { switch ($izSho) { case self::MAILER_SENDMAIL: $this->mailer->isSendmail(); goto pA8Wg; case self::MAILER_QMAIL: $this->mailer->isQmail(); goto pA8Wg; case self::MAILER_MAIL: $this->mailer->isMail(); goto pA8Wg; case self::MAILER_SMTP: default: $this->mailer->isSMTP(); goto pA8Wg; } ALuug: pA8Wg: return $this; } public function setSmtpPreferences($NcgPG = "localhost", $VtVxF = 25, $n8a7o = '', $y9VTC = '', $DeoAY = '') { $this->mailer->Host = $NcgPG; $this->mailer->Port = $VtVxF; $this->mailer->SMTPSecure = $n8a7o; $this->mailer->SMTPAuth = !empty($y9VTC); $this->mailer->Username = $y9VTC; $this->mailer->Password = $DeoAY; return $this; } public function setSendMailPath($hnSkN) { $this->mailer->Sendmail = $hnSkN; return $this; } public function setCharset($Jdk_3) { $this->mailer->CharSet = $Jdk_3; return $this; } public function setFrom($Ktb80, $EMrXw = '') { $this->mailer->setFrom($Ktb80, $EMrXw); return $this; } public function addReplyTo($Ktb80, $EMrXw = '') { $this->mailer->addReplyTo($Ktb80, $EMrXw); return $this; } public function addTo($Ktb80, $EMrXw = '') { $this->mailer->addAddress($Ktb80, $EMrXw); return $this; } public function addCc($Ktb80, $EMrXw = '') { $this->mailer->addCC($Ktb80, $EMrXw); return $this; } public function addBcc($Ktb80, $EMrXw = '') { $this->mailer->addBCC($Ktb80, $EMrXw); return $this; } public function addStringAttachment($dl6OX, $Saw4x) { $this->mailer->addStringAttachment($dl6OX, $Saw4x); return $this; } public function setSubject($aN14Z) { $this->mailer->Subject = $aN14Z; return $this; } public function clearAllRecipients() { $this->mailer->clearAllRecipients(); return $this; } public function setLayout(EmailLayout $nEx6y) { $this->layout = $nEx6y; } public function getTextContent() { if ($this->layout !== null) { goto QRF79; } return parent::getTextContent(); goto Fx4AI; QRF79: $this->layout->setInnerText(parent::getTextContent()); return $this->layout->getTextContent(); Fx4AI: } public function getHtmlContent() { if ($this->layout !== null) { goto XWaks; } return parent::getHtmlContent(); goto q7J16; XWaks: $this->layout->setInnerHtml(parent::getHtmlContent()); return $this->layout->getHtmlContent(); q7J16: } public function send($b_2w4 = self::FORMAT_COMBINED) { switch ($b_2w4) { case self::FORMAT_PLAINTEXT: $this->mailer->isHTML(false); $this->mailer->Body = $this->getTextContent(); goto bsMaa; case self::FORMAT_COMBINED: $this->mailer->AltBody = $this->getTextContent(); case self::FORMAT_HTML: default: $this->mailer->msgHTML($this->getHtmlContent()); } Y9VN4: bsMaa: $A6Df_ = $this->mailer->send(); if ($A6Df_) { goto LJFqV; } trigger_error("Level kuldes nem sikerult: " . $this->mailer->ErrorInfo, E_USER_WARNING); LJFqV: return $A6Df_; } } namespace Alumentum; class I18n { protected $language = "en"; protected $languageData = array(); protected static $instance = null; public static function getInstance() { if (!(self::$instance === null)) { goto a_gDZ; } self::$instance = new static(); a_gDZ: return self::$instance; } private function __construct() { } private function __clone() { } public function getLanguage() { return $this->language; } public function setLanguage($tgN1w) { $this->language = $tgN1w; } public function getTranslation($NnBmC, array $cNacg = array(), $tgN1w = '') { if (!empty($tgN1w)) { goto ejqIP; } $tgN1w = $this->getLanguage(); ejqIP: if (isset($this->languageData[$tgN1w][$NnBmC])) { goto KS58O; } Events::triggerEvent("i18n.events.language_key_not_found", array($NnBmC)); if (isset($this->languageData[$tgN1w][$NnBmC])) { goto j5FKs; } trigger_error("A kovetkezo nyelvi elem nincs leforditva "" . $tgN1w . "" nyelvre: " . $NnBmC, E_USER_NOTICE); return $NnBmC; j5FKs: KS58O: if (!empty($cNacg)) { goto g7MPP; } return $this->languageData[$tgN1w][$NnBmC]; g7MPP: $JStuo = array(); foreach ($cNacg as $p5e6p => $mCvrK) { $JStuo["{" . $p5e6p . "}"] = $mCvrK; hA9ZL: } NglwY: return strtr($this->languageData[$tgN1w][$NnBmC], $JStuo); } public static function _($NnBmC, array $cNacg = array(), $tgN1w = '') { return self::getInstance()->getTranslation($NnBmC, $cNacg, $tgN1w); } public function hasLanguageFile($Hvdwm) { return is_readable($Hvdwm); } public function loadLanguageFile($Hvdwm, $tgN1w = '', $B0mTj = false) { if (is_readable($Hvdwm)) { goto epgDi; } trigger_error("A megadott nyelvi file nem letezik, vagy nem olvashato: " . $Hvdwm, E_USER_WARNING); return false; epgDi: $IVV0D = (include $Hvdwm); if (is_array($IVV0D)) { goto zhnHw; } trigger_error("A megadott nyelvi file hibas formatumu; nem tombot ad vissza: " . $Hvdwm, E_USER_WARNING); return false; zhnHw: if (!empty($tgN1w)) { goto gGWG4; } $tgN1w = $this->language; gGWG4: $this->languageData[$tgN1w] = $B0mTj || empty($this->languageData[$tgN1w]) ? $IVV0D : array_merge($this->languageData[$tgN1w], $IVV0D); return true; } } namespace Alumentum; interface IClassLoader { public function reset(); public function loadClass($dcDkQ); } namespace Alumentum; class ClassLoaderDigest implements IClassLoader { private $classList = null; public function reset() { $this->classList = null; } public function loadClass($dcDkQ) { if (!($this->classList === null)) { goto Q9h9R; } $this->loadClassListFile(Config::get("system.paths.autoload_classes_file")); Q9h9R: if (!isset($this->classList[$dcDkQ])) { goto GFpzC; } include $this->classList[$dcDkQ]; GFpzC: } public function loadClassListFile($oHn6t) { if (is_readable($oHn6t)) { goto u0ZCF; } trigger_error("A megadott osztalylista file nem letezik, vagy nem olvashato: " . $oHn6t, E_USER_WARNING); return; u0ZCF: $oVvPB = (include $oHn6t); if (is_array($oVvPB)) { goto uGzwL; } trigger_error("A megadott osztalylista file hibas formatumu; nem tombot ad vissza: " . $oHn6t, E_USER_WARNING); return; uGzwL: if (!empty($this->classList)) { goto XdUve; } $this->classList = $oVvPB; goto DuZkt; XdUve: $this->classList = array_merge($this->classList, $oVvPB); DuZkt: } } namespace Alumentum; class Session { private static $isRegenerateIdNeeded = false; private static $handler = null; private static $cookieDomain = null; public static function setHandler(SessionHandlerAbstract $NJuGc) { if (!self::isOpen()) { goto xzY6o; } throw new \Exception("Nem lehet session kezelot beallitani, amig meg van nyitva a session"); xzY6o: self::$handler = $NJuGc; session_set_save_handler(array(self::$handler, "open"), array(self::$handler, "close"), array(self::$handler, "read"), array(self::$handler, "write"), array(self::$handler, "destroy"), array(self::$handler, "gc")); } public static function setCookieDomain($RTGQa) { self::$cookieDomain = $RTGQa; } public static function getName() { return session_name(); } public static function setName($EMrXw) { if (!self::isOpen()) { goto tHigj; } throw new \Exception("A session meg van nyitva, igy nem lehet session nevet allitani"); tHigj: session_name($EMrXw); } public static function regenerateId($Y7NVi = true) { if (self::isOpen()) { goto PTB3t; } self::$isRegenerateIdNeeded = true; return; PTB3t: if (!(self::$handler !== null)) { goto GCgZB; } self::$handler->regenerateId(); GCgZB: session_regenerate_id($Y7NVi); Application::getInstance()->getResponse()->setCookie(session_name(), session_id(), 0, '', self::$cookieDomain); self::$isRegenerateIdNeeded = false; } public static function open() { if (!self::isOpen()) { goto jXO2D; } throw new \Exception("A session mar meg van nyitva, nem lehet meg egyszer megnyitni"); jXO2D: session_start(); $XGnt9 = session_id(); if (!(!isset($_COOKIE[session_name()]) || $_COOKIE[session_name()] !== $XGnt9)) { goto owMfu; } Application::getInstance()->getResponse()->setCookie(session_name(), $XGnt9, 0, '', self::$cookieDomain); owMfu: if (!self::$isRegenerateIdNeeded) { goto d42uS; } self::regenerateId(); d42uS: SessionNamespace::initialize(); Events::addEventListener("system.before_send_response", array("\Alumentum\Session", "close")); } public static function isOpen() { return session_id() !== ''; } public static function close() { if (self::isOpen()) { goto A2rmR; } throw new \Exception("A session nincs megnyitva, igy nem lehet lezarni"); A2rmR: Events::removeEventListener("system.before_send_response", array("\Alumentum\Session", "close")); session_write_close(); } public static function destroy() { if (self::isOpen()) { goto nPjI7; } throw new \Exception("A session nincs megnyitva, igy nem lehet torolni"); nPjI7: SessionNamespace::removeAllNamespaces(); Events::removeEventListener("system.before_send_response", array("\Alumentum\Session", "close")); $_SESSION = array(); $fCMb6 = session_name(); if (!isset($_COOKIE[$fCMb6])) { goto Iy42y; } $pZJ2Q = session_get_cookie_params(); Application::getInstance()->getResponse()->setCookie($fCMb6, '', 1, $pZJ2Q["path"], $pZJ2Q["domain"], $pZJ2Q["secure"], $pZJ2Q["httponly"]); unset($_COOKIE[$fCMb6]); Iy42y: session_destroy(); } public static function rememberMe($aj4VK = 30) { if (!(self::$handler !== null)) { goto mQCui; } self::$handler->rememberMe($aj4VK); mQCui: ini_set("session.cookie_lifetime", $aj4VK * 86400); self::regenerateId(); } } namespace Alumentum; class SessionNamespace implements \ArrayAccess { const SYSTEM_NAMESPACE_NAME = "__alumentum"; private static $namespaces = array(); private static $expiringData = array(); private $name; public static function initialize() { static $jWSNb = false; if (!$jWSNb) { goto M0BvQ; } return; M0BvQ: $jWSNb = true; if (isset($_SESSION[self::SYSTEM_NAMESPACE_NAME])) { goto q2keB; } return; q2keB: foreach ($_SESSION[self::SYSTEM_NAMESPACE_NAME] as $JZE13 => $DloY0) { foreach ($DloY0 as $p5e6p => $aMc97) { if ($aMc97 === 1) { goto AZd6e; } $_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13][$p5e6p]--; goto dmLcn; AZd6e: self::$expiringData[$JZE13][$p5e6p] = $_SESSION[$JZE13][$p5e6p]; unset($_SESSION[$JZE13][$p5e6p]); unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13][$p5e6p]); dmLcn: eNpri: } oMTzC: if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13])) { goto FU8GY; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13]); FU8GY: ZgcPi: } R0ugB: if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME])) { goto zbWwf; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME]); zbWwf: } public static function getNamespace($EMrXw = "default") { if (isset(self::$namespaces[$EMrXw])) { goto sbu27; } self::$namespaces[$EMrXw] = new SessionNamespace($EMrXw); sbu27: return self::$namespaces[$EMrXw]; } public static function removeAllNamespaces() { self::$namespaces = array(); } private function __construct($EMrXw) { if (!($EMrXw === self::SYSTEM_NAMESPACE_NAME)) { goto QGBo_; } throw new \Exception("A rendszer altal fenntartott session nevter nevet nem lehet hasznalni"); QGBo_: $this->name = $EMrXw; if (Session::isOpen()) { goto mCVGx; } Session::open(); mCVGx: } private function __clone() { } public function getName() { return $this->name; } public function get($p5e6p, $xoUHz = null) { if (Session::isOpen()) { goto kWKaa; } throw new \Exception("A session nincs megnyitva, igy nem lehet belole olvasni"); kWKaa: if (isset($_SESSION[$this->name][$p5e6p])) { goto IoNfB; } if (isset(self::$expiringData[$this->name][$p5e6p])) { goto Upwbn; } return $xoUHz; goto ywDSp; IoNfB: return $_SESSION[$this->name][$p5e6p]; goto ywDSp; Upwbn: return self::$expiringData[$this->name][$p5e6p]; ywDSp: } public function set($p5e6p, $mCvrK, $aMc97 = 0) { if (Session::isOpen()) { goto xmZBP; } throw new \Exception("A session nincs megnyitva, igy nem lehet bele irni"); xmZBP: $_SESSION[$this->name][$p5e6p] = $mCvrK; if (!($aMc97 > 0)) { goto ynh67; } $_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name][$p5e6p] = $aMc97; ynh67: } public function remove($p5e6p) { if (Session::isOpen()) { goto SUQr2; } throw new \Exception("A session nincs megnyitva, igy nem lehet bele irni"); SUQr2: unset($_SESSION[$this->name][$p5e6p]); unset(self::$expiringData[$this->name][$p5e6p]); if (!empty($_SESSION[$this->name])) { goto pWsLo; } unset($_SESSION[$this->name]); pWsLo: if (!isset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name][$p5e6p])) { goto KQ80J; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name][$p5e6p]); if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name])) { goto sH__M; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name]); if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME])) { goto ScVjs; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME]); ScVjs: sH__M: KQ80J: } public function reset() { if (Session::isOpen()) { goto fR3fP; } throw new \Exception("A session nincs megnyitva, igy nem lehet bele irni"); fR3fP: $_SESSION[$this->name] = array(); } public function has($p5e6p) { if (Session::isOpen()) { goto HbpUm; } throw new \Exception("A session nincs megnyitva, igy nem lehet belole olvasni"); HbpUm: return isset($_SESSION[$this->name][$p5e6p]) || isset(self::$expiringData[$this->name][$p5e6p]); } public function isEmpty($p5e6p) { if (Session::isOpen()) { goto ECBnD; } throw new \Exception("A session nincs megnyitva, igy nem lehet belole olvasni"); ECBnD: return empty($_SESSION[$this->name][$p5e6p]) && empty(self::$expiringData[$this->name][$p5e6p]); } public function offsetGet($p5e6p) { return $this->get($p5e6p); } public function offsetSet($p5e6p, $mCvrK) { $this->set($p5e6p, $mCvrK); } public function offsetUnset($p5e6p) { $this->remove($p5e6p); } public function offsetExists($p5e6p) { return $this->has($p5e6p); } } namespace Alumentum; abstract class SessionHandlerAbstract { private $autoRenewRememberMe = true; private $lifetime = 1800; private $updateInterval = 600; private $sessionHash = ''; private $modifiedAt = 0; private $isPersistent = false; public function setAutoRenewRememberMe($mIFC1) { $this->autoRenewRememberMe = $mIFC1; } public function setLifetime($aj4VK) { if (!($aj4VK <= 0 || $aj4VK >= 86400)) { goto cLgnD; } throw new \Exception("A session elettartamanak pozitiv es 1 napnal kisebb erteknek kell lennie"); cLgnD: $this->lifetime = $aj4VK; } public function setUpdateInterval($gwLwa) { $this->updateInterval = $gwLwa; } public function rememberMe($aj4VK) { $this->lifetime = $aj4VK * 86400; } public function regenerateId() { $this->sessionHash = ''; } public function open($R7pov = '', $fCMb6 = '') { return true; } public function close() { return true; } public function read($XGnt9) { $dp748 = $this->load($XGnt9); $this->sessionHash = md5($dp748["data"]); $this->modifiedAt = $dp748["modifiedAt"]; if (!($dp748["lifetime"] >= 86400)) { goto aWdeg; } $this->isPersistent = true; aWdeg: $this->lifetime = $dp748["lifetime"] > 0 ? $dp748["lifetime"] : $this->lifetime; return $dp748["data"]; } public function write($XGnt9, $AhHrL) { $Sba0r = time(); if (!(md5($AhHrL) !== $this->sessionHash || $Sba0r > $this->modifiedAt + $this->updateInterval)) { goto TTuS2; } if (!($this->autoRenewRememberMe && $this->isPersistent)) { goto TpHDN; } $pZJ2Q = session_get_cookie_params(); Application::getInstance()->getResponse()->setCookie(session_name(), $XGnt9, $Sba0r + $this->lifetime, $pZJ2Q["path"], $pZJ2Q["domain"], $pZJ2Q["secure"], $pZJ2Q["httponly"]); TpHDN: return $this->save($XGnt9, $this->autoRenewRememberMe ? $this->lifetime : $this->lifetime - ($Sba0r - $this->modifiedAt), $AhHrL); TTuS2: return true; } public function destroy($XGnt9) { return $this->delete($XGnt9); } public function gc($fDiPm) { return $this->deleteExpired($fDiPm); } protected abstract function load($XGnt9); protected abstract function save($XGnt9, $aj4VK, $AhHrL); protected abstract function delete($XGnt9); protected abstract function deleteExpired($eUjNz); } namespace Alumentum; class SessionHandlerMysql extends SessionHandlerAbstract { private $connectionName; private $connection; public function __construct($aufVH) { $this->connectionName = $aufVH; } public function open($R7pov = '', $fCMb6 = '') { $this->connection = Db::getInstance()->getConnection($this->connectionName, Db::TYPE_READ_WRITE); return true; } protected function load($XGnt9) { $LMXXm = "
SELECT\xa\x9\x9\x9 data, modified_at, expires_at
\x9\x9FROM
\x9\x9 sessions\xa\x9\x9 WHERE
\x9 \x9id = :sessionId AND expires_at > :currentTime\xa \x9"; $h1cMa = $this->connection->query($LMXXm, array("sessionId" => $XGnt9, "currentTime" => time()))->fetchRow(); return $h1cMa === false ? array("data" => '', "modifiedAt" => 0, "lifetime" => 0) : array("data" => $h1cMa["data"], "modifiedAt" => (int) $h1cMa["modified_at"], "lifetime" => (int) $h1cMa["expires_at"] - (int) $h1cMa["modified_at"]); } protected function save($XGnt9, $aj4VK, $AhHrL) { $LMXXm = "
\x9\x9 INSERT INTO
\x9 sessions
\x9\x9(id, data, modified_at, expires_at)\xa VALUES\xa\x9\x9\x9 (:sessionId, :data1, :modifiedAt1, :expiresAt1)\xa \x9 ON DUPLICATE KEY UPDATE\xa\x9 data = :data2, modified_at = :modifiedAt2, expires_at = :expiresAt2\xa\x9\x9"; $AZP2m = time(); $this->connection->query($LMXXm, array("sessionId" => $XGnt9, "data1" => $AhHrL, "data2" => $AhHrL, "modifiedAt1" => $AZP2m, "modifiedAt2" => $AZP2m, "expiresAt1" => $AZP2m + $aj4VK, "expiresAt2" => $AZP2m + $aj4VK)); return true; } protected function delete($XGnt9) { $LMXXm = "\xa\x9\x9\x9DELETE FROM\xa sessions\xa\x9 WHERE\xa \x9 \x9id = :sessionId
\x9\x9"; $this->connection->query($LMXXm, array("sessionId" => $XGnt9)); return true; } protected function deleteExpired($eUjNz) { $LMXXm = "\xa\x9 \x9DELETE FROM\xa \x9\x9sessions\xa \x9 WHERE
\x9\x9\x9expires_at < :currentTime\xa \x9"; $this->connection->query($LMXXm, array("currentTime" => time())); return true; } } namespace Alumentum; abstract class ErrorHandlerAbstract { const E_EXCEPTION = 1073741824; public static $errorNames = array(E_ERROR => "Fatal Error", E_WARNING => "Warning", E_PARSE => "Parse Error", E_NOTICE => "Notice", E_CORE_ERROR => "Core Error", E_CORE_WARNING => "Core Warning", E_COMPILE_ERROR => "Compile Error", E_COMPILE_WARNING => "Compile Warning", E_USER_ERROR => "User Error", E_USER_WARNING => "User Warning", E_USER_NOTICE => "User Notice", E_STRICT => "Strict", E_RECOVERABLE_ERROR => "Recoverable Error", E_DEPRECATED => "Deprecated", E_USER_DEPRECATED => "User Deprecated", self::E_EXCEPTION => "Exception"); public abstract function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r); } namespace Alumentum; use AlumentumPortal\AluVarDumper; class ErrorHandlerFile extends ErrorHandlerAbstract { private $ignoredVariables = array("HTTP_GET_VARS", "HTTP_POST_VARS", "HTTP_COOKIE_VARS", "HTTP_SERVER_VARS", "HTTP_POST_FILES", "HTTP_SESSION_VARS", "HTTP_ENV_VARS", "GLOBALS", "_ENV", "_REQUEST", "_FILES"); private $logPath; public function __construct($vibYS) { $this->logPath = $vibYS; } public function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r) { $G6EXD = $NnBmC . ".log"; if (file_exists($this->logPath . $G6EXD)) { goto Zn0No; } $hZI0C = "[" . self::$errorNames[$dnbH6] . "] " . $CBRMl . " [" . $oHn6t . ", " . $CJfhk . ". sor]" . "\xa" . "Hiba azonos\303\xadt\xc3\263: " . $NnBmC . "\xa" . "Id\xc5\221pont: " . date("Y-m-d H:i:s", $Sba0r) . "
"; $hZI0C .= "\xa----------------------------------------\xa"; $hZI0C .= "- Bet\xc3\266lt\303\xb6tt file-ok -
"; $hZI0C .= "----------------------------------------\xa"; foreach (get_included_files() as $Saw4x) { $hZI0C .= $Saw4x . "
"; qDmNe: } yHoHL: $CTKqP = debug_backtrace(); $cTIQb = count($CTKqP); if (!($cTIQb > 1)) { goto mDErX; } $hZI0C .= "
\xa----------------------------------------\xa"; $hZI0C .= "- Debug backtrace -
"; $hZI0C .= "----------------------------------------\xa"; $mwC1X = 1; GIT0g: if (!($mwC1X < $cTIQb)) { goto xd9U0; } $CTKqP[$mwC1X] += array("file" => "?", "line" => "?"); $hZI0C .= $CTKqP[$mwC1X]["function"] . "() [" . $CTKqP[$mwC1X]["file"] . ", " . $CTKqP[$mwC1X]["line"] . ". sor]\xa"; KVgHM: $mwC1X++; goto GIT0g; xd9U0: mDErX: $pjR8S = array(); $hZI0C .= "\xa
----------------------------------------
"; $hZI0C .= "- V\303\241ltoz\303\xb3k -\xa"; $hZI0C .= "----------------------------------------
"; foreach ($xYAch as $p5e6p => $mCvrK) { if (in_array($p5e6p, $this->ignoredVariables)) { goto TaHd0; } $pjR8S[$p5e6p] = $mCvrK; TaHd0: OCDg_: } ccGq6: $pjR8S += array("_SERVER" => $_SERVER, "_GET" => $_GET, "_POST" => $_POST, "_COOKIE" => $_COOKIE); if (isset($xYAch["GLOBALS"])) { goto GP8jz; } $IIS58 = array(); $bMoPy = array_merge($this->ignoredVariables, array("GLOBALS", "_GET", "_POST", "_COOKIE", "_SERVER")); foreach ($GLOBALS as $p5e6p => $mCvrK) { if (in_array($p5e6p, $bMoPy)) { goto pevft; } $IIS58[$p5e6p] = $mCvrK; pevft: pbEz8: } hrO7z: $pjR8S["GLOBALS"] = $IIS58; GP8jz: $hZI0C .= AluVarDumper::dump($pjR8S); @file_put_contents($this->logPath . $G6EXD, $hZI0C); @chmod($this->logPath . $G6EXD, 0644); Zn0No: } } namespace Alumentum; class ErrorHandlerSyslog extends ErrorHandlerAbstract { private $syslogTag; private $syslogFacility; public function __construct($yGi3C = "PHP", $expny = LOG_LOCAL7) { $this->syslogTag = $yGi3C; $this->syslogFacility = $expny; } public function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r) { switch ($dnbH6) { case E_ERROR: case E_PARSE: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: case self::E_EXCEPTION: $y27Tr = LOG_ERR; goto TcPgB; case E_WARNING: case E_CORE_WARNING: case E_COMPILE_WARNING: case E_USER_WARNING: case E_RECOVERABLE_ERROR: $y27Tr = LOG_WARNING; goto TcPgB; case E_NOTICE: case E_USER_NOTICE: case E_STRICT: case E_DEPRECATED: case E_USER_DEPRECATED: default: $y27Tr = LOG_NOTICE; } zh9jN: TcPgB: @openlog($this->syslogTag, LOG_NDELAY, $this->syslogFacility); $CBRMl = str_replace(PHP_EOL, '', $CBRMl); @syslog($y27Tr, "[" . self::$errorNames[$dnbH6] . "] " . $CBRMl . " [" . $oHn6t . ", " . $CJfhk . ". sor] [id=" . $NnBmC . "]"); @closelog(); } } namespace Alumentum; class ErrorHandlerFilter extends ErrorHandlerAbstract { private $errorHandler; private $filterCallback; public function __construct(ErrorHandlerAbstract $FAxMQ, $QLiSX) { $this->errorHandler = $FAxMQ; $this->filterCallback = $QLiSX; } public function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r) { if (!call_user_func($this->filterCallback, $NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch, $Sba0r)) { goto JpioA; } return; JpioA: $this->errorHandler->handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch, $Sba0r); } } namespace Alumentum; class UrlHelper { public static function url($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { return htmlspecialchars(Application::getInstance()->getRouter()->generateUrl($p5Lm2, $u6GFy, $wyQsJ, $oA9V3), ENT_QUOTES); } }
?>
Did this file decode correctly?
Original Code
<?php
namespace Alumentum; class Config { protected static $settings = array(); public static function get($EMrXw, $xoUHz = null) { if (!empty($EMrXw)) { goto elatS; } return $xoUHz; elatS: $A6Df_ = null; if ($EMrXw[strlen($EMrXw) - 1] == "\x2a") { goto wMGBd; } $A6Df_ = isset(self::$settings[$EMrXw]) ? self::$settings[$EMrXw] : $xoUHz; goto F1Srk; wMGBd: $EMrXw = substr($EMrXw, 0, -1); if (empty($EMrXw)) { goto VmvD2; } $A6Df_ = array(); foreach (self::$settings as $p5e6p => $mCvrK) { if (!(strpos($p5e6p, $EMrXw) === 0)) { goto AK5jT; } $A6Df_[$p5e6p] = $mCvrK; AK5jT: rg2l2: } zeWy1: goto C1rgu; VmvD2: $A6Df_ = self::$settings; C1rgu: F1Srk: return $A6Df_; } public static function set($FIAo6, $mCvrK = null) { if (is_array($FIAo6)) { goto iPW__; } self::$settings[$FIAo6] = $mCvrK; goto mMoKI; iPW__: self::$settings = array_merge(self::$settings, $FIAo6); mMoKI: } public static function remove($EMrXw) { unset(self::$settings[$EMrXw]); } public static function clear() { self::$settings = array(); } } namespace Alumentum; class Events { const REMOVE_HANDLER = "\162\x65\x6d\x6f\166\145\137\x68\141\x6e\x64\x6c\145\162"; protected static $listeners = array(); public static function triggerEvent($EMrXw, array $cNacg = array()) { if (!isset(self::$listeners[$EMrXw])) { goto FtB_F; } foreach (self::$listeners[$EMrXw] as $FQVnq) { $A6Df_ = call_user_func_array($FQVnq, $cNacg); if (!($A6Df_ === self::REMOVE_HANDLER)) { goto hW2xL; } self::removeEventListener($EMrXw, $FQVnq); hW2xL: AmbzD: } LHOt7: FtB_F: } public static function addEventListener($EMrXw, $FQVnq) { if (isset(self::$listeners[$EMrXw])) { goto EDePz; } self::$listeners[$EMrXw] = array($FQVnq); goto MviVa; EDePz: self::$listeners[$EMrXw][] = $FQVnq; MviVa: } public static function removeEventListener($EMrXw, $FQVnq) { if (!isset(self::$listeners[$EMrXw])) { goto nluZz; } $wl7tJ = array_search($FQVnq, self::$listeners[$EMrXw]); if (!($wl7tJ !== false)) { goto bFGN3; } unset(self::$listeners[$EMrXw][$wl7tJ]); if (!empty(self::$listeners[$EMrXw])) { goto XJH4U; } unset(self::$listeners[$EMrXw]); XJH4U: bFGN3: nluZz: } } namespace Alumentum; class Request { const GET = "\107\105\124"; const POST = "\x50\x4f\123\x54"; protected $uri; protected $params = array(); public function __construct() { $yWe9Y = strpos($_SERVER["\x52\105\x51\125\105\123\x54\x5f\125\x52\x49"], "\x3f"); $this->uri = $yWe9Y !== false ? substr($_SERVER["\122\105\121\x55\x45\x53\x54\x5f\x55\122\111"], 0, $yWe9Y) : $_SERVER["\x52\105\x51\x55\105\x53\x54\x5f\x55\x52\111"]; $this->filterInvalidValues($_GET); $this->filterInvalidValues($_POST); $this->filterInvalidValues($_COOKIE); } protected function filterInvalidValues(array &$VZkEp, $lolFM = "\125\124\106\x2d\x38") { foreach ($VZkEp as $p5e6p => &$mCvrK) { if (is_array($mCvrK)) { goto vjtUD; } if (mb_convert_encoding($mCvrK, $lolFM, $lolFM) != $mCvrK) { goto rfo04; } goto X2Tv1; vjtUD: $this->filterInvalidValues($mCvrK, $lolFM); goto X2Tv1; rfo04: unset($VZkEp[$p5e6p]); X2Tv1: puxJY: } NY7M3: } public function get($EMrXw, $dXlVr = "\x55\x47\120\x43") { foreach (str_split($dXlVr) as $C8vCK) { switch ($C8vCK) { case "\125": if (!isset($this->params[$EMrXw])) { goto ogQtb; } return $this->params[$EMrXw]; ogQtb: goto xy_Hk; case "\107": if (!isset($_GET[$EMrXw])) { goto hVs4Y; } return $_GET[$EMrXw]; hVs4Y: goto xy_Hk; case "\x50": if (!isset($_POST[$EMrXw])) { goto pDpoT; } return $_POST[$EMrXw]; pDpoT: goto xy_Hk; case "\x43": if (!isset($_COOKIE[$EMrXw])) { goto s9Rlq; } return $_COOKIE[$EMrXw]; s9Rlq: goto xy_Hk; default: throw new \Exception("\x4e\145\155\40\x6c\x65\164\x65\x7a\151\x6b\40\141\x20\153\157\x76\145\x74\x6b\145\x7a\157\x20\162\x65\161\x75\x65\x73\164\40\x70\x61\162\141\155\x65\x74\x65\x72\40\x74\x69\160\165\x73\x3a\x20" . $C8vCK); } T2cmB: xy_Hk: uaJeR: } z8Wnb: return null; } private function hasParam($EMrXw) { if (isset($this->params[$EMrXw])) { goto GrzsV; } if (isset($_GET[$EMrXw])) { goto yUbLa; } if (isset($_POST[$EMrXw])) { goto IXavo; } if (isset($_COOKIE[$EMrXw])) { goto P9e2R; } goto k4mbr; GrzsV: return true; goto k4mbr; yUbLa: return true; goto k4mbr; IXavo: return true; goto k4mbr; P9e2R: return true; k4mbr: return false; } public function has($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if ($this->hasParam($EMrXw)) { goto dEKl9; } $A6Df_ = false; goto M9bD1; dEKl9: bFy1x: } M9bD1: return $A6Df_; } public function hasGet($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if (isset($_GET[$EMrXw])) { goto q7u3S; } $A6Df_ = false; goto ni6cu; q7u3S: GbC0f: } ni6cu: return $A6Df_; } public function hasPost($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if (isset($_POST[$EMrXw])) { goto vSHzj; } $A6Df_ = false; goto lD8WX; vSHzj: WGnuY: } lD8WX: return $A6Df_; } public function hasCookie($EMrXw) { $A6Df_ = true; foreach (func_get_args() as $EMrXw) { if (isset($_COOKIE[$EMrXw])) { goto x3VGj; } $A6Df_ = false; goto mPtyY; x3VGj: QU9Uf: } mPtyY: return $A6Df_; } public function getGet($EMrXw, $xoUHz = null) { return isset($_GET[$EMrXw]) ? $_GET[$EMrXw] : $xoUHz; } public function getPost($EMrXw, $xoUHz = null) { return isset($_POST[$EMrXw]) ? $_POST[$EMrXw] : $xoUHz; } public function getCookie($EMrXw, $xoUHz = null) { return isset($_COOKIE[$EMrXw]) ? $_COOKIE[$EMrXw] : $xoUHz; } public function set($EMrXw, $mCvrK) { $this->params[$EMrXw] = $mCvrK; } public function getAll() { return array_merge($_COOKIE, $_POST, $_GET, $this->params); } public function getAllGet() { return $_GET; } public function getAllPost() { return $_POST; } public function getAllCookie() { return $_COOKIE; } public function getFiles() { $Zd1QX = array(); foreach ($_FILES as $C8IsG => $mxjrD) { foreach ($mxjrD as $T4ImC => $VfSG9) { if (is_array($VfSG9)) { goto s5opl; } $Zd1QX[$C8IsG][$T4ImC] = $VfSG9; goto nkRCB; s5opl: foreach ($VfSG9 as $khRCI => $yJcpi) { $Zd1QX[$C8IsG][$khRCI][$T4ImC] = $yJcpi; vxlt8: } dt6_5: nkRCB: ASiYZ: } J06s7: IcDs1: } RRXbB: return $Zd1QX; } public function getMethod() { return $_SERVER["\122\x45\121\125\105\123\x54\137\x4d\105\x54\110\117\104"]; } public function getUri() { return $this->uri; } public function getUrl() { return $_SERVER["\122\x45\121\x55\x45\123\x54\x5f\125\122\x49"]; } public function getDomain() { return $_SERVER["\x53\105\122\126\x45\x52\137\x4e\101\115\105"]; } public function getIp() { return isset($_SERVER["\x52\x45\115\117\x54\x45\137\x41\x44\x44\x52"]) ? $_SERVER["\122\105\x4d\x4f\x54\105\x5f\x41\x44\104\122"] : ''; } public function getReferrer() { return isset($_SERVER["\x48\x54\x54\120\137\x52\105\106\105\x52\105\122"]) ? $_SERVER["\110\124\124\120\x5f\122\x45\106\105\122\x45\x52"] : ''; } public function isReferrerOnSameDomain($Sp7na = true) { if (isset($_SERVER["\x48\124\124\x50\137\x52\105\x46\x45\x52\105\x52"])) { goto hk040; } return false; hk040: $CG1FE = @parse_url($_SERVER["\x48\x54\x54\120\137\122\105\x46\105\122\x45\122"], PHP_URL_HOST); if (!($CG1FE === false)) { goto JJnyd; } return false; JJnyd: if ($Sp7na) { goto dphU1; } return $CG1FE === $_SERVER["\x53\x45\x52\126\105\122\x5f\116\x41\x4d\105"]; goto GDGkU; dphU1: return $CG1FE === $_SERVER["\x53\105\122\x56\x45\122\137\x4e\x41\115\x45"] || stristr($CG1FE, "\x2e" . $_SERVER["\x53\105\x52\126\105\x52\137\x4e\x41\x4d\105"]) === "\56" . $_SERVER["\123\105\122\x56\x45\x52\x5f\x4e\101\115\105"] || stristr($_SERVER["\x53\105\x52\126\x45\122\137\x4e\101\x4d\105"], "\x2e" . $CG1FE) === "\x2e" . $CG1FE; GDGkU: } public function isRobotGenerated() { static $D2HV0 = array("\142\x6f\164", "\143\x72\x61\x77\x6c", "\143\x68\x65\x63\153\137\150\164\x74\x70", "\163\x70\151\x64\x65\x72", "\x66\x6c\141\x73\x68", "\163\145\x61\x72\143\150", "\151\141\137\x61\x72\143\x68\151\166\145\x72"); $bMaJx = !empty($_SERVER["\110\124\124\120\x5f\x55\123\x45\x52\x5f\101\107\105\x4e\x54"]) ? $_SERVER["\110\124\124\x50\x5f\125\x53\x45\122\x5f\101\x47\105\116\x54"] : ''; foreach ($D2HV0 as $Vitn0) { if (!(stripos($bMaJx, $Vitn0) !== false)) { goto AqXyi; } return true; AqXyi: RM_zR: } PShx3: return false; } public function isSecure() { return !empty($_SERVER["\x48\x54\124\x50\x53"]); } public function isAjaxRequest() { return isset($_SERVER["\110\124\124\x50\x5f\x58\x5f\122\105\121\x55\105\123\124\x45\104\137\127\x49\124\110"]) && $_SERVER["\x48\x54\x54\x50\x5f\130\137\x52\x45\121\x55\x45\123\124\105\x44\x5f\x57\x49\124\110"] == "\x58\115\x4c\110\164\x74\x70\x52\x65\161\165\145\163\x74"; } public function getUserAgent() { return isset($_SERVER["\110\124\124\120\x5f\125\123\x45\x52\137\101\x47\x45\x4e\x54"]) ? $_SERVER["\110\x54\124\x50\137\x55\x53\x45\x52\137\x41\x47\105\116\x54"] : ''; } public function getBrowserInfo($bMaJx = '') { if (!empty($bMaJx)) { goto C_DaY; } $bMaJx = $this->getUserAgent(); C_DaY: $bMaJx = strtolower($bMaJx); $tU4FW = array("\x6f\x73" => "\x3f", "\142\x72\x6f\167\163\145\162" => "\x3f", "\x76\x65\x72\163\151\x6f\156" => "\77"); if (!empty($bMaJx)) { goto Qtca7; } return $tU4FW; Qtca7: if (strpos($bMaJx, "\167\151\x6e\144\157\167\163") !== false) { goto BIKo1; } if (strpos($bMaJx, "\x6d\141\x63\x69\156\x74\157\163\x68") !== false) { goto dNp9R; } if (strpos($bMaJx, "\x6c\151\156\x75\170") !== false) { goto h76xV; } goto Um_z7; BIKo1: $tU4FW["\x6f\x73"] = "\167\x69\x6e"; goto Um_z7; dNp9R: $tU4FW["\x6f\x73"] = "\x6d\x61\143"; goto Um_z7; h76xV: $tU4FW["\x6f\x73"] = "\154\x69\x6e\165\x78"; Um_z7: $lr35b = array("\157\160\x65\162\141" => array("\x6e\141\155\145" => "\157\x70\145\x72\141", "\166\145\162\163\x69\x6f\x6e\120\x61\164\x74\x65\162\x6e" => "\x23\166\145\x72\163\151\157\x6e\57\x28\x5c\144\53\50\x3f\x3a\x5c\x2e\134\144\53\x29\77\51\43"), "\x6d\x73\x69\145" => array("\x6e\141\155\x65" => "\151\x65", "\x76\x65\x72\x73\x69\157\156\x50\141\164\164\145\x72\156" => "\43\155\x73\x69\145\40\x28\134\x64\53\x29\x23"), "\146\x69\162\x65\146\x6f\170" => array("\x6e\141\x6d\145" => "\x66\x66", "\166\145\162\x73\x69\157\x6e\x50\141\x74\x74\x65\162\156" => "\43\146\151\162\x65\x66\157\170\x2f\50\134\144\x2b\50\x3f\x3a\134\56\x5c\144\53\51\x3f\x29\43"), "\143\x68\x72\157\x6d\145" => array("\156\141\x6d\145" => "\143\150\162\x6f\155\145", "\166\145\x72\163\x69\157\x6e\120\x61\164\164\x65\162\x6e" => "\x23\x63\150\162\157\x6d\145\57\50\x5c\144\x2b\x28\x3f\72\134\56\134\x64\x2b\x29\x3f\51\x23")); WHlY4: foreach ($lr35b as $L3dyo => $RJVp7) { if (!(strpos($bMaJx, $L3dyo) !== false)) { goto t0ZrJ; } $tU4FW["\x62\162\157\x77\163\145\162"] = $RJVp7["\x6e\141\155\145"]; $Y0OLK = array(); if (!preg_match($RJVp7["\166\x65\162\163\151\157\156\x50\x61\x74\164\145\x72\x6e"], $bMaJx, $Y0OLK)) { goto UvgGw; } $tU4FW["\166\x65\x72\x73\151\157\156"] = $Y0OLK[1]; UvgGw: goto HQy2n; t0ZrJ: O6fZM: } wOHFT: if (!(strpos($bMaJx, "\163\x61\146\x61\x72\151") !== false)) { goto pI9r5; } $tU4FW["\142\x72\x6f\x77\x73\x65\x72"] = "\163\x61\x66\x61\162\x69"; if (preg_match("\43\x76\x65\x72\x73\151\x6f\x6e\57\x28\134\x64\x2b\x29\43", $bMaJx, $Y0OLK)) { goto Q3aOi; } if (preg_match("\x23\x61\x70\x70\x6c\x65\167\x65\x62\153\x69\x74\x2f\50\x5c\144\53\x29\x23", $bMaJx, $Y0OLK)) { goto dLjbh; } goto Etw4l; Q3aOi: $tU4FW["\x76\x65\162\163\x69\157\156"] = $Y0OLK[1]; goto Etw4l; dLjbh: $iuIG4 = array(85 => "\61", 401 => "\62", 521 => "\63", 528 => "\64", 533 => "\x35"); $FXh5q = $Y0OLK[1]; $k4OJC = array_keys($iuIG4); $TKkiI = current($k4OJC); u3No9: if (!($TKkiI > $FXh5q)) { goto egVpa; } $tU4FW["\166\x65\162\163\151\x6f\156"] = $iuIG4[prev($k4OJC)]; goto YAf9U; egVpa: if (($TKkiI = next($k4OJC)) !== false) { goto u3No9; } YAf9U: Etw4l: goto HQy2n; pI9r5: if (false) { goto WHlY4; } HQy2n: return $tU4FW; } } namespace Alumentum; class Response { const FORMAT_ATOM = "\141\x74\x6f\x6d"; const FORMAT_CSV = "\x63\x73\166"; const FORMAT_GIF = "\147\x69\146"; const FORMAT_HTML = "\x68\x74\x6d\154"; const FORMAT_JPG = "\152\160\147"; const FORMAT_JS = "\152\163"; const FORMAT_JSON = "\152\x73\x6f\156"; const FORMAT_PNG = "\x70\156\x67"; const FORMAT_RDF = "\162\x64\146"; const FORMAT_RSS = "\x72\163\163"; const FORMAT_RSS2 = "\162\x73\x73\x32"; const FORMAT_TXT = "\164\170\x74"; const FORMAT_XML = "\170\x6d\154"; const FORMAT_PDF = "\160\144\x66"; protected static $contentTypes = array(self::FORMAT_ATOM => "\x61\x70\x70\x6c\151\x63\x61\x74\x69\x6f\x6e\x2f\x61\164\157\x6d\53\170\x6d\154", self::FORMAT_CSV => "\141\160\160\154\151\x63\141\164\x69\157\156\57\166\x6e\144\x2e\x6d\163\55\145\x78\x63\145\154", self::FORMAT_GIF => "\x69\x6d\x61\x67\x65\x2f\147\151\x66", self::FORMAT_HTML => "\164\145\170\x74\57\x68\164\155\154", self::FORMAT_JPG => "\x69\x6d\141\x67\x65\57\152\160\x65\147", self::FORMAT_JS => "\164\x65\x78\x74\57\x6a\x61\166\x61\163\x63\162\x69\x70\x74", self::FORMAT_JSON => "\141\x70\x70\x6c\151\143\141\x74\151\157\x6e\x2f\x6a\163\157\x6e", self::FORMAT_PNG => "\x69\155\141\147\x65\57\x70\156\x67", self::FORMAT_RDF => "\141\x70\x70\154\151\143\141\x74\x69\157\156\x2f\x72\144\x66\x2b\170\x6d\154", self::FORMAT_RSS => "\141\160\160\x6c\x69\143\141\164\151\x6f\x6e\x2f\162\163\x73\x2b\170\x6d\154", self::FORMAT_RSS2 => "\141\160\160\x6c\151\x63\x61\x74\x69\x6f\x6e\57\162\163\x73\x2b\170\155\154", self::FORMAT_TXT => "\164\145\x78\164\x2f\x70\154\141\x69\x6e", self::FORMAT_XML => "\x61\160\x70\x6c\151\143\141\164\151\x6f\156\57\170\x6d\x6c", self::FORMAT_PDF => "\x61\160\x70\154\151\x63\141\x74\151\x6f\156\x2f\x70\144\146"); protected static $formatHandlers = array(); protected static $textFormats = array(self::FORMAT_ATOM, self::FORMAT_CSV, self::FORMAT_HTML, self::FORMAT_JS, self::FORMAT_JSON, self::FORMAT_RDF, self::FORMAT_RSS, self::FORMAT_RSS2, self::FORMAT_TXT, self::FORMAT_XML); protected $format = self::FORMAT_HTML; protected $charset = "\165\164\x66\55\70"; protected static $httpStatusCodes = array(100 => "\x43\157\156\164\x69\156\165\145", 101 => "\x53\x77\151\164\x63\x68\x69\x6e\147\x20\120\x72\157\x74\x6f\x63\157\154\x73", 200 => "\x4f\x4b", 201 => "\103\162\x65\141\164\x65\x64", 202 => "\101\143\x63\x65\x70\x74\x65\144", 203 => "\x4e\157\x6e\x2d\101\165\x74\x68\157\162\x69\x74\141\x74\x69\166\x65\x20\111\x6e\146\157\162\x6d\x61\x74\x69\157\x6e", 204 => "\116\157\x20\x43\157\156\x74\x65\156\164", 205 => "\122\145\163\145\x74\x20\x43\157\x6e\x74\145\156\164", 206 => "\x50\x61\x72\164\151\141\x6c\x20\x43\x6f\x6e\x74\x65\x6e\x74", 300 => "\x4d\165\154\x74\x69\160\154\145\x20\x43\x68\x6f\x69\143\145\163", 301 => "\115\x6f\x76\145\144\40\120\x65\162\155\x61\156\x65\x6e\x74\x6c\171", 302 => "\106\x6f\165\156\144", 303 => "\123\145\x65\x20\x4f\x74\150\145\162", 304 => "\116\157\164\40\115\157\x64\x69\146\x69\x65\144", 305 => "\125\x73\x65\x20\x50\x72\157\x78\x79", 307 => "\124\x65\x6d\160\157\162\141\x72\171\x20\122\x65\x64\x69\162\145\143\x74", 400 => "\102\141\144\40\122\x65\161\x75\145\x73\x74", 401 => "\125\156\141\165\164\150\157\162\151\172\x65\x64", 402 => "\120\x61\x79\155\x65\x6e\x74\40\x52\x65\161\165\151\x72\145\144", 403 => "\x46\157\x72\x62\x69\144\144\x65\x6e", 404 => "\116\x6f\x74\40\106\x6f\165\156\144", 405 => "\x4d\x65\164\x68\157\144\x20\x4e\x6f\x74\x20\101\154\154\157\167\x65\144", 406 => "\x4e\x6f\x74\40\x41\x63\143\x65\x70\x74\x61\142\154\x65", 407 => "\120\x72\157\x78\x79\x20\x41\x75\164\x68\x65\x6e\x74\151\143\141\x74\x69\x6f\156\40\122\x65\x71\x75\151\162\145\144", 408 => "\x52\x65\161\x75\x65\x73\x74\x20\124\x69\x6d\x65\157\165\164", 409 => "\103\x6f\x6e\x66\x6c\151\143\164", 410 => "\x47\157\x6e\x65", 411 => "\114\145\156\x67\164\150\40\x52\145\x71\165\x69\162\145\x64", 412 => "\x50\x72\x65\x63\157\156\144\x69\164\151\157\x6e\40\x46\x61\x69\154\145\x64", 413 => "\122\x65\161\165\145\x73\164\x20\105\x6e\164\x69\164\x79\40\124\157\157\x20\114\141\x72\x67\145", 414 => "\x52\x65\x71\x75\145\163\x74\x2d\x55\x52\111\40\x54\157\x6f\x20\114\x6f\x6e\x67", 415 => "\125\x6e\x73\165\160\160\x6f\x72\164\145\144\x20\x4d\x65\x64\151\x61\x20\x54\171\x70\145", 416 => "\x52\x65\x71\x75\x65\x73\x74\145\x64\40\162\141\156\x67\x65\40\x6e\157\x74\x20\163\x61\164\151\x73\x66\x69\141\142\x6c\145", 417 => "\x45\x78\x70\x65\x63\164\141\x74\x69\157\156\x20\106\x61\x69\x6c\x65\144", 500 => "\111\156\164\x65\162\156\x61\154\40\123\145\x72\x76\x65\162\40\105\x72\162\x6f\x72", 501 => "\x4e\x6f\x74\x20\x49\155\x70\x6c\x65\155\145\x6e\x74\x65\144", 502 => "\x42\x61\x64\x20\107\x61\x74\x65\167\141\x79", 503 => "\123\145\x72\x76\x69\143\x65\40\x55\x6e\141\x76\x61\x69\154\x61\x62\x6c\145", 504 => "\x47\x61\164\145\x77\141\171\40\x54\x69\x6d\x65\x6f\x75\164", 505 => "\110\x54\124\x50\x20\126\x65\x72\x73\151\157\x6e\40\x4e\x6f\164\40\x53\x75\x70\x70\x6f\162\164\145\x64"); protected $httpStatusCode = 200; protected $cacheTtl; protected $headers = array(); protected $cookies = array(); protected $filename = ''; protected $content = ''; public function __construct() { $this->cacheTtl = Config::get("\163\171\163\x74\145\155\x2e\x72\x65\163\x70\x6f\x6e\163\145\x2e\143\x61\143\150\x65\x54\x74\154", -1); } public static function getHttpStatusMessage($dnbH6) { return isset(self::$httpStatusCodes[$dnbH6]) ? self::$httpStatusCodes[$dnbH6] : ''; } public static function addFormat($b_2w4, $gEfJs, $JqTr8) { self::$contentTypes[$b_2w4] = $gEfJs; if (!$JqTr8) { goto TS2Q6; } self::$textFormats[] = $b_2w4; TS2Q6: } public static function registerFormatHandler($b_2w4, IResponseFormatHandler $NJuGc) { self::$formatHandlers[$b_2w4] = $NJuGc; } public static function getFormatHandler($b_2w4) { return isset(self::$formatHandlers[$b_2w4]) ? self::$formatHandlers[$b_2w4] : null; } public function getFormat() { return $this->format; } public function setFormat($b_2w4) { if (isset(self::$contentTypes[$b_2w4])) { goto nonCi; } throw new \Exception("\111\x73\155\x65\x72\145\x74\154\x65\156\x20\x76\141\x6c\141\x73\172\x20\146\x6f\x72\x6d\141\x74\x75\x6d\x3a\40" . $b_2w4); nonCi: $this->format = $b_2w4; } public function getCharset() { return $this->charset; } public function setCharset($Jdk_3) { $this->charset = $Jdk_3; } public function getHttpStatusCode() { return $this->httpStatusCode; } public function setHttpStatusCode($dnbH6) { if (isset(self::$httpStatusCodes[$dnbH6])) { goto tpev9; } throw new \Exception("\111\163\155\x65\162\x65\164\x6c\145\x6e\40\110\x54\x54\x50\40\x73\x74\x61\x74\x75\x73\172\40\153\x6f\x64\x3a\40" . $dnbH6); tpev9: $this->httpStatusCode = $dnbH6; } public function setHeader($EMrXw, $mCvrK, $KdiFb = true) { if ($KdiFb || !isset($this->headers[$EMrXw])) { goto fM2lN; } $this->headers[$EMrXw][] = $mCvrK; goto jNsFn; fM2lN: $this->headers[$EMrXw] = array($mCvrK); jNsFn: } public function clearHeaders() { $this->headers = array(); header_remove(); } public function setCookie($EMrXw, $mCvrK = '', $gX0i7 = 0, $hnSkN = '', $MM7Ld = '', $n8a7o = false, $IsPMy = false, $KxW6s = '') { if (!empty($MM7Ld)) { goto zvSEZ; } $MM7Ld = $_SERVER["\110\124\x54\120\x5f\110\117\123\124"]; goto TXARN; zvSEZ: if (!(substr($MM7Ld, 0, 4) == "\167\167\167\x2e")) { goto Mizov; } $MM7Ld = substr($MM7Ld, 4); Mizov: TXARN: $CzmK9 = strpos($MM7Ld, "\x3a"); if (!($CzmK9 !== false)) { goto K291m; } $MM7Ld = substr($MM7Ld, 0, $CzmK9); K291m: $QuZND = rawurlencode($EMrXw) . "\75" . rawurlencode($mCvrK); if (!($mCvrK === '')) { goto SXCnO; } $QuZND .= "\x3b\x20\x4d\141\170\x2d\x41\x67\x65\75\60"; SXCnO: if (empty($gX0i7)) { goto nd0rU; } $QuZND .= "\x3b\40\x45\170\160\x69\x72\x65\163\x3d" . gmdate("\x44\x2c\40\144\x2d\115\55\x59\x20\x48\72\151\72\163", $gX0i7) . "\x20\107\x4d\x54"; nd0rU: if (!empty($hnSkN)) { goto ijJqo; } $QuZND .= "\x3b\x20\120\141\164\150\x3d\57"; goto DXc2h; ijJqo: $QuZND .= "\x3b\40\120\x61\164\x68\75" . $hnSkN; DXc2h: $QuZND .= "\73\40\x44\x6f\x6d\141\151\156\75" . $MM7Ld; if (!$IsPMy) { goto pPwMl; } $QuZND .= "\73\40\x48\x74\x74\x70\x4f\156\154\171"; pPwMl: if (Application::getInstance()->getRequest()->isSecure()) { goto jZPHQ; } if (empty($KxW6s)) { goto wWP2q; } $QuZND .= "\73\x20\123\141\x6d\145\123\x69\x74\145\75" . $KxW6s; wWP2q: if (!$n8a7o) { goto hsckF; } $QuZND .= "\x3b\40\123\x65\143\165\162\145"; hsckF: goto lK3eF; jZPHQ: $QuZND .= "\73\40\x53\x61\155\145\123\151\x74\x65\75" . ($KxW6s ?: "\116\157\156\x65"); if (!($n8a7o || empty($KxW6s) || $KxW6s === "\x4e\x6f\156\145")) { goto svOeN; } $QuZND .= "\73\x20\123\145\143\x75\x72\x65"; svOeN: lK3eF: $this->cookies[$EMrXw] = $QuZND; } public function deleteCookie($EMrXw, $hnSkN = '', $MM7Ld = '', $n8a7o = false, $IsPMy = false) { $this->setCookie($EMrXw, '', 1, $hnSkN, $MM7Ld, $n8a7o, $IsPMy); } public function getFilename() { return $this->filename; } public function setFilename($Saw4x) { $this->filename = str_replace("\42", "\47", $Saw4x); } public function getContent() { return $this->content; } public function setContent($dl6OX) { $this->content = $dl6OX; } public function appendToContent($dl6OX) { $this->content .= $dl6OX; } public function clear() { $this->clearHeaders(); $this->setContent(''); } public function generateOutput($AhHrL) { $NJuGc = self::getFormatHandler($this->format); if (!($NJuGc === null)) { goto ZiXg0; } throw new \Exception("\x41\x20\42" . $this->format . "\x22\x20\x6b\x69\x6d\x65\156\145\x74\151\40\x66\x6f\162\155\x61\164\x75\155\x68\x6f\172\x20\x6e\x69\156\x63\163\x20\155\145\147\141\144\x76\x61\40\x6b\x65\x7a\x65\154\x6f"); ZiXg0: return $NJuGc->generateOutput($AhHrL); } public function setCacheTtl($G6U3Z) { $this->cacheTtl = $G6U3Z; } protected function sendHeaders() { header_remove("\123\145\164\55\103\x6f\x6f\x6b\151\x65"); header("\110\124\124\x50\x2f\x31\x2e\61\x20" . $this->httpStatusCode . "\x20" . self::$httpStatusCodes[$this->httpStatusCode]); $gEfJs = self::$contentTypes[$this->format]; if (!in_array($this->format, self::$textFormats)) { goto tuXHi; } $gEfJs .= "\73\x20\x63\x68\x61\162\163\145\164\75" . $this->charset; tuXHi: $this->setHeader("\x43\157\x6e\x74\x65\x6e\x74\55\124\171\x70\x65", $gEfJs); if (empty($this->filename)) { goto RjbjN; } $this->setCacheTtl(0); $this->setHeader("\103\157\156\164\x65\156\x74\x2d\104\x69\163\160\157\x73\x69\x74\x69\x6f\156", "\x61\x74\x74\141\143\x68\155\x65\x6e\x74\x3b\x20\x66\151\x6c\145\x6e\x61\155\x65\75\x22" . $this->filename . "\42"); RjbjN: if ($this->cacheTtl === 0) { goto OhJxo; } if ($this->cacheTtl > 0) { goto rb7YC; } goto kCRkU; OhJxo: $this->setHeader("\x43\x61\x63\150\145\x2d\103\157\x6e\164\162\157\x6c", "\x6d\141\x78\55\141\x67\x65\x3d\60\x2c\156\x6f\x2d\x63\141\143\150\145\x2c\156\x6f\55\x73\x74\157\x72\145\x2c\x6d\165\163\164\55\x72\145\x76\x61\154\x69\144\x61\164\x65\54\x70\x6f\163\164\55\x63\x68\145\x63\x6b\75\60\54\x70\162\x65\x2d\143\150\145\143\x6b\x3d\x30"); $this->setHeader("\x45\170\x70\x69\162\145\163", 0); $this->setHeader("\x50\x72\x61\x67\x6d\141", "\156\157\x2d\x63\141\143\150\x65"); goto kCRkU; rb7YC: $this->setHeader("\103\x61\x63\150\x65\55\x43\x6f\x6e\x74\x72\x6f\x6c", "\x6d\x61\170\x2d\141\147\145\x3d" . $this->cacheTtl); $this->setHeader("\x45\x78\160\151\x72\145\163", date("\162", time() + $this->cacheTtl)); kCRkU: foreach ($this->headers as $wzw7C => $RjlQP) { foreach ($RjlQP as $mCvrK) { header($wzw7C . "\72\40" . $mCvrK); dfQ6U: } uA5nW: pa_GX: } gsJof: foreach ($this->cookies as $mCvrK) { header("\x53\145\164\55\x43\x6f\157\153\x69\x65\x3a\40" . $mCvrK, false); z9WtU: } IEOwm: } public function send() { Events::triggerEvent("\x73\x79\163\x74\x65\x6d\x2e\x62\145\x66\x6f\162\x65\x5f\x73\145\156\144\x5f\x72\145\163\x70\157\x6e\163\x65"); $this->sendHeaders(); echo $this->content; Events::triggerEvent("\x73\171\163\164\145\155\56\x61\146\164\145\x72\137\x73\145\x6e\x64\137\162\x65\x73\x70\157\156\163\x65"); } } namespace Alumentum; interface IResponseFormatHandler { public function generateOutput($AhHrL); } namespace Alumentum; class ResponseFormatHandlerJson implements IResponseFormatHandler { public function generateOutput($AhHrL) { return json_encode($AhHrL); } } namespace Alumentum; class Router { protected $routes = array(); protected $namespace = ''; protected $ignoreUriTrailingSlash = false; public function addRoutes(array $M6fNV) { if (empty($this->routes)) { goto O0FYK; } $this->routes = array_merge($this->routes, $M6fNV); goto b1vgL; O0FYK: $this->routes = $M6fNV; b1vgL: } public function setIgnoreUriTrailingSlash($JqJy2) { $this->ignoreUriTrailingSlash = $JqJy2; } public function setNamespace($JZE13) { $this->namespace = $JZE13; } public function getNamespace() { return $this->namespace; } protected function generateRegExpFromUriPattern($TjWA0) { $cNacg = array(); preg_match_all("\43\134\173\50\x3f\120\74\x6e\x61\155\x65\x3e\x5c\x77\x2b\51\72\50\x3f\120\74\x74\x79\x70\x65\76\x5c\x77\x2b\174\x5c\52\x29\50\77\72\x5c\50\x28\77\120\74\x70\141\162\x61\155\x3e\56\53\x3f\51\x5c\51\51\x3f\x5c\x7d\43", $TjWA0, $cNacg, PREG_SET_ORDER); $de3YX = array("\x7b\x2a\175"); $bV75g = array("\x2e\x2a\x3f"); foreach ($cNacg as $Fj3Fc) { $de3YX[] = $Fj3Fc[0]; switch ($Fj3Fc["\164\x79\x70\145"]) { case "\x6e\165\x6d": $bV75g[] = "\x28\77\x50\74" . $Fj3Fc["\x6e\141\x6d\x65"] . "\x3e\x5b\x30\55\x39\135\53\51"; goto Ey9U1; case "\x61\154\160\150\141": $bV75g[] = "\50\x3f\x50\x3c" . $Fj3Fc["\x6e\x61\x6d\x65"] . "\76\x5b\x61\x2d\172\101\x2d\132\135\x2b\51"; goto Ey9U1; case "\x61\154\x6e\x75\x6d": $bV75g[] = "\x28\x3f\120\x3c" . $Fj3Fc["\156\141\155\145"] . "\x3e\133\x61\x2d\x7a\x41\55\x5a\x30\x2d\x39\x5d\53\51"; goto Ey9U1; case "\145\156\x75\155": if (preg_match("\57\x5e\133\x61\x2d\172\x41\x2d\132\x30\x2d\71\137\x2d\x5d\53\x28\x3f\x3a\x5c\174\x5b\141\55\x7a\x41\55\132\x30\55\71\x5f\55\x5d\53\51\x2a\44\57", $Fj3Fc["\x70\x61\x72\141\155"])) { goto jVvpl; } throw new \Exception("\x48\x69\142\141\x73\x20\x65\156\x75\155\40\x74\x69\x70\x75\163\72\40" . $Fj3Fc["\x70\141\162\x61\x6d"]); jVvpl: $bV75g[] = "\50\77\x50\x3c" . $Fj3Fc["\x6e\x61\x6d\x65"] . "\x3e" . $Fj3Fc["\160\141\x72\141\x6d"] . "\51"; goto Ey9U1; case "\162\145\147\x65\170\160": $bV75g[] = "\50\x3f\120\x3c" . $Fj3Fc["\156\x61\x6d\145"] . "\76" . str_replace("\x23", "\x5c\43", $Fj3Fc["\160\141\162\141\x6d"]) . "\x29"; goto Ey9U1; case "\x61\156\171": $bV75g[] = "\x28\x3f\120\74" . $Fj3Fc["\156\x61\x6d\x65"] . "\76\133\x5e\x2f\x5d\53\x29"; goto Ey9U1; case "\52": $bV75g[] = "\x28\x3f\120\x3c" . $Fj3Fc["\156\x61\x6d\x65"] . "\76\x2e\x2a\77\x29"; goto Ey9U1; default: throw new \Exception("\111\x73\155\x65\162\145\164\154\145\x6e\40\162\157\x75\164\151\156\x67\x20\160\x61\162\141\155\x65\164\145\x72\x20\164\151\160\165\x73\x3a\x20" . $Fj3Fc["\164\x79\x70\x65"]); } iXMQh: Ey9U1: q8sCt: } gDVVP: return "\x23\136" . str_replace($de3YX, $bV75g, $TjWA0) . "\x24\43"; } public function getRouteHandler($TjWA0, $UXc0i = "\107\x45\124", $tGICc = true) { if (!$this->ignoreUriTrailingSlash) { goto UKYyR; } $TjWA0 = rtrim($TjWA0, "\x2f"); UKYyR: $cNacg = array(); $NJuGc = null; foreach ($this->routes as $p5Lm2 => $g_c2o) { if (!($g_c2o[0] === "\133")) { goto trTP9; } list($U44ST, $g_c2o) = explode("\x5d", substr($g_c2o, 1), 2); if (!($U44ST !== $UXc0i)) { goto szWG6; } goto z0Xpo; szWG6: trTP9: $Wv4q9 = strpos($g_c2o, "\173"); if ($Wv4q9 === false) { goto AJ7jx; } if (!(strncmp($TjWA0, $g_c2o, $Wv4q9) === 0)) { goto qZSWd; } $Hpjyk = $this->generateRegExpFromUriPattern($g_c2o); if (!preg_match($Hpjyk, $TjWA0, $cNacg)) { goto r3Tl9; } $NJuGc = $p5Lm2; foreach ($cNacg as $p5e6p => $mCvrK) { if (!is_int($p5e6p)) { goto NpjKy; } unset($cNacg[$p5e6p]); NpjKy: ZONoJ: } r_rXX: goto R0hgU; r3Tl9: qZSWd: goto v3kCZ; AJ7jx: if (!($TjWA0 === $g_c2o)) { goto XAJar; } $NJuGc = $p5Lm2; goto R0hgU; XAJar: v3kCZ: z0Xpo: } R0hgU: if (empty($NJuGc)) { goto RdSJ6; } list($qKnWr, $DcRAY) = explode("\x2f", $NJuGc); return array("\143\x6f\x6e\164\162\157\154\x6c\x65\x72" => (!empty($this->namespace) && $tGICc ? $this->namespace . "\x5c" : '') . $qKnWr, "\x61\x63\164\x69\x6f\x6e" => $DcRAY, "\x70\141\162\x61\x6d\163" => $cNacg); goto lsDaz; RdSJ6: return null; lsDaz: } public function generateUrl($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { if (isset($this->routes[$p5Lm2])) { goto wm6V3; } throw new \Exception("\116\145\155\40\x6c\145\164\145\x7a\x69\153\40\141\x20\153\157\166\x65\x74\x6b\145\x7a\x6f\40\x72\157\x75\164\145\x20\x6b\x65\172\x65\x6c\x6f\x3a\40" . $p5Lm2); wm6V3: $TjWA0 = $this->routes[$p5Lm2]; if (!($TjWA0[0] === "\x5b")) { goto uLY00; } $TjWA0 = substr($TjWA0, strpos($TjWA0, "\x5d") + 1); uLY00: if (!(strpos($TjWA0, "\x7b") !== false)) { goto axHCM; } if (empty($u6GFy)) { goto W4pDu; } foreach ($u6GFy as $n1oX6 => $zmRXc) { $TjWA0 = preg_replace("\x23\x5c\x7b" . $n1oX6 . "\x3a\50\77\x3a\134\167\53\174\134\x2a\x29\x28\x3f\x3a\134\x28\50\x2e\x2b\77\x29\134\51\x29\x3f\134\175\43", $zmRXc, $TjWA0); cxU5z: } Cj9cx: W4pDu: if (!(strpos($TjWA0, "\173") !== false)) { goto em2bL; } throw new \Exception("\116\151\156\143\163\40\x6d\x65\x67\141\144\x76\141\x20\155\151\x6e\x64\x65\x6e\40\x72\157\165\x74\145\40\160\141\162\x61\x6d\x65\164\145\x72\40\x28" . $p5Lm2 . "\51"); em2bL: axHCM: return $TjWA0 . (empty($wyQsJ) ? '' : "\77" . http_build_query($wyQsJ)) . (empty($oA9V3) ? '' : "\x23" . $oA9V3); } } namespace Alumentum; class RedirectException extends \Exception { } namespace Alumentum; class PageNotFoundException extends \Exception { } namespace Alumentum; abstract class ControllerAbstract { const PARAM_PATTERN = "\57\xa\11\11\x40\x70\141\162\x61\x6d\xa\11\x9\134\x73\x2b\xa\x9\11\x28\x3f\x50\74\164\171\160\x65\x3e\x5c\167\53\x29\12\11\11\50\x3f\72\x3a\x28\77\x3c\155\x65\x74\x68\157\144\x3e\x5b\x55\x47\x50\x43\x5d\173\x31\x2c\64\175\x29\x29\77\xa\x9\11\x28\77\x3a\x5c\x2f\50\77\74\x69\156\x69\164\x41\x63\x74\151\x6f\x6e\x3e\x74\51\x29\77\12\x9\11\x5c\163\53\12\x9\x9\x28\77\120\x3c\151\163\x52\x65\x66\145\162\x65\x6e\143\x65\x3e\x26\51\x3f\xa\x9\11\134\44\x28\77\x50\x3c\156\141\155\x65\x3e\134\x77\53\x29\xa\11\x9\x2f\x78"; protected $request; protected $response; protected $router; public function __construct(Request $RtklE, Response $cYK4f, Router $JGqH2) { $this->request = $RtklE; $this->response = $cYK4f; $this->router = $JGqH2; } protected function preDispatch($DcRAY) { return true; } protected function getCommentParameters($aiYau) { $A6Df_ = array(); $Y0OLK = array(); preg_match_all(self::PARAM_PATTERN, $aiYau, $Y0OLK, PREG_SET_ORDER); foreach ($Y0OLK as $Fj3Fc) { $A6Df_[$Fj3Fc["\x6e\141\x6d\145"]] = array("\x74\171\x70\145" => $Fj3Fc["\x74\171\160\x65"], "\x6d\145\x74\x68\157\x64" => $Fj3Fc["\x6d\x65\164\x68\157\144"], "\x69\x6e\151\x74\x41\143\164\151\157\x6e" => $Fj3Fc["\x69\156\151\164\101\x63\164\x69\x6f\x6e"], "\151\163\122\x65\146\145\x72\x65\156\143\x65" => !empty($Fj3Fc["\x69\x73\x52\x65\x66\x65\162\x65\156\143\145"])); BVFK8: } v9wsU: return $A6Df_; } protected function getArguments($Nc_3k) { $a2cAg = new \ReflectionMethod($this, $Nc_3k); $cNacg = $a2cAg->getParameters(); $M8AdO = $a2cAg->getDocComment(); if (!($M8AdO === false)) { goto eyk80; } throw new \Exception("\x41\40\155\145\x74\x6f\x64\165\163\40\x6e\x69\x6e\143\x73\x20\x64\157\153\165\x6d\x65\156\164\141\x6c\166\141\72\x20" . get_class($this) . "\x2d\76" . $Nc_3k . "\50\51"); eyk80: $vJ9Z1 = $this->getCommentParameters($M8AdO); $lyToz = array(); foreach ($cNacg as $Fj3Fc) { $EMrXw = $Fj3Fc->getName(); $mCvrK = empty($vJ9Z1[$EMrXw]["\x6d\x65\164\x68\x6f\x64"]) ? $this->request->get($EMrXw) : $this->request->get($EMrXw, $vJ9Z1[$EMrXw]["\155\145\x74\150\x6f\x64"]); if ($mCvrK !== null) { goto P2lVM; } if ($Fj3Fc->isOptional()) { goto f96iZ; } throw new \Exception("\116\x69\156\143\163\x20\x6d\x65\147\x61\144\166\141\40\145\147\171\40\153\157\x74\x65\154\145\x7a\x6f\40\x70\x61\162\141\x6d\145\x74\145\x72\x20\145\x72\164\x65\153\145\72\40" . get_class($this) . "\55\76" . $Nc_3k . "\x28\51\40\72\40\44" . $EMrXw); f96iZ: $mCvrK = $Fj3Fc->getDefaultValue(); goto GufeR; P2lVM: if (isset($vJ9Z1[$EMrXw]["\164\171\x70\145"])) { goto SxyNn; } throw new \Exception("\x41\40\160\141\x72\x61\155\145\164\145\x72\x6e\145\153\40\x6e\x69\x6e\143\x73\x20\x28\166\141\147\x79\40\x68\151\x62\141\163\x20\x61\40\155\x65\147\141\144\157\x74\164\51\40\x74\x69\160\x75\x73\x61\72\x20" . get_class($this) . "\x2d\76" . $Nc_3k . "\x28\x29\x20\x3a\x20\x24" . $EMrXw); SxyNn: $izSho = $vJ9Z1[$EMrXw]["\x74\x79\x70\x65"]; if (!in_array($izSho, array("\x62\157\157\154", "\151\x6e\x74", "\x66\x6c\x6f\x61\164", "\x73\164\x72\151\156\x67", "\x61\162\162\x61\171"))) { goto quFh0; } settype($mCvrK, $izSho); quFh0: if (!($izSho == "\163\x74\162\151\x6e\x67" && $vJ9Z1[$EMrXw]["\151\x6e\151\164\101\143\164\151\157\156"] == "\x74")) { goto GIhLg; } $mCvrK = trim($mCvrK); GIhLg: GufeR: $lyToz[] = $mCvrK; iRnkB: } ahdpr: return $lyToz; } public function dispatch($DcRAY) { ob_start(); try { if (!($this->preDispatch($DcRAY) !== false)) { goto M3P_6; } $Nc_3k = "\144\x6f" . $DcRAY; $A6Df_ = call_user_func_array(array($this, $Nc_3k), $this->getArguments($Nc_3k)); if (!($A6Df_ !== null)) { goto cG7w7; } if ($A6Df_ instanceof TemplateAbstract) { goto aunsV; } echo $this->response->generateOutput($A6Df_); goto H2eah; aunsV: $A6Df_->render(); H2eah: cG7w7: M3P_6: } catch (\Exception $VJ0SS) { ob_end_clean(); throw $VJ0SS; } $this->response->appendToContent(ob_get_clean()); } protected function generateUrl($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { return $this->router->generateUrl($p5Lm2, $u6GFy, $wyQsJ, $oA9V3); } protected function redirectToUrl($qHQZy, array $wyQsJ = array()) { if (empty($wyQsJ)) { goto RlaJN; } $qHQZy .= (strpos($qHQZy, "\77") !== false ? ini_get("\141\x72\147\x5f\163\x65\x70\141\162\x61\164\x6f\x72\56\x6f\x75\x74\160\x75\x74") : "\x3f") . http_build_query($wyQsJ); RlaJN: $this->response->setContent(''); $UcKdL = $this->request->getReferrer(); if (empty($UcKdL)) { goto ESNX0; } $this->response->setHeader("\x52\145\x66\145\162\x65\x72", $UcKdL); ESNX0: $this->response->setHeader("\x4c\x6f\x63\x61\164\x69\x6f\x6e", $qHQZy); throw new RedirectException(); } protected function redirectToRoute($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { $this->redirectToUrl($this->generateUrl($p5Lm2, $u6GFy, $wyQsJ, $oA9V3)); } protected function forwardTo404() { throw new PageNotFoundException(); } protected function forwardTo404If($QlDGX) { if (!$QlDGX) { goto W3H8R; } $this->forwardTo404(); W3H8R: } } namespace Alumentum; class ClassLoaderPool { private $classLoaders = array(); public function __construct() { spl_autoload_register(array($this, "\x6c\x6f\x61\144\103\x6c\x61\x73\x73")); } public function __destruct() { spl_autoload_unregister(array($this, "\x6c\157\141\x64\103\x6c\x61\163\x73")); } public function addClassLoader(IClassLoader $zd33n) { $this->classLoaders[] = $zd33n; } public function removeClassLoader(IClassLoader $zd33n) { $wl7tJ = array_search($zd33n, $this->classLoaders, true); if (!($wl7tJ !== false)) { goto OnAU5; } unset($this->classLoaders[$wl7tJ]); OnAU5: } public function reset() { foreach ($this->classLoaders as $zd33n) { $zd33n->reset(); s1Vnm: } N56TI: } public function loadClass($dcDkQ) { $JKGEt = false; foreach ($this->classLoaders as $zd33n) { $zd33n->loadClass($dcDkQ); $JKGEt = class_exists($dcDkQ, false) || interface_exists($dcDkQ, false) || trait_exists($dcDkQ, false); if (!$JKGEt) { goto kD59O; } goto fDM4W; kD59O: CovT2: } fDM4W: if ($JKGEt) { goto YjR_Z; } Events::triggerEvent("\x73\x79\163\164\145\x6d\56\x65\x76\145\x6e\x74\x73\56\x63\x6c\x61\x73\163\x5f\x6e\x6f\x74\137\146\x6f\x75\156\144", array($dcDkQ)); YjR_Z: } } namespace Alumentum; class ErrorHandlerPool { protected $debugConsole = null; const STRATEGY_UNIQUE_ERRORS = 1; const STRATEGY_GROUP_USER_ERRORS = 2; const STRATEGY_GROUP_SYSTEM_ERRORS = 3; const STRATEGY_GROUP_ALL_ERRORS = 4; protected $strategy = self::STRATEGY_GROUP_SYSTEM_ERRORS; protected $groupTime = 300; protected $errorHandlers = array(); protected $lastErrorId = null; public function __construct() { set_error_handler(array($this, "\150\x61\156\144\x6c\145\105\162\162\x6f\162")); set_exception_handler(array($this, "\x68\x61\156\x64\x6c\x65\105\170\143\145\x70\164\151\x6f\156")); register_shutdown_function(array($this, "\150\141\x6e\x64\154\145\x46\x61\x74\x61\154\105\162\162\157\x72")); } public function __destruct() { restore_error_handler(); restore_exception_handler(); } public function setStrategy($xccAZ) { $this->strategy = $xccAZ; } public function setGroupTime($h5H6Y) { $this->groupTime = $h5H6Y; } public function setDebugConsole(DebugConsole $LLwXX) { $this->debugConsole = $LLwXX; } public function addErrorHandler(ErrorHandlerAbstract $FAxMQ) { $this->errorHandlers[] = $FAxMQ; } public function removeErrorHandler(ErrorHandlerAbstract $FAxMQ) { $wl7tJ = array_search($FAxMQ, $this->errorHandlers, true); if (!($wl7tJ !== false)) { goto xspWk; } unset($this->errorHandlers[$wl7tJ]); xspWk: } public function removeAllErrorHandlers() { $this->errorHandlers = array(); } public function handleError($dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch) { if (!(($dnbH6 & error_reporting()) === 0 && $dnbH6 !== ErrorHandlerAbstract::E_EXCEPTION)) { goto l1IpT; } return true; l1IpT: $Sba0r = time(); $v_QMR = (bool) ($dnbH6 & (E_USER_DEPRECATED | E_USER_NOTICE | E_USER_WARNING | E_USER_ERROR | ErrorHandlerAbstract::E_EXCEPTION)); switch ($this->strategy) { case self::STRATEGY_UNIQUE_ERRORS: $this->lastErrorId = hash("\155\144\65", $dnbH6 . "\174" . $CBRMl . "\x7c" . $oHn6t . "\x7c" . $CJfhk . "\x7c" . mt_rand()); goto HEidD; case self::STRATEGY_GROUP_ALL_ERRORS: $this->lastErrorId = hash("\x6d\144\65", $dnbH6 . "\174" . $CBRMl . "\x7c" . $oHn6t . "\174" . $CJfhk . "\x7c" . floor($Sba0r / $this->groupTime)); goto HEidD; case self::STRATEGY_GROUP_USER_ERRORS: $this->lastErrorId = hash("\x6d\144\65", $dnbH6 . "\174" . $CBRMl . "\174" . $oHn6t . "\174" . $CJfhk . "\x7c" . ($v_QMR ? floor($Sba0r / $this->groupTime) : mt_rand())); goto HEidD; default: case self::STRATEGY_GROUP_SYSTEM_ERRORS: $this->lastErrorId = hash("\x6d\x64\65", $dnbH6 . "\x7c" . $CBRMl . "\174" . $oHn6t . "\174" . $CJfhk . "\174" . ($v_QMR ? mt_rand() : floor($Sba0r / $this->groupTime))); goto HEidD; } wmKJf: HEidD: foreach ($this->errorHandlers as $FAxMQ) { $FAxMQ->handleError($this->lastErrorId, $dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch, $Sba0r); DYQWD: } P4adj: if (!($this->debugConsole !== null)) { goto XHyKl; } $this->debugConsole->logError($dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch); XHyKl: return ini_get("\144\151\163\160\154\141\x79\137\145\162\x72\157\x72\x73") != "\x30"; } public function handleException(\Throwable $VJ0SS) { $this->handleError(ErrorHandlerAbstract::E_EXCEPTION, $VJ0SS->getMessage(), $VJ0SS->getFile(), $VJ0SS->getLine(), array("\x63\157\144\145" => $VJ0SS->getCode(), "\164\162\x61\x63\145" => $VJ0SS->getTrace())); } public function handleFatalError() { $JcnAN = error_get_last(); if (!(!empty($JcnAN) && in_array($JcnAN["\164\171\x70\145"], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR)))) { goto zh7Oq; } $this->handleError($JcnAN["\164\x79\160\145"], $JcnAN["\x6d\145\163\x73\x61\x67\x65"], $JcnAN["\x66\151\154\x65"], $JcnAN["\x6c\151\156\145"], array()); if (!($this->debugConsole !== null && !$this->debugConsole->isDisplayed())) { goto oUSua; } $this->debugConsole->display(); oUSua: zh7Oq: } public function getLastErrorId() { return $this->lastErrorId; } } namespace Alumentum; class Application { protected $request = null; protected $response = null; protected $router = null; protected $classLoaderPool; protected $errorHandlerPool; protected $errorController = "\x45\162\162\x6f\x72"; protected $debugConsole = null; private static $instance = null; private function __construct() { $this->classLoaderPool = new ClassLoaderPool(); $this->errorHandlerPool = new ErrorHandlerPool(); } private function __clone() { } public static function getInstance() { if (!(self::$instance === null)) { goto o3G4f; } self::$instance = new static(); o3G4f: return self::$instance; } public function getRequest() { if (!($this->request === null)) { goto A94QH; } $this->request = new Request(); A94QH: return $this->request; } public function setRequest(Request $RtklE) { $this->request = $RtklE; return $this; } public function getResponse() { if (!($this->response === null)) { goto grHa2; } $this->response = new Response(); grHa2: return $this->response; } public function setResponse(Response $cYK4f) { $this->response = $cYK4f; return $this; } public function getRouter() { if (!($this->router === null)) { goto pHc0h; } $this->router = new Router(); pHc0h: return $this->router; } public function setRouter(Router $JGqH2) { $this->router = $JGqH2; return $this; } public function getClassLoaderPool() { return $this->classLoaderPool; } public function addClassLoader(IClassLoader $zd33n) { $this->classLoaderPool->addClassLoader($zd33n); return $this; } public function removeClassLoader(IClassLoader $zd33n) { $this->classLoaderPool->removeClassLoader($zd33n); return $this; } public function getErrorHandlerPool() { return $this->errorHandlerPool; } public function addErrorHandler(ErrorHandlerAbstract $FAxMQ) { $this->errorHandlerPool->addErrorHandler($FAxMQ); return $this; } public function removeErrorHandler(ErrorHandlerAbstract $FAxMQ) { $this->errorHandlerPool->removeErrorHandler($FAxMQ); return $this; } public function removeAllErrorHandlers() { $this->errorHandlerPool->removeAllErrorHandlers(); return $this; } public function setErrorController($juQti) { $this->errorController = $juQti; return $this; } public function getDebugConsole() { return $this->debugConsole; } public function setDebugConsole(DebugConsole $LLwXX) { $this->debugConsole = $LLwXX; $this->errorHandlerPool->setDebugConsole($LLwXX); Events::addEventListener("\163\x79\163\x74\x65\x6d\56\x61\x66\164\x65\162\137\163\145\x6e\144\137\162\145\x73\160\157\156\x73\145", array($this->debugConsole, "\x64\x69\x73\160\154\x61\x79")); return $this; } protected function dispatch($doydK, $DcRAY) { $qKnWr = new $doydK($this->request, $this->response, $this->router); try { $qKnWr->dispatch($DcRAY); } catch (RedirectException $VJ0SS) { } catch (PageNotFoundException $VJ0SS) { $this->response->clear(); $this->response->setHttpStatusCode(404); $this->dispatch($this->errorController . "\103\157\156\164\x72\x6f\154\154\x65\x72", "\x34\60\64"); } catch (\Exception $VJ0SS) { $this->errorHandlerPool->handleException($VJ0SS); $this->response->clear(); $this->response->setHttpStatusCode(500); $this->request->set("\145", $VJ0SS); $this->dispatch($this->errorController . "\x43\157\x6e\164\x72\x6f\154\154\145\162", "\x35\x30\x30"); } } public function run(array $lTuP1, $cVhrz = true) { $RtklE = $this->getRequest(); $cYK4f = $this->getResponse(); $JGqH2 = $this->getRouter(); $JGqH2->addRoutes($lTuP1); Events::triggerEvent("\163\171\163\164\x65\x6d\56\145\x76\145\x6e\x74\x73\x2e\151\x6e\151\164\137\144\x6f\x6e\145"); $NJuGc = $JGqH2->getRouteHandler($RtklE->getUri(), $RtklE->getMethod()); if (!($NJuGc === null)) { goto BOFWO; } $cYK4f->clear(); $cYK4f->setHttpStatusCode(404); $NJuGc = array("\x63\x6f\156\x74\162\157\154\154\145\x72" => $this->errorController, "\x61\143\x74\x69\x6f\156" => "\64\x30\x34", "\160\141\x72\x61\155\x73" => array()); BOFWO: foreach ($NJuGc["\x70\x61\162\141\x6d\163"] as $n1oX6 => $zmRXc) { $RtklE->set($n1oX6, urldecode($zmRXc)); qIOWx: } FOMyr: $this->dispatch($NJuGc["\x63\x6f\156\164\x72\157\154\154\x65\162"] . "\103\157\x6e\x74\162\157\154\x6c\145\x72", $NJuGc["\x61\x63\x74\151\x6f\x6e"]); if (!$cVhrz) { goto q62pN; } $cYK4f->send(); q62pN: } } namespace Alumentum; abstract class TemplateAbstract { const RENDER_CONTENT_METHOD = "\x72\145\156\x64\x65\x72\x43\157\x6e\x74\x65\156\164"; protected $escapeMethod = array("\134\101\154\165\155\x65\156\x74\165\x6d\x5c\x54\x65\155\x70\x6c\141\x74\x65\101\142\x73\164\x72\x61\143\x74", "\145\x73\143\141\x70\x65\110\x74\x6d\154"); protected $unescapeMethod = array("\x5c\x41\x6c\165\155\x65\156\164\x75\155\x5c\124\x65\155\160\154\x61\164\x65\x41\x62\163\x74\x72\x61\x63\x74", "\x75\156\x65\x73\143\141\x70\x65\x48\x74\x6d\154"); protected $rawParams = array(); protected $params = array(); public static function escapeHtml($mCvrK) { switch (gettype($mCvrK)) { case "\x73\164\x72\151\156\x67": return htmlspecialchars($mCvrK); case "\141\x72\x72\141\x79": foreach ($mCvrK as $fF82p => $CPkeA) { $mCvrK[$fF82p] = self::escapeHtml($CPkeA); iXagA: } daQGo: return $mCvrK; default: return $mCvrK; } auNQe: PchuZ: } public static function unescapeHtml($mCvrK) { switch (gettype($mCvrK)) { case "\x73\x74\162\x69\156\x67": return htmlspecialchars_decode($mCvrK); case "\x61\162\162\x61\171": foreach ($mCvrK as $fF82p => $CPkeA) { $mCvrK[$fF82p] = self::unescapeHtml($CPkeA); EPcnC: } SFm4v: return $mCvrK; default: return $mCvrK; } IQMX4: esHHf: } public function setEscapeMethod($Ni8KF) { $this->escapeMethod = $Ni8KF; } public function setUnescapeMethod($IsuPO) { $this->unescapeMethod = $IsuPO; } protected function escape($mCvrK) { return empty($this->escapeMethod) ? $mCvrK : call_user_func($this->escapeMethod, $mCvrK); } protected function unescape($mCvrK) { return empty($this->unescapeMethod) ? $mCvrK : call_user_func($this->unescapeMethod, $mCvrK); } public function has($EMrXw) { return isset($this->params[$EMrXw]); } public function get($EMrXw) { return $this->params[$EMrXw]; } protected function getRaw($EMrXw) { return $this->rawParams[$EMrXw]; } public function set($EMrXw, $mCvrK) { $this->rawParams[$EMrXw] = $mCvrK; $this->params[$EMrXw] = $this->escape($mCvrK); } protected function clearParams() { $this->rawParams = array(); $this->params = array(); } protected function _($NnBmC, array $cNacg = array()) { return I18n::getInstance()->getTranslation($NnBmC, $cNacg); } protected function setDefaultParamValues() { $a2cAg = new \ReflectionMethod($this, self::RENDER_CONTENT_METHOD); $cNacg = $this->rawParams; $this->clearParams(); foreach ($a2cAg->getParameters() as $Fj3Fc) { $EMrXw = $Fj3Fc->getName(); if (array_key_exists($EMrXw, $cNacg)) { goto x_kvk; } if ($Fj3Fc->isOptional()) { goto xI1GO; } throw new \Exception("\116\151\x6e\143\163\x20\x6d\145\x67\141\144\166\141\40\x65\147\171\40\153\x6f\164\145\x6c\145\172\x6f\x20\x74\x65\155\x70\154\141\164\x65\x20\160\x61\162\x61\155\x65\x74\145\x72\x20\x65\162\164\x65\153\145\72\40" . get_class($this) . "\x2d\76" . self::RENDER_CONTENT_METHOD . "\50\51\40\72\x20\44" . $EMrXw); goto WXfSV; x_kvk: $this->set($EMrXw, $cNacg[$EMrXw]); unset($cNacg[$EMrXw]); goto NSyx0; goto WXfSV; xI1GO: $this->set($EMrXw, $Fj3Fc->getDefaultValue()); WXfSV: NSyx0: } hXi2R: if (empty($cNacg)) { goto Uai5b; } foreach ($cNacg as $EMrXw => $mCvrK) { $this->set($EMrXw, $mCvrK); O8H0r: } CG4lY: Uai5b: } public function render() { $this->setDefaultParamValues(); call_user_func_array(array($this, self::RENDER_CONTENT_METHOD), $this->params); } public function __toString() { ob_start(); $this->render(); return ob_get_clean(); } } namespace Alumentum; class TemplateBlock extends TemplateAbstract { protected $layout = null; public function setLayout(Layout $nEx6y) { $this->layout = $nEx6y; } protected function renderBlock(TemplateBlock $ipmc1, array $cNacg = array()) { if (!($this->layout !== null)) { goto VYZ66; } $ipmc1->setLayout($this->layout); VYZ66: foreach ($cNacg as $EMrXw => $mCvrK) { $ipmc1->set($EMrXw, $this->unescape($mCvrK)); bGN5B: } x6uiz: $ipmc1->render(); } } namespace Alumentum; class Template extends TemplateBlock { public function render() { if ($this->layout !== null) { goto yhmNs; } parent::render(); goto i7iOb; yhmNs: ob_start(); parent::render(); $dl6OX = ob_get_clean(); $this->layout->setInnerContent($dl6OX); $this->layout->render(); i7iOb: } } namespace Alumentum; class Layout extends TemplateAbstract { private $innerContent = ''; protected $title = array(); protected $titleSeparator = "\x20\x2d\40"; protected $metas = array(); protected $propertyMetas = array(); protected $httpMetas = array(); protected $links = array(); protected $headerJavaScripts = array(); protected $headerJavaScriptConditions = array(); protected $footerJavaScripts = array(); protected $styleSheets = array(); protected $styleSheetConditions = array(); protected $activeSlotNames = array(); protected $slots = array(); public function setInnerContent($dl6OX) { $this->innerContent = $dl6OX; } protected function renderInnerContent() { echo $this->innerContent; } public function setTitleSeparator($qOMqM) { $this->titleSeparator = $qOMqM; } public function prependToTitle($pZKts) { array_unshift($this->title, $pZKts); } public function appendToTitle($pZKts) { $this->title[] = $pZKts; } public function setTitle($gG2lm) { $this->title = array($gG2lm); } protected function renderTitle() { echo "\x3c\164\x69\164\x6c\x65\x3e" . implode($this->titleSeparator, $this->title) . "\x3c\x2f\x74\151\164\154\x65\x3e"; } public function addMeta($EMrXw, $dl6OX, $B0mTj = true) { if ($B0mTj || !isset($this->metas[$EMrXw])) { goto srZvE; } $this->metas[$EMrXw] .= $dl6OX; goto Gp1TZ; srZvE: $this->metas[$EMrXw] = $dl6OX; Gp1TZ: } protected function renderMetas() { $A6Df_ = ''; foreach ($this->metas as $EMrXw => $dl6OX) { $A6Df_ .= "\74\155\145\x74\x61\40\156\141\x6d\x65\x3d\x22" . $EMrXw . "\42\x20\143\157\156\164\x65\x6e\164\x3d\x22" . $dl6OX . "\42\x20\x2f\x3e" . "\xa"; VxJfm: } xuuR2: echo $A6Df_; } public function addPropertyMeta($EMrXw, $dl6OX, $B0mTj = true) { if ($B0mTj || !isset($this->propertyMetas[$EMrXw])) { goto yfcBU; } $this->propertyMetas[$EMrXw] .= $dl6OX; goto BzqCl; yfcBU: $this->propertyMetas[$EMrXw] = $dl6OX; BzqCl: } protected function renderPropertyMetas() { $A6Df_ = ''; foreach ($this->propertyMetas as $EMrXw => $dl6OX) { $A6Df_ .= "\x3c\x6d\145\164\141\40\160\162\157\160\145\162\x74\x79\75\x22" . $EMrXw . "\42\40\x63\157\156\164\145\156\x74\75\x22" . $dl6OX . "\x22\40\57\x3e" . "\12"; Npt_N: } vEg0u: echo $A6Df_; } public function addHttpMeta($EMrXw, $dl6OX, $B0mTj = true) { if ($B0mTj || !isset($this->httpMetas[$EMrXw])) { goto yrGUv; } $this->httpMetas[$EMrXw] .= $dl6OX; goto IrRVU; yrGUv: $this->httpMetas[$EMrXw] = $dl6OX; IrRVU: } protected function renderHttpMetas() { $A6Df_ = ''; foreach ($this->httpMetas as $EMrXw => $dl6OX) { $A6Df_ .= "\x3c\155\145\164\141\40\x68\x74\164\160\55\x65\161\165\x69\x76\x3d\42" . $EMrXw . "\x22\40\143\x6f\156\164\x65\156\164\x3d\x22" . $dl6OX . "\42\x20\57\76" . "\xa"; GS0cc: } kgBtD: echo $A6Df_; } public function addLink($W6KqI, $OOnpL, $izSho = '', $gG2lm = '', $CQArO = '', $e640m = '') { $this->links[] = array("\150\x72\x65\x66" => $W6KqI, "\162\145\x6c" => $OOnpL, "\164\x79\x70\145" => $izSho, "\x74\x69\x74\154\145" => $gG2lm, "\163\151\x7a\x65\x73" => $CQArO, "\x68\x72\x65\146\x6c\x61\156\x67" => $e640m); } protected function renderLinks() { $A6Df_ = ''; foreach ($this->links as $DvIry) { $A6Df_ .= "\x3c\154\151\x6e\x6b\x20\x72\x65\154\75\42" . $DvIry["\162\145\x6c"] . "\42\x20\150\162\145\146\x3d\42" . $DvIry["\150\162\145\x66"] . "\42" . (empty($DvIry["\164\x79\160\145"]) ? '' : "\x20\164\x79\160\145\75\42" . $DvIry["\164\171\160\145"] . "\42") . (empty($DvIry["\x74\x69\x74\154\145"]) ? '' : "\x20\164\151\164\x6c\145\75\42" . $DvIry["\x74\x69\x74\154\x65"] . "\x22") . (empty($DvIry["\163\x69\172\x65\x73"]) ? '' : "\40\163\151\172\145\x73\x3d\x22" . $DvIry["\x73\x69\x7a\145\x73"] . "\42") . (empty($DvIry["\150\162\x65\146\154\141\156\x67"]) ? '' : "\x20\150\162\145\x66\x6c\141\156\x67\x3d\42" . $DvIry["\150\x72\x65\146\x6c\x61\x6e\147"] . "\x22") . "\x20\x2f\x3e" . "\xa"; yIXiR: } nQBBE: echo $A6Df_; } public function addHeaderJavaScript($oHn6t, $QlDGX = '') { if (empty($QlDGX)) { goto tj8xf; } $this->headerJavaScriptConditions[$oHn6t] = $QlDGX; tj8xf: $this->headerJavaScripts[] = $oHn6t; } protected function renderHeaderJavaScripts() { $A6Df_ = ''; foreach (array_unique($this->headerJavaScripts) as $oHn6t) { if (!empty($this->headerJavaScriptConditions[$oHn6t])) { goto AEFnp; } $A6Df_ .= "\x3c\x73\143\x72\151\x70\164\40\x74\171\160\x65\x3d\42\164\145\x78\164\57\x6a\x61\x76\x61\x73\143\162\151\160\164\42\x20\x73\x72\x63\75\42" . $oHn6t . "\42\x3e\x3c\57\x73\143\x72\151\160\x74\x3e" . PHP_EOL; goto giaDU; AEFnp: $A6Df_ .= "\74\41\x2d\55\133\151\146\40" . $this->headerJavaScriptConditions[$oHn6t] . "\135\x3e\74\x73\143\x72\x69\x70\164\x20\164\171\160\x65\x3d\42\x74\145\x78\164\57\x6a\x61\x76\141\x73\143\162\x69\160\x74\x22\x20\x73\x72\x63\x3d\42" . $oHn6t . "\x22\x3e\x3c\57\163\x63\x72\x69\x70\164\x3e\x3c\41\x5b\x65\x6e\x64\x69\146\x5d\x2d\x2d\x3e" . PHP_EOL; giaDU: S6hij: } oD0UR: echo $A6Df_; } public function addFooterJavaScript($oHn6t) { $this->footerJavaScripts[] = $oHn6t; } protected function renderFooterJavaScripts() { $A6Df_ = ''; foreach (array_unique($this->footerJavaScripts) as $oHn6t) { $A6Df_ .= "\x3c\x73\x63\x72\151\x70\164\40\164\x79\x70\x65\x3d\42\x74\145\170\164\57\x6a\141\x76\x61\x73\143\162\x69\x70\x74\x22\40\163\162\143\75\x22" . $oHn6t . "\42\76\x3c\57\163\143\x72\151\x70\x74\x3e" . "\xa"; nrRlb: } kHlCk: echo $A6Df_; } public function addStyleSheet($oHn6t, $QlDGX = '') { if (empty($QlDGX)) { goto LZOaJ; } $this->styleSheetConditions[$oHn6t] = $QlDGX; LZOaJ: $this->styleSheets[] = $oHn6t; } protected function renderStyleSheets() { $A6Df_ = ''; foreach (array_unique($this->styleSheets) as $oHn6t) { if (!empty($this->styleSheetConditions[$oHn6t])) { goto LIEia; } $A6Df_ .= "\x3c\154\x69\x6e\x6b\40\162\x65\154\x3d\x22\x73\x74\x79\154\145\x73\x68\x65\145\x74\x22\40\x74\x79\160\x65\75\42\164\x65\x78\164\x2f\143\x73\163\x22\x20\x68\x72\x65\x66\x3d\42" . $oHn6t . "\x22\40\x2f\x3e" . PHP_EOL; goto hG3ek; LIEia: $A6Df_ .= "\x3c\41\55\55\x5b\151\x66\x20" . $this->styleSheetConditions[$oHn6t] . "\135\76\x3c\x6c\x69\x6e\x6b\40\x72\x65\154\75\x22\163\x74\x79\154\145\163\x68\x65\145\164\x22\40\x74\171\160\145\x3d\42\x74\145\170\x74\x2f\143\163\163\42\40\150\x72\x65\146\75\x22" . $oHn6t . "\x22\x20\57\x3e\74\x21\133\145\x6e\x64\x69\146\x5d\55\55\x3e" . PHP_EOL; hG3ek: ojnKX: } Pula3: echo $A6Df_; } public function beginSlot($EMrXw) { array_push($this->activeSlotNames, $EMrXw); ob_start(); } public function endSlot($B2A1A = false) { $Txn_h = array_pop($this->activeSlotNames); if (!($Txn_h === null)) { goto qIjB4; } return; qIjB4: if (!isset($this->slots[$Txn_h]) || !$B2A1A) { goto usp7k; } $this->slots[$Txn_h] .= ob_get_clean(); goto Cm203; usp7k: $this->slots[$Txn_h] = ob_get_clean(); Cm203: } public function hasSlot($EMrXw) { return isset($this->slots[$EMrXw]); } public function renderSlot($EMrXw) { echo isset($this->slots[$EMrXw]) ? $this->slots[$EMrXw] : ''; } protected function renderBlock(TemplateBlock $ipmc1, array $cNacg = array()) { foreach ($cNacg as $EMrXw => $mCvrK) { $ipmc1->set($EMrXw, $this->unescape($mCvrK)); NRYaB: } JdBuU: $ipmc1->render(); } } namespace Alumentum; abstract class AbstractConnection { protected $pdo; protected $database; protected $username; protected $password; protected $host; protected $port; protected $debugConsole = null; protected $params; protected $lastUsedTimestamp = null; public function __construct($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, array $cNacg = array()) { $cNacg[\PDO::ATTR_ERRMODE] = \PDO::ERRMODE_EXCEPTION; $this->database = $hwv4R; $this->username = $y9VTC; $this->password = $DeoAY; $this->host = $NcgPG; $this->port = $VtVxF; $this->params = $cNacg; $this->connect(); } public function setDebugConsole(DebugConsole $LLwXX) { $this->debugConsole = $LLwXX; } protected abstract function connect(); public function query($LMXXm, array $cNacg = array()) { if (!$this->isLastUsedTimeLimitExceeded(Config::get("\x64\x61\164\x61\x62\141\163\145\56\x63\x6f\156\156\x65\143\164\x69\x6f\x6e\56\164\151\155\145\x6f\165\164\123\145\143\157\x6e\144\x73", 20))) { goto KSvgb; } trigger_error("\x4b\141\160\x63\163\157\x6c\141\164\40\165\x6a\x72\141\156\x79\x69\164\x61\x73\141\40\156\x79\151\164\166\141\164\141\162\164\x61\x73\x69\40\x69\x64\x6f\164\165\154\x6c\145\160\145\163\x20\155\151\141\x74\164", E_USER_NOTICE); $this->connect(); KSvgb: $hnhD9 = 0; if (!($this->debugConsole !== null && !$this->filteredQuery($LMXXm))) { goto xbFgu; } $Op1dN = $this->getLogParams($cNacg); $hnhD9 = $this->debugConsole->logDbQuery($LMXXm, $Op1dN); xbFgu: $pN6Rx = $this->pdo->prepare($LMXXm); foreach ($cNacg as $p5e6p => $mCvrK) { $PGG9t = is_int($p5e6p) ? $p5e6p + 1 : "\72" . $p5e6p; if (is_string($mCvrK)) { goto F8VnP; } if ($mCvrK === null) { goto LnH4r; } if (is_bool($mCvrK)) { goto tiYe3; } if (is_float($mCvrK)) { goto Eg6U9; } $izSho = \PDO::PARAM_INT; goto Cxcj_; F8VnP: $izSho = \PDO::PARAM_STR; goto Cxcj_; LnH4r: $izSho = \PDO::PARAM_NULL; goto Cxcj_; tiYe3: $izSho = \PDO::PARAM_INT; $mCvrK = (int) $mCvrK; goto Cxcj_; Eg6U9: $izSho = \PDO::PARAM_STR; Cxcj_: $pN6Rx->bindValue($PGG9t, $mCvrK, $izSho); D3f5c: } BLzJI: $gjh5D = microtime(true); $pN6Rx->execute(); $this->updateLastUsedTimestamp(); $gZdvn = microtime(true) - $gjh5D; if (!($this->debugConsole !== null)) { goto po038; } $this->debugConsole->logDbQueryExecutionTime($hnhD9, $gZdvn); po038: $gpiBF = Config::get("\144\141\x74\x61\x62\x61\163\x65\x2e\154\157\x6e\x67\105\170\x65\143\x75\164\x69\x6f\156\x54\151\x6d\145\x4c\x69\x6d\x69\164", 0); if (!($gpiBF > 0 && $gZdvn * 1000 > $gpiBF)) { goto h3qSJ; } trigger_error("\x48\157\x73\163\x7a\x75\40\x71\165\145\x72\171\x20\146\165\164\xc3\xa1\x73\x3a\40" . $gZdvn . "\x6d\x73", E_USER_NOTICE); h3qSJ: return new DbResult($pN6Rx); } public abstract function queryPaged($LMXXm, array $cNacg, $Bb8eI, $rA4yF, &$oFS50 = false); public function beginTransaction() { $this->pdo->beginTransaction(); } public function commitTransaction() { $this->pdo->commit(); } public function rollBackTransaction($fW8dX = false) { $this->pdo->rollBack(); } public function quote($mCvrK) { if (is_string($mCvrK)) { goto qYI6h; } if ($mCvrK === null) { goto KiUnA; } if (is_bool($mCvrK)) { goto LTBBk; } $izSho = \PDO::PARAM_INT; goto klwLd; qYI6h: $izSho = \PDO::PARAM_STR; goto klwLd; KiUnA: $izSho = \PDO::PARAM_NULL; goto klwLd; LTBBk: $izSho = \PDO::PARAM_INT; $mCvrK = (int) $mCvrK; klwLd: return $this->pdo->quote($mCvrK, $izSho); } public function ping() { try { $this->query("\x53\105\x4c\x45\x43\124\40\61"); } catch (\Exception $VJ0SS) { $this->connect(); } } public function getErrorCode() { return $this->pdo->errorCode(); } public function getErrorInfo() { return $this->pdo->errorInfo(); } public function isLastUsedTimeLimitExceeded($NvGTE) { return $this->lastUsedTimestamp !== null && $this->lastUsedTimestamp + $NvGTE < time(); } protected function updateLastUsedTimestamp() { $this->lastUsedTimestamp = time(); } protected function getLogParams($cNacg) { $A6Df_ = array(); foreach ($cNacg as $EMrXw => $mCvrK) { $A6Df_[$EMrXw] = substr($mCvrK, 0, 1000); if (!($mCvrK != $A6Df_[$EMrXw])) { goto oel2D; } $A6Df_[$EMrXw] .= "\50\56\56\x2e\x29"; oel2D: yLgcq: } LpnNX: return $A6Df_; } protected function filteredQuery($LMXXm) { return empty($LMXXm) || preg_match("\57\111\116\123\105\122\x54\x5c\x73\x2b\x49\x4e\124\117\134\163\52\140\77\x65\162\x72\157\x72\x5f\154\157\147\133\140\134\163\x5d\x2f\151", $LMXXm); } } namespace Alumentum; class Db { const TYPE_READ_ONLY = "\x72\157"; const TYPE_READ_WRITE = "\x72\x77"; const ORDER_ASC = "\x41\x53\103"; const ORDER_DESC = "\x44\105\x53\x43"; const DATE_FORMAT = "\131\x2d\x6d\x2d\x64"; const TIME_FORMAT = "\x48\x3a\151\x3a\x73"; const TIMESTAMP_FORMAT = "\x59\55\155\55\x64\40\110\x3a\151\72\x73"; const DB_TYPE_MYSQL = "\x6d\171\163\x71\x6c"; const DB_TYPE_PGSQL = "\160\x67\x73\161\x6c"; private $connections = array(); private static $instance = null; public static function getInstance() { if (!(self::$instance === null)) { goto BJH7a; } self::$instance = new static(); BJH7a: return self::$instance; } public static function getCurrentTimestamp() { return date(self::TIMESTAMP_FORMAT); } public static function getCurrentTime() { return date(self::TIME_FORMAT); } public static function getCurrentDate() { return date(self::DATE_FORMAT); } private function __construct() { } private function __clone() { } private function getReplicatedConnectionNames($DtQ3r, $izSho) { $qGvt8 = Config::get("\x64\x61\x74\141\142\x61\163\x65\x2e\x72\x65\160\154\x69\x63\x61\164\151\157\156\56" . $DtQ3r . "\56" . $izSho); if (!empty($qGvt8)) { goto C0V4l; } return array(); C0V4l: if (strpos($qGvt8, "\x2c") !== false) { goto q8EPn; } $qGvt8 = array($qGvt8); goto DGZHy; q8EPn: $qGvt8 = array_map("\164\162\151\155", explode("\x2c", $qGvt8)); if (!(count($qGvt8) > 1 && Config::get("\144\141\x74\x61\142\141\x73\x65\x2e\x72\145\x70\x6c\151\x63\141\x74\x69\157\156\x2e" . $DtQ3r . "\56" . $izSho . "\123\145\154\x65\x63\164\x69\157\x6e\115\145\x74\150\157\144") === "\x72\x61\156\x64\x6f\x6d")) { goto DbYXu; } shuffle($qGvt8); DbYXu: DGZHy: return $qGvt8; } private function connect($aufVH) { $hwv4R = Config::get("\x64\141\164\x61\142\141\163\x65\x2e\143\x6f\156\156\145\x63\x74\151\157\x6e\x2e" . $aufVH . "\56\144\141\x74\x61\x62\141\x73\145"); $y9VTC = Config::get("\144\x61\164\x61\x62\141\163\x65\x2e\143\157\156\x6e\145\143\164\x69\157\156\56" . $aufVH . "\56\x75\163\145\x72\156\x61\155\145"); $DeoAY = Config::get("\144\x61\x74\x61\x62\141\163\145\56\143\157\x6e\x6e\x65\143\x74\151\157\x6e\x2e" . $aufVH . "\56\x70\141\x73\x73\167\x6f\162\144"); $NcgPG = Config::get("\x64\x61\x74\141\x62\x61\x73\145\56\143\x6f\156\156\145\143\x74\x69\157\x6e\56" . $aufVH . "\x2e\x68\x6f\x73\164"); $VtVxF = Config::get("\144\x61\164\x61\142\141\x73\145\x2e\x63\x6f\156\156\x65\x63\x74\x69\157\156\x2e" . $aufVH . "\56\160\157\x72\x74", false); $Jdk_3 = Config::get("\x64\x61\x74\x61\142\x61\163\x65\56\143\x6f\156\156\x65\x63\x74\151\x6f\x6e\56" . $aufVH . "\56\143\x68\141\x72\163\145\x74"); $cNacg = Config::get("\144\x61\164\141\x62\x61\x73\x65\x2e\x63\x6f\156\156\145\x63\x74\x69\157\x6e\x2e" . $aufVH . "\56\x70\x61\162\x61\x6d\x73", array()); $izSho = Config::get("\x64\141\164\141\142\x61\x73\x65\x2e\x63\157\x6e\156\x65\143\164\x69\x6f\156\56" . $aufVH . "\x2e\x74\x79\160\145", self::DB_TYPE_PGSQL); if (isset($hwv4R, $y9VTC, $DeoAY, $NcgPG)) { goto RXmF8; } throw new \PDOException("\x4e\151\156\x63\x73\40\x6d\x65\x67\x61\x64\166\141\x20\x61\50\x7a\x29\x20\x22" . $aufVH . "\x22\40\x61\144\141\164\142\x61\172\151\x73\x20\x6b\x61\160\143\x73\157\154\141\x74\x20\155\x69\x6e\x64\x65\156\x20" . "\x6b\x6f\x74\145\x6c\x65\172\x6f\x20\160\x61\162\141\x6d\x65\164\x65\162\x65\40\133\144\x61\164\141\142\x61\163\x65\x2c\x20\x75\x73\145\162\x6e\x61\x6d\x65\54\40\x70\x61\163\x73\x77\x6f\x72\144\54\40\x68\x6f\163\x74\x5d"); RXmF8: $mwC1X = 0; U1sc9: if (!($mwC1X < 3)) { goto ysut1; } try { switch ($izSho) { case self::DB_TYPE_PGSQL: return new PostgreSqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3, Config::get("\144\141\x74\x61\x62\x61\x73\145\x2e\x63\x6f\156\x6e\145\143\164\151\x6f\156\56" . $aufVH . "\56\163\143\x68\145\x6d\141")); case self::DB_TYPE_MYSQL: return new MysqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3); default: throw new \Exception("\x49\163\x6d\145\162\x65\164\x6c\x65\x6e\x20\153\x61\160\x63\x73\157\x6c\x61\164\x20\164\x69\x70\165\x73\72\40" . $izSho); } Ohc1w: Gl2MI: } catch (\PDOException $VJ0SS) { if ($mwC1X < 2) { goto RyzbY; } throw $VJ0SS; goto P_gJy; RyzbY: usleep(10000); P_gJy: } oDtn2: $mwC1X++; goto U1sc9; ysut1: throw new \Exception("\116\x65\155\x20\x6b\x69\145\x70\151\x74\150\145\x74\x6f\40\x61\x64\x61\164\x62\x61\x7a\151\163\40\153\x61\x70\x63\163\157\x6c\x61\x74\x3a\40" . $aufVH); } public static function staticConnect($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF = 0, $Jdk_3 = '', array $cNacg = array(), $izSho = self::DB_TYPE_PGSQL, $FfZAf = '') { if (isset($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF)) { goto Zs9IA; } throw new \PDOException("\x4e\x69\x6e\143\163\40\x6d\x65\x67\x61\144\x76\x61\40\x61\x7a\40\141\x64\141\164\x62\x61\x7a\x69\163\x20\x6b\141\160\x63\163\157\x6c\x61\x74\x20\x6d\151\x6e\x64\x65\156\40\x6b\157\x74\145\x6c\x65\172\x6f\x20\160\x61\162\141\155\x65\164\145\x72\x65"); Zs9IA: $uwSdB = null; $mwC1X = 0; cmB6c: if (!($mwC1X < 3)) { goto YX5UW; } try { switch ($izSho) { case self::DB_TYPE_PGSQL: $uwSdB = new PostgreSqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3, $FfZAf); goto D0JlU; case self::DB_TYPE_MYSQL: $uwSdB = new MysqlConnection($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg, $Jdk_3); goto D0JlU; default: throw new \Exception("\111\x73\x6d\145\x72\145\x74\x6c\145\156\40\153\x61\x70\x63\163\157\x6c\x61\x74\x20\x74\x69\160\165\163\72\x20" . $izSho); } G4J7T: D0JlU: if (!($uwSdB !== null && Application::getInstance()->getDebugConsole() !== null)) { goto CPA4i; } $uwSdB->setDebugConsole(Application::getInstance()->getDebugConsole()); CPA4i: } catch (\PDOException $VJ0SS) { if ($mwC1X < 2) { goto fQRVZ; } throw $VJ0SS; goto UbMGE; fQRVZ: usleep(10000); UbMGE: } if (!($uwSdB !== null)) { goto F2dbL; } goto YX5UW; F2dbL: sJuRX: $mwC1X++; goto cmB6c; YX5UW: return $uwSdB; } private function connectWithFallback(array $qGvt8) { $uwSdB = null; foreach ($qGvt8 as $aufVH) { try { $uwSdB = $this->connect($aufVH); } catch (\Exception $VJ0SS) { trigger_error("\116\145\x6d\40\x73\151\153\145\x72\165\154\x74\x20\141\x28\172\x29\x20\x22" . $aufVH . "\x22\x20\141\144\x61\164\x62\x61\172\151\x73\40\153\x61\x70\x63\x73\157\x6c\141\164\40\153\x69\x65\160\151\164\145\x73\145", E_USER_WARNING); } tpL3j: } jaK5Q: return $uwSdB; } public function getConnection($EMrXw, $izSho = self::TYPE_READ_ONLY) { if (!isset($this->connections[$EMrXw][$izSho])) { goto qJtEC; } $uwSdB = $this->connections[$EMrXw][$izSho]; if (!$uwSdB->isLastUsedTimeLimitExceeded(Config::get("\x64\x61\x74\x61\x62\x61\163\x65\x2e\x63\157\156\x6e\x65\x63\164\151\157\156\56\x74\151\155\145\157\x75\x74\x53\x65\143\157\x6e\144\x73", 20))) { goto AjKvG; } unset($this->connections[$EMrXw][$izSho]); trigger_error("\113\x61\160\143\163\157\x6c\x61\164\40\x74\157\162\x6f\x6c\x76\x65\40\x6e\171\151\x74\x76\x61\x74\x61\x72\x74\141\x73\151\40\151\x64\157\x74\x75\x6c\154\145\160\145\x73\x20\155\151\141\164\164\72\x20" . $EMrXw, E_USER_NOTICE); goto sKGr3; AjKvG: return $this->connections[$EMrXw][$izSho]; sKGr3: qJtEC: $VAooq = Config::get("\x64\x61\164\141\142\x61\x73\x65\56\x72\145\x70\154\151\x63\141\x74\151\157\x6e\56" . $EMrXw . "\56\x6d\x61\x73\x74\x65\162", '') !== ''; $PT5hW = false; $qGvt8 = $VAooq ? $this->getReplicatedConnectionNames($EMrXw, $izSho === self::TYPE_READ_ONLY ? "\x73\154\x61\166\x65" : "\x6d\141\x73\164\x65\x72") : array($EMrXw); $uwSdB = $this->connectWithFallback($qGvt8); if (!($uwSdB === null && $VAooq && $izSho === self::TYPE_READ_ONLY)) { goto cjA0a; } $PT5hW = true; $uwSdB = $this->connectWithFallback($this->getReplicatedConnectionNames($EMrXw, "\155\x61\x73\x74\x65\x72")); cjA0a: if (!($uwSdB === null)) { goto SgOQk; } throw new \PDOException("\116\x65\155\40\163\151\x6b\145\x72\165\x6c\164\x20\x61\50\x7a\51\x20\42" . $EMrXw . "\42\x20\141\x64\141\x74\x62\141\172\x69\163\40\153\x61\x70\143\163\x6f\x6c\141\164\40\x6b\151\145\x70\151\x74\x65\x73\145"); SgOQk: if (!(Application::getInstance()->getDebugConsole() !== null)) { goto WXotT; } $uwSdB->setDebugConsole(Application::getInstance()->getDebugConsole()); WXotT: if ($VAooq) { goto QnEHE; } $this->connections[$EMrXw][Db::TYPE_READ_ONLY] = $uwSdB; $this->connections[$EMrXw][Db::TYPE_READ_WRITE] = $uwSdB; goto myXYj; QnEHE: $this->connections[$EMrXw][$izSho] = $uwSdB; if (!($izSho === Db::TYPE_READ_ONLY && $PT5hW)) { goto WSSdy; } $this->connections[$EMrXw][Db::TYPE_READ_WRITE] = $uwSdB; WSSdy: myXYj: return $uwSdB; } } namespace Alumentum; class DbResult implements \Iterator { private $statement = null; private $row = null; private $rowIndex = -1; public function __construct(\PDOStatement $pN6Rx) { $this->statement = $pN6Rx; } public function fetchRow() { return $this->statement->fetch(\PDO::FETCH_ASSOC); } public function fetchAll($znEM0 = '') { $Gq3xm = $this->statement->fetchAll(\PDO::FETCH_ASSOC); if (!($znEM0 !== '' && isset($Gq3xm[0][$znEM0]))) { goto A0jNR; } $A6Df_ = array(); foreach ($Gq3xm as $cIsTQ) { $A6Df_[$cIsTQ[$znEM0]] = $cIsTQ; cikmB: } z4Ouk: $Gq3xm = $A6Df_; A0jNR: return $Gq3xm; } public function fetchColumn($cycy1 = 0) { return $this->statement->fetchColumn($cycy1); } public function fetchAllColumn($cycy1 = 0) { $A6Df_ = array(); in4f2: if (!(($Lpfa6 = $this->statement->fetchColumn($cycy1)) !== false)) { goto rizUh; } $A6Df_[] = $Lpfa6; goto in4f2; rizUh: return $A6Df_; } public function rowCount() { return $this->statement->rowCount(); } public function current() { if (!($this->rowIndex == -1)) { goto R7LqL; } return $this->next(); R7LqL: return $this->row; } public function key() { if (!($this->rowIndex == -1)) { goto udyTh; } $this->next(); udyTh: return $this->rowIndex; } public function next() { if (!(($this->row = $this->statement->fetch(\PDO::FETCH_ASSOC)) !== false)) { goto wFfeY; } $this->rowIndex++; wFfeY: return $this->row; } public function valid() { return $this->current() !== false; } public function rewind() { } } namespace Alumentum; class MysqlConnection extends AbstractConnection { private $transactionLevel = 0; private $nestedTransactionRollback = false; public function __construct($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF = 3306, array $cNacg = array(), $Jdk_3 = '') { $VtVxF = $VtVxF ?: 3306; if (empty($Jdk_3)) { goto J2TQr; } $cNacg[\PDO::MYSQL_ATTR_INIT_COMMAND] = "\x53\105\x54\x20\x4e\x41\115\105\x53\x20" . $Jdk_3; J2TQr: parent::__construct($hwv4R, $y9VTC, $DeoAY, $NcgPG, $VtVxF, $cNacg); } protected function connect() { $this->pdo = new \PDO("\x6d\171\163\x71\x6c\x3a\150\x6f\x73\x74\75" . $this->host . "\x3b\160\157\162\164\x3d" . $this->port . "\73\x64\x62\x6e\x61\x6d\145\x3d" . $this->database, $this->username, $this->password, $this->params); $this->updateLastUsedTimestamp(); } public function setDatabase($hwv4R) { if (!($this->database === $hwv4R)) { goto GlEfW; } return; GlEfW: $this->database = $hwv4R; $this->query("\125\123\x45\40" . $this->database); } public function queryPaged($LMXXm, array $cNacg, $Bb8eI, $rA4yF, &$oFS50 = false) { if (!($oFS50 !== false)) { goto CuEJl; } $LMXXm = preg_replace("\57\123\105\114\x45\103\124\57\x69", "\44\x30\x20\123\121\x4c\137\x43\x41\x4c\103\x5f\106\x4f\125\116\104\x5f\122\117\x57\x53", $LMXXm, 1); CuEJl: $LMXXm .= "\12\11\x9\11\x4c\111\x4d\111\x54\12\x9\x9\x9\x9" . (int) $rA4yF . "\12\11\11\11\117\x46\106\x53\105\124\xa\x9\x9\x9\x9" . (int) ($Bb8eI > 1 ? ($Bb8eI - 1) * $rA4yF : 0); $A6Df_ = $this->query($LMXXm, $cNacg); if (!($oFS50 !== false)) { goto sB1uP; } $oFS50 = (int) $this->query("\x53\105\114\x45\103\124\x20\x46\x4f\125\x4e\104\x5f\x52\117\127\x53\50\51")->fetchColumn(); sB1uP: return $A6Df_; } public function beginTransaction() { if (!($this->transactionLevel === 0)) { goto Gj2uh; } $this->pdo->beginTransaction(); $this->nestedTransactionRollback = false; Gj2uh: $this->transactionLevel++; $this->pdo->exec("\123\x41\x56\105\x50\117\111\116\124\x20\x74\x72\141\156\163" . $this->transactionLevel); } public function commitTransaction() { if (!($this->transactionLevel === 0)) { goto Hll1h; } return; Hll1h: $this->transactionLevel--; if (!($this->transactionLevel === 0)) { goto hatNz; } if (!$this->nestedTransactionRollback) { goto TqGH8; } throw new \PDOException("\103\117\115\x4d\x49\x54\x20\163\x69\153\145\162\164\x65\x6c\x65\156\x3b\x20\x65\x67\171\x20\142\145\x61\147\171\141\172\157\164\164\40\x74\x72\x61\x6e\x7a\141\x6b\x63\151\157\x20\153\157\162\141\x62\142\141\x6e\40\x52\x4f\x4c\x4c\102\101\103\113\x2d\x65\x74\x20\x68\151\166\x6f\164\164"); TqGH8: $this->pdo->commit(); hatNz: } public function rollBackTransaction($fW8dX = false) { if (!($this->transactionLevel === 0)) { goto pCkJd; } return; pCkJd: $this->transactionLevel--; if ($this->transactionLevel === 0) { goto XsKdq; } if ($fW8dX) { goto Vk2aI; } $this->nestedTransactionRollback = true; goto EuTax; Vk2aI: $this->nestedTransactionRollback = false; $this->pdo->exec("\x52\x4f\x4c\x4c\x42\101\x43\113\40\124\x4f\40\x74\x72\141\156\x73" . ($this->transactionLevel + 1)); EuTax: goto xfOaS; XsKdq: $this->pdo->rollBack(); xfOaS: } public function getLastInsertId() { return (int) $this->pdo->lastInsertId(); } public function ping() { try { $this->query("\x53\105\114\x45\x43\x54\x20\x31"); } catch (\Exception $VJ0SS) { $this->connect(); } } public function getErrorCode() { return $this->pdo->errorCode(); } public function getErrorInfo() { return $this->pdo->errorInfo(); } } namespace Alumentum; abstract class MysqlTable { protected $tableName; protected $dbConnection; protected $defaultDbConnectionName; protected function __construct(MysqlConnection $EBPEU = null) { if (!($EBPEU !== null)) { goto bWz12; } $this->dbConnection = $EBPEU; bWz12: } protected function __clone() { } public function getTableName() { return $this->tableName; } public function setTableName($wzeSX) { $this->tableName = $wzeSX; } protected function getDbConnection($izSho) { if ($this->dbConnection !== null) { goto LqUec; } return Db::getInstance()->getConnection($this->defaultDbConnectionName, $izSho); goto upqn2; LqUec: return $this->dbConnection; upqn2: } protected function quoteEntity($EMrXw) { return "\x60" . $EMrXw . "\x60"; } protected function buildSetParam($LN5do) { return $this->quoteEntity($LN5do) . "\x20\75\40\x3f"; } protected function buildWhereParam($LN5do, $FfXTh) { return $this->quoteEntity($LN5do) . "\x20" . ($FfXTh === null ? "\111\123" : "\x3d") . "\x20\x3f"; } protected function buildInsertQuery(array $AhHrL) { return "\12\x9\x9\11\111\116\123\x45\x52\124\40\111\116\124\117\xa\11\x9\11\11" . $this->quoteEntity($this->tableName) . "\xa\11\11\11\11\50" . implode("\54\40", array_map(array($this, "\x71\x75\157\164\145\x45\x6e\x74\x69\164\171"), array_keys($AhHrL))) . "\x29\12\x9\11\x9\x56\x41\114\x55\x45\x53\xa\11\11\x9\11\x28" . substr(str_repeat("\x3f\x2c\40", count($AhHrL)), 0, -2) . "\x29\xa\x9\x9"; } protected function buildInsertOnDuplicateKeyUpdateQuery(array $e396F, array $ZrHCE) { return $this->buildInsertQuery($e396F) . "\12\x9\x9\x9\117\x4e\x20\104\125\x50\114\111\103\x41\x54\105\x20\113\105\131\x20\125\x50\104\x41\124\x45\12\x9\x9\x9\x9" . implode("\x2c\40", array_map(array($this, "\142\x75\151\x6c\144\123\145\x74\x50\141\162\141\155"), array_keys($ZrHCE))); } protected function buildInsertManyQuery(array $VEpYp, $uiTHf) { return "\xa\x9\11\11\111\x4e\x53\105\122\x54\40\111\x4e\x54\x4f\12\x9\11\x9\x9" . $this->quoteEntity($this->tableName) . "\12\11\x9\11\x9\50" . implode("\x2c\x20", array_map(array($this, "\x71\x75\157\164\x65\105\x6e\164\x69\164\x79"), $VEpYp)) . "\51\xa\11\x9\x9\126\101\x4c\x55\x45\123\xa\x9\x9\x9\x9" . substr(str_repeat("\50" . substr(str_repeat("\77\x2c\x20", count($VEpYp)), 0, -2) . "\x29\54\12\x9", $uiTHf), 0, -3); } protected function buildUpdateQuery(array $AhHrL, array $OA0M6) { return "\12\11\x9\x9\x55\x50\104\101\x54\x45\12\x9\11\x9\11" . $this->quoteEntity($this->tableName) . "\12\x9\x9\11\123\105\124\xa\11\11\11\x9" . implode("\54\x20", array_map(array($this, "\142\165\151\x6c\144\123\145\164\120\x61\162\141\x6d"), array_keys($AhHrL))) . "\12\11\11\x9\x57\110\x45\x52\x45\12\x9\11\x9\x9" . (empty($OA0M6) ? "\124\x52\125\x45" : implode("\40\x41\116\x44\40", array_map(array($this, "\x62\x75\x69\x6c\144\x57\150\145\x72\145\120\141\162\141\155"), array_keys($OA0M6), $OA0M6))); } protected function buildDeleteQuery(array $OA0M6) { return "\12\11\x9\x9\x44\x45\114\x45\x54\x45\x20\106\x52\x4f\115\xa\x9\11\x9\x9" . $this->quoteEntity($this->tableName) . "\12\11\x9\11\127\110\105\122\105\xa\11\x9\11\x9" . (empty($OA0M6) ? "\x54\x52\x55\105" : implode("\40\101\x4e\x44\40", array_map(array($this, "\x62\165\151\154\x64\x57\150\145\x72\145\120\141\x72\141\x6d"), array_keys($OA0M6), $OA0M6))); } protected function buildSelectQuery(array $OA0M6, array $AnN0_, $NvGTE = 0) { $LMXXm = "\12\x9\x9\x9\123\x45\114\x45\103\124\xa\x9\x9\11\x9\52\xa\11\x9\x9\106\122\117\115\xa\11\x9\x9\11" . $this->quoteEntity($this->tableName) . "\12\11\11\x9\x57\110\105\122\105\xa\x9\11\x9\x9" . (empty($OA0M6) ? "\124\122\x55\x45" : implode("\40\x41\x4e\104\40", array_map(array($this, "\x62\165\x69\x6c\x64\127\150\145\162\x65\x50\141\162\141\155"), array_keys($OA0M6), $OA0M6))); foreach ($AnN0_ as $LN5do => &$qXCvR) { $qXCvR = $this->quoteEntity($LN5do) . "\40" . $qXCvR; oEk_r: } mtdTW: $LMXXm .= empty($AnN0_) ? '' : "\xa\11\11\x9\117\x52\104\105\x52\40\102\131\12\11\x9\x9\11" . implode("\54\40", $AnN0_); $LMXXm .= $NvGTE <= 0 ? '' : "\xa\x9\x9\11\114\111\x4d\x49\124\x20" . $NvGTE; return $LMXXm; } public function insert(array $AhHrL, &$aBS3L = false) { $X8Xns = $this->getDbConnection(Db::TYPE_READ_WRITE); $X8Xns->query($this->buildInsertQuery($AhHrL), array_values($AhHrL)); if (!($aBS3L !== false)) { goto K2PdL; } $aBS3L = $X8Xns->getLastInsertId(); K2PdL: } public function insertOnDuplicateKeyUpdate(array $e396F, array $ZrHCE, &$aBS3L = false) { $X8Xns = $this->getDbConnection(Db::TYPE_READ_WRITE); $X8Xns->query($this->buildInsertOnDuplicateKeyUpdateQuery($e396F, $ZrHCE), array_merge(array_values($e396F), array_values($ZrHCE))); if (!($aBS3L !== false)) { goto ncFeU; } $aBS3L = $X8Xns->getLastInsertId(); ncFeU: } public function insertMany(array $VEpYp, array $Gq3xm) { if (!empty($Gq3xm)) { goto OZopK; } trigger_error("\x55\x73\x65\x72\40\142\145\163\172\x75\162\141\x6e\144\x6f\40\145\154\x65\155\x20\164\157\155\142\40\141\x7a\40\x69\156\163\x65\x72\164\x4d\141\156\x79\x28\51\55\x6e\x65\x6c", E_USER_WARNING); OZopK: $o7mmW = count($VEpYp); $wyQsJ = array(); foreach ($Gq3xm as $cIsTQ) { $wyQsJ = array_merge($wyQsJ, array_slice(array_values($cIsTQ), 0, $o7mmW)); l8xFW: } eRDWs: $this->getDbConnection(Db::TYPE_READ_WRITE)->query($this->buildInsertManyQuery($VEpYp, count($Gq3xm)), $wyQsJ); } public function update(array $AhHrL, array $OA0M6 = array()) { $this->getDbConnection(Db::TYPE_READ_WRITE)->query($this->buildUpdateQuery($AhHrL, $OA0M6), array_merge(array_values($AhHrL), array_values($OA0M6))); } public function delete(array $OA0M6) { $this->getDbConnection(Db::TYPE_READ_WRITE)->query($this->buildDeleteQuery($OA0M6), array_values($OA0M6)); } public function select(array $OA0M6, array $AnN0_ = array(), $znEM0 = '') { return $this->getDbConnection(Db::TYPE_READ_ONLY)->query($this->buildSelectQuery($OA0M6, $AnN0_), array_values($OA0M6))->fetchAll($znEM0); } public function selectPaged(array $OA0M6, array $AnN0_, $Bb8eI, $rA4yF, &$oFS50 = false) { if (!empty($AnN0_)) { goto RFkRK; } trigger_error("\122\145\156\144\145\172\x65\163\x20\156\145\154\x6b\x75\154\40\156\x65\x6d\x20\x6a\141\166\141\x73\157\154\164\40\114\111\x4d\x49\124\x2d\x65\x74\40\150\141\163\x7a\156\141\x6c\157\40\x6c\x65\153\x65\x72\144\145\x7a\x65\163\x74\40\146\x75\164\x74\x61\x74\x6e\151", E_USER_WARNING); RFkRK: return $this->getDbConnection(Db::TYPE_READ_ONLY)->queryPaged($this->buildSelectQuery($OA0M6, $AnN0_), array_values($OA0M6), $Bb8eI, $rA4yF, $oFS50)->fetchAll(); } public function selectOne(array $OA0M6, array $AnN0_) { if (!empty($AnN0_)) { goto MO0u0; } trigger_error("\x52\x65\156\144\145\x7a\x65\163\40\156\x65\x6c\153\x75\154\x20\156\145\x6d\x20\x6a\141\166\141\x73\157\x6c\x74\x20\x4c\111\115\111\x54\x2d\x65\x74\x20\x68\x61\163\x7a\x6e\x61\x6c\x6f\x20\154\x65\x6b\x65\x72\x64\x65\x7a\145\x73\x74\40\146\x75\164\164\x61\164\x6e\151", E_USER_WARNING); MO0u0: return $this->getDbConnection(Db::TYPE_READ_ONLY)->query($this->buildSelectQuery($OA0M6, $AnN0_, 1), array_values($OA0M6))->fetchRow(); } } namespace Alumentum; class MysqlSemaphore { protected $connection; protected $name; public function __construct($uwSdB, $EMrXw) { $this->connection = Db::getInstance()->getConnection($uwSdB, Db::TYPE_READ_WRITE); $this->name = $EMrXw; } public function lock($t3Gab = 0) { return $this->connection->query("\123\x45\x4c\105\103\124\40\107\x45\124\137\114\117\103\x4b\x28\72\156\141\x6d\145\54\40\72\x74\151\155\145\157\x75\164\51", array("\x6e\141\x6d\x65" => $this->name, "\164\151\155\x65\157\165\x74" => (int) $t3Gab))->fetchColumn() == "\61"; } public function release() { return $this->connection->query("\x53\105\114\x45\103\x54\40\122\x45\x4c\x45\x41\123\105\x5f\114\117\x43\x4b\x28\72\156\x61\155\x65\x29", array("\x6e\141\155\x65" => $this->name))->fetchColumn() == "\61"; } } namespace Alumentum; abstract class Form { const METHOD_GET = "\147\x65\164"; const METHOD_POST = "\160\157\x73\x74"; protected $controls = array(); protected $labels = array(); protected $errorMessage = ''; protected $id = ''; public function addControl(FormControl $WlnIq, $PGG9t = '', $dNbD1 = '') { $WlnIq->setForm($this); if ($dNbD1 !== '') { goto oAnF4; } $this->controls[$WlnIq->getName()] = $WlnIq; goto mQNuQ; oAnF4: $yDa0O = array_search($dNbD1, array_keys($this->controls), true); if (!($yDa0O === false)) { goto cn8be; } $yDa0O = count($this->controls); cn8be: $this->controls = array_merge(array_slice($this->controls, 0, $yDa0O, true), array($WlnIq->getName() => $WlnIq), array_slice($this->controls, $yDa0O, null, true)); mQNuQ: if (!($PGG9t !== '')) { goto RnCQL; } $this->labels[$WlnIq->getName()] = $PGG9t; RnCQL: return $this; } public function getControl($EMrXw) { return isset($this->controls[$EMrXw]) ? $this->controls[$EMrXw] : null; } public function getControlLabel($EMrXw) { return isset($this->labels[$EMrXw]) ? $this->labels[$EMrXw] : ''; } public function isValid() { $A6Df_ = true; foreach ($this->controls as $WlnIq) { $A6Df_ = $WlnIq->isValid() && $A6Df_; la6eK: } uxOFi: return $A6Df_; } public function hasError() { return $this->errorMessage !== ''; } public function getErrorMessage() { return $this->errorMessage; } public function setErrorMessage($FJUS8) { $this->errorMessage = $FJUS8; } public function getId() { return $this->id; } public function renderControl($WlnIq, $xDouB = 0) { if (!$WlnIq->isRendered()) { goto WwkII; } return; WwkII: $vZSl9 = get_class($WlnIq); switch ($vZSl9) { case "\106\157\162\155\110\151\x64\144\x65\x6e\x49\x6e\x70\x75\x74": $WlnIq->render($xDouB); goto o9DJa; case "\x46\x6f\x72\x6d\x43\x68\x65\x63\x6b\142\x6f\170": echo "\74\160\x3e\74\x6c\141\142\145\154\x20\146\x6f\162\75\42" . $WlnIq->getId() . "\x22\x3e"; $WlnIq->render($xDouB); if (empty($this->labels[$WlnIq->getName()])) { goto RnA3v; } echo $this->labels[$WlnIq->getName()]; RnA3v: echo "\74\57\154\x61\x62\145\154\76"; if (!$WlnIq->hasHint()) { goto XmDiu; } echo "\74\142\162\57\x3e\x3c\x65\x6d\x3e" . $WlnIq->getHint() . "\x3c\57\145\155\76"; XmDiu: if (!$WlnIq->hasError()) { goto mdFnp; } echo "\x3c\x62\162\x2f\x3e\74\x73\164\162\157\x6e\147\x3e" . $WlnIq->getErrorMessage() . "\x3c\x2f\163\x74\x72\157\x6e\147\x3e"; mdFnp: echo "\x3c\57\x70\x3e"; goto o9DJa; case "\x46\157\x72\x6d\103\x68\x65\x63\153\x62\x6f\170\x47\162\157\x75\160": case "\106\x6f\x72\x6d\122\x61\x64\151\157\107\x72\x6f\165\160": echo "\74\160\x3e"; if (empty($this->labels[$WlnIq->getName()])) { goto P4lLB; } echo "\x3c\154\x61\x62\x65\x6c\76" . $this->labels[$WlnIq->getName()] . "\x3c\x2f\x6c\141\x62\x65\154\x3e"; P4lLB: foreach ($WlnIq->getValues() as $mCvrK) { echo "\74\x62\x72\57\x3e\74\154\x61\x62\x65\x6c\40\x66\157\162\x3d\42" . $WlnIq->getControlId($mCvrK) . "\42\x3e"; $WlnIq->renderControl($mCvrK, $xDouB); echo $WlnIq->getLabel($mCvrK) . "\74\57\154\x61\x62\145\x6c\x3e"; h_3SD: } aabfc: if (!$WlnIq->hasHint()) { goto ddMo7; } echo "\x3c\142\x72\x2f\x3e\x3c\145\x6d\76" . $WlnIq->getHint() . "\x3c\57\145\x6d\x3e"; ddMo7: if (!$WlnIq->hasError()) { goto H1552; } echo "\x3c\142\162\x2f\x3e\74\x73\x74\x72\x6f\156\147\x3e" . $WlnIq->getErrorMessage() . "\x3c\57\163\164\x72\157\156\x67\x3e"; H1552: echo "\74\x2f\x70\x3e"; goto o9DJa; case "\x46\157\162\155\102\x75\164\x74\x6f\x6e": echo "\74\160\x3e"; $WlnIq->render($xDouB); echo "\x3c\57\x70\x3e"; goto o9DJa; case "\x46\157\162\x6d\x54\145\x78\164\x49\x6e\160\165\164": case "\106\x6f\162\x6d\x44\x72\x6f\x70\x64\x6f\x77\156": default: echo "\74\x70\76"; if (empty($this->labels[$WlnIq->getName()])) { goto SX6Z7; } echo "\74\x6c\141\x62\x65\154\x20\x66\x6f\x72\75\42" . $WlnIq->getId() . "\42\x3e" . $this->labels[$WlnIq->getName()] . "\x3a\74\57\x6c\x61\x62\x65\x6c\76\x3c\142\162\57\x3e"; SX6Z7: $WlnIq->render($xDouB); if (!$WlnIq->hasHint()) { goto tEfex; } echo "\74\142\162\57\76\74\145\155\76" . $WlnIq->getHint() . "\74\57\x65\x6d\76"; tEfex: if (!$WlnIq->hasError()) { goto zoq6Z; } echo "\x3c\142\162\57\x3e\74\163\x74\162\157\156\x67\x3e" . $WlnIq->getErrorMessage() . "\74\x2f\x73\164\x72\x6f\156\x67\76"; zoq6Z: echo "\74\57\160\x3e"; } T6vyX: o9DJa: $WlnIq->setRendered(); } public function renderControls($fxpSq = 1) { foreach ($this->controls as $WlnIq) { $this->renderControl($WlnIq, $fxpSq); $fxpSq++; xZ8dB: } IvfCA: } public function render($DcRAY, $Nc_3k, array $cSSMM = array(), $NnBmC = '', $fxpSq = 1) { $this->renderBegin($DcRAY, $Nc_3k, $cSSMM, $NnBmC); $this->renderError(); $this->renderControls($fxpSq); $this->renderEnd(); } public function renderBegin($DcRAY, $Nc_3k, array $cSSMM = array(), $NnBmC = '') { if (!($NnBmC !== '')) { goto TFGZc; } $cSSMM["\151\144"] = $NnBmC; TFGZc: $this->id = $NnBmC; echo "\x3c\146\157\x72\x6d\40\141\143\164\x69\x6f\x6e\75\42" . $DcRAY . "\x22\40\x6d\x65\x74\150\x6f\x64\75\42" . $Nc_3k . "\42"; foreach ($cSSMM as $EzRJI => $HKULo) { echo "\x20" . $EzRJI . "\x3d\x22" . $HKULo . "\x22"; UJ8sa: } wWc7J: echo "\x3e"; } public function renderEnd() { echo "\74\57\146\157\x72\x6d\x3e"; } public function renderError() { if (!$this->hasError()) { goto YYvO2; } echo "\x3c\x70\x3e" . $this->errorMessage . "\x3c\x2f\160\x3e"; YYvO2: } public function renderHiddenControls() { foreach ($this->controls as $WlnIq) { if (!($WlnIq instanceof FormHiddenInput || $WlnIq instanceof FormTextInput && $WlnIq->getType() === FormTextInput::TYPE_HIDDEN)) { goto fiojL; } $this->renderControl($WlnIq); fiojL: gx4fM: } UVFzm: } public function resetRendered() { foreach ($this->controls as $WlnIq) { $WlnIq->resetRendered(); sbiZF: } zN_PW: } } namespace Alumentum; abstract class FormControl { protected $name; protected $errorMessage = ''; protected $hint = ''; protected $attributes = array(); protected $form; protected $isRendered = false; public function __construct($EMrXw, array $cSSMM) { $this->name = $EMrXw; $this->attributes = $cSSMM; } public function getName() { return $this->name; } public function setName($EMrXw) { $this->name = $EMrXw; } public function getId() { $Zoauv = $this->form->getId(); return $Zoauv !== '' ? $Zoauv . ucfirst($this->name) . "\x49\x64" : $this->name . "\111\144"; } public function hasError() { return $this->errorMessage !== ''; } public function getErrorMessage() { return $this->errorMessage; } public function setErrorMessage($FJUS8) { $this->errorMessage = $FJUS8; } public function hasHint() { return $this->hint !== ''; } public function getHint() { return $this->hint; } public function isValid() { return true; } public function setForm(Form $VxTww) { $this->form = $VxTww; } public function addAttribute($EMrXw, $mCvrK, $B0mTj = true) { if (!($B0mTj || empty($this->attributes[$EMrXw]))) { goto n1CoI; } $this->attributes[$EMrXw] = $mCvrK; n1CoI: } public function isRendered() { return $this->isRendered; } public function setRendered() { $this->isRendered = true; } public function resetRendered() { $this->isRendered = false; } public abstract function render($xDouB = 0); } namespace Alumentum; class FormTextInput extends FormControl { const TYPE_TEXT = "\164\x65\x78\164"; const TYPE_MULTIPLE = "\155\x75\154\164\x69\x70\154\145"; const TYPE_EMAIL = "\x65\155\141\x69\154"; const TYPE_PASSWORD = "\x70\141\x73\163\x77\x6f\162\144"; const TYPE_HIDDEN = "\x68\x69\x64\x64\x65\156"; protected $type; protected $value; protected $mandatoryErrorMessage; protected $validators = array(); public function __construct($izSho, $EMrXw, $mCvrK = '', $p0cRv = '', $NDn1p = array(), array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->type = $izSho; $this->value = $mCvrK; $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; if (!$NDn1p instanceof Validator) { goto ZknQG; } $NDn1p = array($NDn1p); ZknQG: foreach ($NDn1p as $dhx3I) { $this->addValidator($dhx3I); AxY_s: } UwSlh: } public function getType() { return $this->type; } public function setType($izSho) { $this->type = $izSho; } public function getValue() { return $this->value; } public function setValue($mCvrK) { $this->value = $mCvrK; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function addValidator(Validator $dhx3I) { $this->validators[] = $dhx3I; } public function isValid() { $this->errorMessage = ''; if (!($this->value === '')) { goto Lw3Si; } if ($this->mandatoryErrorMessage !== '') { goto Z5ZKX; } return true; goto YUotU; Z5ZKX: $this->errorMessage = $this->mandatoryErrorMessage; return false; YUotU: Lw3Si: $A6Df_ = true; foreach ($this->validators as $dhx3I) { $A6Df_ = $dhx3I->isValid($this->value); if ($A6Df_) { goto hR93r; } $this->errorMessage = $dhx3I->getErrorMessage(); goto NC1_U; hR93r: eOygs: } NC1_U: return $A6Df_; } public function render($xDouB = 0) { $mCvrK = ''; if (!($this->type !== self::TYPE_PASSWORD)) { goto B8z13; } $mCvrK = htmlspecialchars($this->value, ENT_QUOTES); B8z13: $cSSMM = $this->attributes; if (!($xDouB > 0)) { goto pD5MG; } $cSSMM["\x74\x61\142\151\x6e\144\x65\170"] = $xDouB; pD5MG: if ($this->type === self::TYPE_MULTIPLE) { goto dhy7y; } echo "\74\151\156\160\x75\x74\40\164\171\160\x65\75\x22" . $this->type . "\x22\40\x6e\141\155\145\75\42" . $this->name . "\42\x20\x69\144\x3d\x22" . $this->getId() . "\x22\40\x76\141\154\x75\145\x3d\x22" . $mCvrK . "\42\x20"; foreach ($cSSMM as $EzRJI => $HKULo) { echo $EzRJI . "\x3d\x22" . $HKULo . "\x22\x20"; V_AkI: } t6tYt: echo "\57\76"; goto u34r3; dhy7y: $cSSMM += array("\x72\x6f\167\163" => "\x31\60", "\x63\157\x6c\x73" => "\x34\x30"); echo "\74\164\145\170\164\141\x72\x65\x61\40\156\141\155\x65\x3d\42" . $this->name . "\x22\x20\x69\x64\75\x22" . $this->getId() . "\x22\40"; foreach ($cSSMM as $EzRJI => $HKULo) { echo $EzRJI . "\x3d\42" . $HKULo . "\x22\x20"; Ec5v6: } aP9Rg: echo "\x3e", $mCvrK, "\x3c\57\x74\145\x78\x74\141\x72\x65\x61\76"; u34r3: } } namespace Alumentum; class FormFileInput extends FormControl { protected $mandatoryErrorMessage; protected $showMandatoryError = false; public function __construct($EMrXw, $p0cRv = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function setShowMandatoryError($YDLX0 = true) { $this->showMandatoryError = $YDLX0; } public function isValid() { $this->errorMessage = ''; if ($this->showMandatoryError && $this->mandatoryErrorMessage !== '') { goto nWcCc; } return true; goto CPRmV; nWcCc: $this->errorMessage = $this->mandatoryErrorMessage; return false; CPRmV: } public function render($xDouB = 0) { if (!($xDouB > 0)) { goto yN4jK; } $this->attributes["\x74\141\x62\x69\156\x64\x65\x78"] = $xDouB; yN4jK: echo "\74\151\x6e\160\165\x74\40\x74\171\160\x65\75\x22\x66\x69\154\x65\x22\40\156\x61\x6d\145\75\x22" . $this->name . "\x22\40\151\x64\x3d\42" . $this->getId() . "\x22\x20"; foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "\x3d\42" . $HKULo . "\42\40"; b3Jg7: } Abeo1: echo "\57\x3e"; } } namespace Alumentum; class FormHiddenInput extends FormControl { public function __construct($EMrXw, $mCvrK = '', array $cSSMM = array()) { parent::__construct($EMrXw, $cSSMM); $this->value = $mCvrK; } public function getValue() { return $this->value; } public function setValue($mCvrK) { $this->value = $mCvrK; } public function render($xDouB = 0) { echo "\74\x69\156\160\165\164\40\164\171\x70\x65\75\x22\150\x69\x64\144\145\x6e\42\x20\156\x61\155\145\75\42" . $this->name . "\42\x20\151\x64\75\x22" . $this->getId() . "\42\x20\166\x61\154\x75\x65\x3d\42" . $this->value . "\x22\40"; foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "\x3d\x22" . $HKULo . "\x22\40"; E0ORr: } Asc_k: echo "\57\76"; } } namespace Alumentum; class FormCheckbox extends FormControl { protected $value; protected $isChecked; protected $mandatoryErrorMessage; public function __construct($EMrXw, $mCvrK, $ZnN8t = false, $p0cRv = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->value = $mCvrK; $this->isChecked = $ZnN8t; $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; } public function getValue() { return $this->value; } public function setValue($mCvrK) { $this->value = $mCvrK; } public function isChecked() { return $this->isChecked; } public function setChecked($ZnN8t) { $this->isChecked = $ZnN8t; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function isValid() { if (!(!$this->isChecked && $this->isMandatory())) { goto za5Sq; } $this->errorMessage = $this->mandatoryErrorMessage; return false; za5Sq: return true; } public function render($xDouB = 0) { if (!($xDouB > 0)) { goto wZJr2; } $this->attributes["\164\x61\142\x69\156\x64\145\x78"] = $xDouB; wZJr2: echo "\74\x69\156\x70\165\x74\40\164\x79\x70\145\x3d\42\143\150\145\x63\153\142\157\170\42\40\x6e\x61\x6d\x65\75\42" . $this->name . "\x22\x20\151\x64\x3d\x22" . $this->getId() . "\42\40\x76\x61\x6c\165\x65\x3d\x22" . $this->value . "\42\40" . ($this->isChecked() ? "\143\x68\145\x63\x6b\x65\x64\75\x22\x63\150\145\x63\153\145\144\42\x20" : ''); foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "\x3d\42" . $HKULo . "\42\40"; FkKls: } ZXxc1: echo "\x2f\76"; } } namespace Alumentum; class FormCheckboxGroup extends FormControl { protected $values; protected $selected; public function __construct($EMrXw, array $RjlQP, $kt0G2 = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $cSSMM); $this->values = $RjlQP; $this->hint = $ecqkb; $this->setSelected($kt0G2); } public function getValues() { return array_keys($this->values); } public function setValues(array $RjlQP) { $this->values = $RjlQP; } public function isSelected($mCvrK) { return in_array($mCvrK, $this->selected, true); } public function getSelected() { return $this->selected; } public function setSelected($kt0G2) { if (!is_string($kt0G2)) { goto ZlI4u; } $kt0G2 = $kt0G2 === '' ? array() : array($kt0G2); ZlI4u: $this->selected = array_values(array_intersect(array_keys($this->values), $kt0G2)); } public function getLabel($mCvrK) { if (in_array($mCvrK, array_keys($this->values), true)) { goto ya079; } trigger_error("\x4e\145\x6d\40\x6c\x65\x74\x65\172\151\x6b\x20\x69\154\171\x65\156\x20\145\x72\164\x65\153\40\141\40\143\163\x6f\x70\x6f\162\164\142\x61\x6e\x3a\x20" . $mCvrK, E_USER_WARNING); return ''; ya079: return $this->values[$mCvrK]; } public function getControlId($mCvrK) { $qlXxU = array_search($mCvrK, array_keys($this->values), true); $Zoauv = $this->form->getId(); return $Zoauv !== '' ? $Zoauv . ucfirst($this->name) . "\x49\x64" . $qlXxU : $this->name . "\x49\x64" . $qlXxU; } public function renderControl($mCvrK, $xDouB = 0) { if (array_key_exists($mCvrK, $this->values)) { goto Fa0eM; } trigger_error("\116\145\155\x20\x6c\145\164\x65\172\x69\x6b\x20\x69\x6c\x79\145\x6e\x20\x65\x72\x74\145\x6b\40\141\40\143\x73\x6f\x70\157\162\x74\x62\141\x6e\x3a\40" . $mCvrK, E_USER_WARNING); return; Fa0eM: if (!($xDouB > 0)) { goto pA2Js; } $this->attributes["\164\141\142\x69\x6e\144\x65\170"] = $xDouB; pA2Js: echo "\x3c\x69\156\x70\165\x74\x20\x74\171\x70\145\x3d\42\x63\150\145\143\x6b\142\157\170\42\x20\156\141\155\x65\x3d\x22" . $this->name . "\133\135\42\40\151\x64\75\x22" . $this->getControlId($mCvrK) . "\42\x20\166\141\x6c\165\145\75\x22" . $mCvrK . "\x22\40" . ($this->isSelected($mCvrK) ? "\143\x68\x65\143\153\145\144\75\x22\143\x68\145\143\153\x65\144\x22\40" : ''); foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "\75\x22" . $HKULo . "\x22\x20"; Cbnie: } a3GwP: echo "\x2f\x3e"; } public function render($xDouB = 0) { } } namespace Alumentum; class FormRadioGroup extends FormCheckboxGroup { protected $mandatoryErrorMessage; public function __construct($EMrXw, array $RjlQP, $kt0G2 = '', $p0cRv = '', array $cSSMM = array(), $ecqkb = '') { parent::__construct($EMrXw, $RjlQP, $kt0G2, $cSSMM, $ecqkb); $this->mandatoryErrorMessage = $p0cRv; } public function getSelected() { return !empty($this->selected) ? $this->selected[0] : ''; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function isValid() { if (!($this->isMandatory() && $this->getSelected() === '')) { goto DaQNx; } $this->errorMessage = $this->mandatoryErrorMessage; return false; DaQNx: return true; } public function renderControl($mCvrK, $xDouB = 0) { if (array_key_exists($mCvrK, $this->values)) { goto OsTD1; } trigger_error("\x4e\x65\155\x20\154\x65\164\145\x7a\x69\x6b\x20\151\154\x79\x65\x6e\x20\145\162\164\x65\153\x20\x61\40\162\141\x64\x69\157\x20\143\163\x6f\160\x6f\162\x74\142\141\156\72\x20" . $mCvrK, E_USER_WARNING); return; OsTD1: if (!($xDouB > 0)) { goto olm4V; } $this->attributes["\164\x61\x62\x69\x6e\144\x65\x78"] = $xDouB; olm4V: echo "\74\151\156\x70\165\164\40\164\171\160\145\x3d\x22\x72\x61\x64\151\157\42\40\156\141\155\x65\75\x22" . $this->name . "\x22\40\151\144\75\42" . $this->getControlId($mCvrK) . "\x22\x20\166\141\x6c\165\145\75\x22" . $mCvrK . "\x22\40" . ($this->isSelected($mCvrK) ? "\143\x68\x65\143\x6b\145\144\x3d\x22\143\x68\145\143\153\x65\144\x22\40" : ''); foreach ($this->attributes as $EzRJI => $HKULo) { echo $EzRJI . "\75\42" . $HKULo . "\x22\x20"; VjEcx: } XhSRD: echo "\57\x3e"; } } namespace Alumentum; class FormDropdown extends FormControl { protected $values; protected $selected; protected $mandatoryErrorMessage; protected $isMultiple; protected $groupLabels = array(); public function __construct($EMrXw, array $RjlQP, $kt0G2 = '', $p0cRv = '', array $cSSMM = array(), $ecqkb = '', $bhhXe = false, array $RhXP2 = array()) { parent::__construct($EMrXw, $cSSMM); $this->values = $RjlQP; $this->groupLabels = $RhXP2; $this->isMultiple = $bhhXe; $this->mandatoryErrorMessage = $p0cRv; $this->hint = $ecqkb; $this->setSelected($kt0G2); } public function getSelected() { return $this->selected; } public function setSelected($kt0G2) { if (!is_string($kt0G2)) { goto nguEl; } $kt0G2 = $kt0G2 === '' ? array() : array($kt0G2); nguEl: if ($this->isMultiple) { goto D_7Km; } $kt0G2 = array_slice($kt0G2, 0, 1); D_7Km: $RjlQP = array(); foreach ($this->values as $mCvrK => $pZKts) { if (is_array($pZKts)) { goto PKnRi; } $RjlQP[] = $mCvrK; goto pOXpv; PKnRi: foreach (array_keys($pZKts) as $c9khX) { $RjlQP[] = $c9khX; tz2rY: } NbUW8: pOXpv: xbkm7: } P8nBJ: $this->selected = array_intersect($RjlQP, $kt0G2); } public function getValues() { return $this->values; } public function getGroupLabel($mCvrK) { return !empty($this->groupLabels[$mCvrK]) ? $this->groupLabels[$mCvrK] : ''; } public function setValues(array $RjlQP) { $this->values = $RjlQP; } public function isMandatory() { return $this->mandatoryErrorMessage !== ''; } public function setMandatoryErrorMessage($p0cRv) { $this->mandatoryErrorMessage = $p0cRv; } public function isMultiple() { return $this->isMultiple; } public function setMultiple($bhhXe) { $this->isMultiple = $bhhXe; } public function isValid() { $this->errorMessage = ''; if (!(empty($this->selected) && $this->isMandatory())) { goto MgRgP; } $this->errorMessage = $this->mandatoryErrorMessage; return false; MgRgP: return true; } public function render($xDouB = 0) { $cSSMM = $this->attributes; if (!($xDouB > 0)) { goto nJ0rh; } $cSSMM["\x74\141\x62\x69\x6e\x64\145\170"] = $xDouB; nJ0rh: if (!$this->isMultiple) { goto Z1nr0; } $cSSMM["\x6d\165\154\x74\x69\x70\x6c\x65"] = "\x6d\165\x6c\164\151\x70\154\x65"; Z1nr0: echo "\x3c\163\x65\154\145\x63\x74\40\x6e\141\x6d\145\75\x22" . $this->name . ($this->isMultiple ? "\x5b\135" : '') . "\42\x20\151\x64\x3d\x22" . $this->getId() . "\42\x20"; foreach ($cSSMM as $EzRJI => $HKULo) { echo $EzRJI . "\75\x22" . $HKULo . "\42\x20"; ysJeD: } RnN5X: echo "\76" . "\12"; foreach ($this->values as $mCvrK => $pZKts) { if (is_array($pZKts)) { goto hIoqx; } echo "\74\157\x70\x74\x69\157\x6e\x20\x76\141\154\165\145\75\42" . $mCvrK . "\x22" . (in_array($mCvrK, $this->selected) ? "\x20\163\145\154\145\x63\x74\145\x64\75\x22\x73\x65\154\x65\x63\x74\x65\x64\42" : '') . "\76" . $pZKts . "\x3c\57\x6f\x70\164\151\157\156\x3e" . "\xa"; goto akr2J; hIoqx: echo "\74\157\160\164\x67\x72\x6f\x75\160\40\154\141\x62\145\154\x3d\x22" . $this->getGroupLabel($mCvrK) . "\x22\76" . "\12"; foreach ($pZKts as $c9khX => $TEAAZ) { echo "\74\x6f\160\164\151\x6f\156\x20\166\141\x6c\x75\145\x3d\42" . $c9khX . "\x22" . (in_array($c9khX, $this->selected) ? "\40\x73\145\x6c\x65\143\164\x65\x64\75\x22\x73\x65\154\145\143\164\145\x64\42" : '') . "\x3e" . $TEAAZ . "\74\57\x6f\160\x74\x69\x6f\156\x3e" . "\xa"; K_T6a: } jkxzO: echo "\x3c\x2f\x6f\x70\x74\x67\162\157\165\160\76" . "\12"; akr2J: M6RUO: } RFXvQ: echo "\x3c\57\163\145\154\x65\x63\164\76"; } } namespace Alumentum; class FormButton extends FormControl { const RENDER_TYPE_BUTTON = "\x62\165\164\164\x6f\x6e"; const RENDER_TYPE_INPUT = "\151\x6e\x70\x75\x74"; const TYPE_BUTTON = "\x62\x75\x74\164\x6f\x6e"; const TYPE_SUBMIT = "\163\x75\142\155\151\x74"; protected $renderType; protected $type; protected $value; public function __construct($voNXW, $izSho, $EMrXw, $mCvrK, array $cSSMM = array()) { parent::__construct($EMrXw, $cSSMM); $this->renderType = $voNXW; $this->type = $izSho; $this->value = $mCvrK; } public function getType() { return $this->type; } public function setType($izSho) { $this->type = $izSho; } public function getRenderType() { return $this->renderType; } public function setRenderType($voNXW) { $this->renderType = $voNXW; } public function render($xDouB = 0) { if (!($xDouB > 0)) { goto hlxO9; } $this->attributes["\164\141\x62\x69\x6e\144\145\x78"] = $xDouB; hlxO9: $a7Lvd = ''; foreach ($this->attributes as $EzRJI => $HKULo) { $a7Lvd .= $EzRJI . "\75\x22" . $HKULo . "\42\x20"; y9Cwu: } wtcHT: switch ($this->renderType) { case self::RENDER_TYPE_INPUT: echo "\74\151\x6e\x70\165\164\x20\x74\171\x70\x65\x3d\42" . $this->type . "\x22\40\x6e\x61\x6d\145\x3d\42" . $this->name . "\42\x20\x69\144\x3d\x22" . $this->getId() . "\42\x20\x76\141\x6c\165\x65\x3d\x22" . htmlspecialchars($this->value, ENT_QUOTES) . "\x22\x20"; echo $a7Lvd, "\x2f\76"; goto OB3oR; case self::RENDER_TYPE_BUTTON: echo "\x3c\x62\x75\x74\164\x6f\156\x20\164\x79\x70\x65\75\42" . $this->type . "\x22\40\156\x61\x6d\x65\x3d\42" . $this->name . "\42\40\x69\x64\x3d\x22" . $this->getId() . "\x22\40"; echo $a7Lvd, "\x3e", $this->value, "\74\x2f\x62\165\164\164\157\156\x3e"; goto OB3oR; default: trigger_error("\x49\163\155\x65\162\145\x74\x6c\x65\x6e\40\147\157\155\142\40\x72\145\x6e\x64\145\162\145\154\x65\x73\151\40\x6d\157\x64\x3a\x20" . $this->renderType, E_USER_WARNING); } o16u9: OB3oR: } } namespace Alumentum; abstract class Validator { protected $errorMessage; public function __construct($FJUS8) { $this->errorMessage = $FJUS8; } public function getErrorMessage() { return $this->errorMessage; } public abstract function isValid($mCvrK); } namespace Alumentum; class ValidatorCallback extends Validator { protected $callback; protected $params; public function __construct($FJUS8, $stgKp, array $cNacg = array()) { parent::__construct($FJUS8); $this->callback = $stgKp; $this->params = $cNacg; } public function isValid($mCvrK) { $cNacg = $this->params; array_unshift($cNacg, $mCvrK); return (bool) call_user_func_array($this->callback, $cNacg); } } namespace Alumentum; class ValidatorRegExp extends Validator { const PATTERN_IP = "\50\x3f\x3a\50\77\x3a\62\x35\133\60\x2d\x35\x5d\174\62\133\x30\x2d\64\135\134\144\174\61\x5c\x64\x7b\x32\x7d\174\x5b\61\55\x39\135\x5c\144\51\x5c\56\x29\x7b\63\175\50\77\x3a\62\x35\x5b\x30\55\x35\x5d\x7c\62\x5b\x30\x2d\64\x5d\x5c\144\x7c\x31\134\144\173\62\x7d\x7c\x5b\x31\x2d\x39\135\x5c\x64\51"; private $pattern; public function __construct($FJUS8, $kioZk) { parent::__construct($FJUS8); $this->pattern = $kioZk; } public function isValid($mCvrK) { return (bool) preg_match($this->pattern, $mCvrK); } } namespace Alumentum; class ValidatorEmail extends Validator { private $verifyOnServer; private $host; private $sender; public function __construct($FJUS8, $LaeMj = false, $NcgPG = '', $Z1GO6 = '') { parent::__construct($FJUS8); $this->verifyOnServer = $LaeMj; $this->host = empty($NcgPG) ? isset($_SERVER["\x53\x45\122\x56\105\122\x5f\116\101\x4d\105"]) ? $_SERVER["\123\105\x52\126\105\122\x5f\x4e\x41\x4d\x45"] : "\x6c\157\143\141\x6c\150\157\163\x74" : $NcgPG; $this->sender = empty($Z1GO6) ? "\160\x6f\x73\164\155\141\x73\x74\x65\x72\100" . $this->host : $Z1GO6; } public function isValid($mCvrK) { return filter_var($mCvrK, FILTER_VALIDATE_EMAIL) !== false && (!$this->verifyOnServer || $this->isRealEmailAddress($mCvrK)); } private function isRealEmailAddress($mGpEk) { $lWyJq = substr(strstr($mGpEk, "\x40"), 1); if (!(empty($lWyJq) || !checkdnsrr($lWyJq, "\101\116\x59"))) { goto CUtIO; } return false; CUtIO: $duj2a = array(); if (getmxrr($lWyJq, $duj2a)) { goto rxGxH; } $duj2a[] = $lWyJq; rxGxH: $A6Df_ = true; $uZBSz = null; foreach ($duj2a as $xkeEo) { try { $uZBSz = new Socket($xkeEo, 25); } catch (\Exception $VJ0SS) { goto hVjMW; } try { $uZBSz->writeLine("\x48\105\x4c\117\x20" . $this->host); if (!(substr($uZBSz->readLine(), 0, 3) !== "\62\x35\x30")) { goto fWT2n; } $uZBSz->writeLine("\121\125\x49\x54"); goto ss5d6; fWT2n: $uZBSz->writeLine("\115\x41\111\x4c\x20\x46\x52\x4f\115\72\40\74" . $this->sender . "\76"); if (!(substr($uZBSz->readLine(), 0, 3) !== "\x32\65\60")) { goto z6vMM; } $uZBSz->writeLine("\121\x55\111\x54"); goto ss5d6; z6vMM: $uZBSz->writeLine("\x52\103\x50\x54\x20\124\117\x3a\40\74" . $mGpEk . "\76"); $SeFjJ = $uZBSz->readLine(); if (!(substr($SeFjJ, 0, 3) !== "\x32\x35\x30" && strpos($SeFjJ, "\147\162\x65\x79\x6c\x69\163\x74\145\x64") === false)) { goto yI1bK; } $A6Df_ = false; yI1bK: $uZBSz->writeLine("\121\x55\x49\124"); } catch (\Exception $VJ0SS) { } goto ss5d6; hVjMW: } ss5d6: if (!($uZBSz !== null)) { goto PkkbC; } $uZBSz->disconnect(); PkkbC: return $A6Df_; } } namespace Alumentum; abstract class EmailTemplateAbstract extends TemplateAbstract { const RENDER_TEXT_METHOD = "\x72\x65\156\144\x65\x72\124\x65\170\164"; const RENDER_HTML_METHOD = "\x72\145\156\144\145\162\x48\164\x6d\x6c"; protected function getArguments($Nc_3k, array $cNacg) { $lyToz = array(); $a2cAg = new \ReflectionMethod($this, $Nc_3k); foreach ($a2cAg->getParameters() as $Fj3Fc) { $EMrXw = $Fj3Fc->getName(); if (array_key_exists($EMrXw, $cNacg)) { goto yHFcQ; } if ($Fj3Fc->isOptional()) { goto rAz0h; } throw new \Exception("\x4e\x69\x6e\x63\x73\x20\155\x65\147\x61\144\166\x61\x20\x65\x67\x79\x20\153\157\x74\145\154\x65\x7a\157\x20\164\145\x6d\x70\x6c\x61\164\x65\40\x70\x61\162\141\x6d\x65\164\x65\162\40\x65\162\164\145\153\x65\x3a\40" . get_class($this) . "\x2d\76" . $Nc_3k . "\x28\51\x20\72\x20\x24" . $EMrXw); goto cjJ1A; yHFcQ: $mCvrK = $cNacg[$EMrXw]; goto cjJ1A; rAz0h: $mCvrK = $Fj3Fc->getDefaultValue(); cjJ1A: $lyToz[] = $mCvrK; ilEgw: } rfvqh: return $lyToz; } public function getTextContent() { ob_start(); call_user_func_array(array($this, self::RENDER_TEXT_METHOD), $this->getArguments(self::RENDER_TEXT_METHOD, $this->rawParams)); return ob_get_clean(); } public function getHtmlContent() { ob_start(); call_user_func_array(array($this, self::RENDER_HTML_METHOD), $this->getArguments(self::RENDER_HTML_METHOD, $this->params)); return ob_get_clean(); } public function render() { throw new \Exception("\x45\x6d\x61\151\154\x20\x74\145\155\x70\x6c\x61\x74\x65\40\x6f\x62\152\x65\x6b\x74\x75\155\x72\x61\40\x6e\x69\156\143\x73\x20\145\x6e\x67\x65\x64\145\154\171\x65\172\166\x65\40\x61\40\162\145\x6e\x64\145\162\x28\x29\40\x68\151\166\141\163"); } } namespace Alumentum; class EmailLayout extends EmailTemplateAbstract { private $innerText = ''; private $innerHtml = ''; public function setInnerText($dl6OX) { $this->innerText = $dl6OX; } public function setInnerHtml($dl6OX) { $this->innerHtml = $dl6OX; } protected function renderInnerText() { echo $this->innerText; } protected function renderInnerHtml() { echo $this->innerHtml; } } namespace Alumentum; class Email extends EmailTemplateAbstract { const MAILER_SMTP = "\163\x6d\x74\x70"; const MAILER_MAIL = "\x6d\x61\151\x6c"; const MAILER_SENDMAIL = "\163\145\156\144\x6d\141\151\x6c"; const MAILER_QMAIL = "\x71\x6d\x61\x69\154"; const SECURITY_SSL = "\x73\x73\x6c"; const SECURITY_TLS = "\x74\154\x73"; const FORMAT_PLAINTEXT = "\x74\x65\x78\x74"; const FORMAT_HTML = "\x68\164\155\x6c"; const FORMAT_COMBINED = "\164\x65\x78\164\53\150\164\x6d\154"; protected $mailer; protected $layout = null; public function __construct() { $this->mailer = new \PHPMailer\PHPMailer\PHPMailer(); $this->mailer->CharSet = "\x75\164\146\55\70"; } public function setMailerType($izSho) { switch ($izSho) { case self::MAILER_SENDMAIL: $this->mailer->isSendmail(); goto pA8Wg; case self::MAILER_QMAIL: $this->mailer->isQmail(); goto pA8Wg; case self::MAILER_MAIL: $this->mailer->isMail(); goto pA8Wg; case self::MAILER_SMTP: default: $this->mailer->isSMTP(); goto pA8Wg; } ALuug: pA8Wg: return $this; } public function setSmtpPreferences($NcgPG = "\x6c\x6f\x63\x61\x6c\150\x6f\163\164", $VtVxF = 25, $n8a7o = '', $y9VTC = '', $DeoAY = '') { $this->mailer->Host = $NcgPG; $this->mailer->Port = $VtVxF; $this->mailer->SMTPSecure = $n8a7o; $this->mailer->SMTPAuth = !empty($y9VTC); $this->mailer->Username = $y9VTC; $this->mailer->Password = $DeoAY; return $this; } public function setSendMailPath($hnSkN) { $this->mailer->Sendmail = $hnSkN; return $this; } public function setCharset($Jdk_3) { $this->mailer->CharSet = $Jdk_3; return $this; } public function setFrom($Ktb80, $EMrXw = '') { $this->mailer->setFrom($Ktb80, $EMrXw); return $this; } public function addReplyTo($Ktb80, $EMrXw = '') { $this->mailer->addReplyTo($Ktb80, $EMrXw); return $this; } public function addTo($Ktb80, $EMrXw = '') { $this->mailer->addAddress($Ktb80, $EMrXw); return $this; } public function addCc($Ktb80, $EMrXw = '') { $this->mailer->addCC($Ktb80, $EMrXw); return $this; } public function addBcc($Ktb80, $EMrXw = '') { $this->mailer->addBCC($Ktb80, $EMrXw); return $this; } public function addStringAttachment($dl6OX, $Saw4x) { $this->mailer->addStringAttachment($dl6OX, $Saw4x); return $this; } public function setSubject($aN14Z) { $this->mailer->Subject = $aN14Z; return $this; } public function clearAllRecipients() { $this->mailer->clearAllRecipients(); return $this; } public function setLayout(EmailLayout $nEx6y) { $this->layout = $nEx6y; } public function getTextContent() { if ($this->layout !== null) { goto QRF79; } return parent::getTextContent(); goto Fx4AI; QRF79: $this->layout->setInnerText(parent::getTextContent()); return $this->layout->getTextContent(); Fx4AI: } public function getHtmlContent() { if ($this->layout !== null) { goto XWaks; } return parent::getHtmlContent(); goto q7J16; XWaks: $this->layout->setInnerHtml(parent::getHtmlContent()); return $this->layout->getHtmlContent(); q7J16: } public function send($b_2w4 = self::FORMAT_COMBINED) { switch ($b_2w4) { case self::FORMAT_PLAINTEXT: $this->mailer->isHTML(false); $this->mailer->Body = $this->getTextContent(); goto bsMaa; case self::FORMAT_COMBINED: $this->mailer->AltBody = $this->getTextContent(); case self::FORMAT_HTML: default: $this->mailer->msgHTML($this->getHtmlContent()); } Y9VN4: bsMaa: $A6Df_ = $this->mailer->send(); if ($A6Df_) { goto LJFqV; } trigger_error("\114\145\x76\145\154\40\x6b\x75\154\144\x65\x73\x20\156\145\x6d\40\163\151\153\145\x72\x75\154\164\x3a\x20" . $this->mailer->ErrorInfo, E_USER_WARNING); LJFqV: return $A6Df_; } } namespace Alumentum; class I18n { protected $language = "\145\x6e"; protected $languageData = array(); protected static $instance = null; public static function getInstance() { if (!(self::$instance === null)) { goto a_gDZ; } self::$instance = new static(); a_gDZ: return self::$instance; } private function __construct() { } private function __clone() { } public function getLanguage() { return $this->language; } public function setLanguage($tgN1w) { $this->language = $tgN1w; } public function getTranslation($NnBmC, array $cNacg = array(), $tgN1w = '') { if (!empty($tgN1w)) { goto ejqIP; } $tgN1w = $this->getLanguage(); ejqIP: if (isset($this->languageData[$tgN1w][$NnBmC])) { goto KS58O; } Events::triggerEvent("\151\61\x38\x6e\x2e\x65\166\145\x6e\164\x73\x2e\154\141\156\147\x75\x61\x67\x65\x5f\153\x65\171\x5f\156\157\x74\137\146\157\x75\x6e\144", array($NnBmC)); if (isset($this->languageData[$tgN1w][$NnBmC])) { goto j5FKs; } trigger_error("\x41\40\153\x6f\166\x65\164\x6b\145\x7a\157\x20\156\x79\145\154\x76\151\40\x65\154\x65\155\x20\156\151\156\143\163\x20\154\x65\x66\x6f\x72\x64\x69\x74\166\x61\40\42" . $tgN1w . "\42\40\156\x79\145\154\x76\162\x65\72\x20" . $NnBmC, E_USER_NOTICE); return $NnBmC; j5FKs: KS58O: if (!empty($cNacg)) { goto g7MPP; } return $this->languageData[$tgN1w][$NnBmC]; g7MPP: $JStuo = array(); foreach ($cNacg as $p5e6p => $mCvrK) { $JStuo["\173" . $p5e6p . "\x7d"] = $mCvrK; hA9ZL: } NglwY: return strtr($this->languageData[$tgN1w][$NnBmC], $JStuo); } public static function _($NnBmC, array $cNacg = array(), $tgN1w = '') { return self::getInstance()->getTranslation($NnBmC, $cNacg, $tgN1w); } public function hasLanguageFile($Hvdwm) { return is_readable($Hvdwm); } public function loadLanguageFile($Hvdwm, $tgN1w = '', $B0mTj = false) { if (is_readable($Hvdwm)) { goto epgDi; } trigger_error("\101\x20\x6d\x65\147\x61\144\157\x74\x74\x20\x6e\171\145\x6c\166\x69\x20\x66\151\154\x65\x20\x6e\x65\155\40\154\145\x74\145\172\151\x6b\x2c\x20\x76\x61\x67\x79\40\156\145\x6d\x20\x6f\x6c\x76\141\x73\x68\141\164\157\72\x20" . $Hvdwm, E_USER_WARNING); return false; epgDi: $IVV0D = (include $Hvdwm); if (is_array($IVV0D)) { goto zhnHw; } trigger_error("\x41\40\x6d\x65\x67\141\144\157\x74\164\x20\x6e\171\x65\x6c\x76\x69\40\x66\x69\x6c\x65\x20\x68\x69\x62\141\x73\x20\146\157\x72\x6d\x61\x74\165\155\x75\x3b\x20\x6e\x65\155\40\164\x6f\155\142\157\164\40\x61\x64\40\x76\x69\x73\163\172\141\x3a\40" . $Hvdwm, E_USER_WARNING); return false; zhnHw: if (!empty($tgN1w)) { goto gGWG4; } $tgN1w = $this->language; gGWG4: $this->languageData[$tgN1w] = $B0mTj || empty($this->languageData[$tgN1w]) ? $IVV0D : array_merge($this->languageData[$tgN1w], $IVV0D); return true; } } namespace Alumentum; interface IClassLoader { public function reset(); public function loadClass($dcDkQ); } namespace Alumentum; class ClassLoaderDigest implements IClassLoader { private $classList = null; public function reset() { $this->classList = null; } public function loadClass($dcDkQ) { if (!($this->classList === null)) { goto Q9h9R; } $this->loadClassListFile(Config::get("\163\171\x73\x74\145\155\56\160\x61\x74\x68\163\56\141\x75\164\x6f\x6c\157\x61\x64\x5f\x63\154\x61\x73\163\145\x73\137\146\x69\x6c\145")); Q9h9R: if (!isset($this->classList[$dcDkQ])) { goto GFpzC; } include $this->classList[$dcDkQ]; GFpzC: } public function loadClassListFile($oHn6t) { if (is_readable($oHn6t)) { goto u0ZCF; } trigger_error("\x41\40\x6d\x65\x67\x61\144\157\x74\164\x20\x6f\163\172\164\x61\x6c\171\154\x69\x73\x74\x61\x20\x66\x69\154\145\x20\x6e\x65\155\x20\x6c\145\164\145\172\151\x6b\x2c\40\166\141\147\171\40\156\145\155\x20\x6f\x6c\166\141\x73\150\141\x74\x6f\72\x20" . $oHn6t, E_USER_WARNING); return; u0ZCF: $oVvPB = (include $oHn6t); if (is_array($oVvPB)) { goto uGzwL; } trigger_error("\101\40\155\x65\147\141\144\x6f\164\x74\x20\157\163\172\x74\x61\x6c\171\x6c\x69\x73\164\141\x20\x66\151\x6c\x65\40\150\151\x62\x61\163\40\146\157\162\155\141\164\165\x6d\165\x3b\40\156\145\x6d\x20\x74\x6f\155\142\x6f\164\40\x61\x64\x20\166\151\x73\163\172\x61\72\x20" . $oHn6t, E_USER_WARNING); return; uGzwL: if (!empty($this->classList)) { goto XdUve; } $this->classList = $oVvPB; goto DuZkt; XdUve: $this->classList = array_merge($this->classList, $oVvPB); DuZkt: } } namespace Alumentum; class Session { private static $isRegenerateIdNeeded = false; private static $handler = null; private static $cookieDomain = null; public static function setHandler(SessionHandlerAbstract $NJuGc) { if (!self::isOpen()) { goto xzY6o; } throw new \Exception("\x4e\145\155\x20\x6c\145\x68\145\164\40\x73\145\163\163\151\x6f\156\40\153\x65\x7a\x65\154\x6f\x74\40\142\145\141\x6c\154\151\164\x61\156\151\x2c\x20\141\155\151\147\40\x6d\145\x67\x20\166\141\x6e\40\x6e\x79\151\164\166\x61\40\x61\x20\x73\x65\163\x73\x69\x6f\x6e"); xzY6o: self::$handler = $NJuGc; session_set_save_handler(array(self::$handler, "\157\160\145\x6e"), array(self::$handler, "\x63\154\x6f\x73\145"), array(self::$handler, "\x72\x65\141\144"), array(self::$handler, "\167\x72\151\x74\145"), array(self::$handler, "\144\145\163\x74\162\157\x79"), array(self::$handler, "\x67\x63")); } public static function setCookieDomain($RTGQa) { self::$cookieDomain = $RTGQa; } public static function getName() { return session_name(); } public static function setName($EMrXw) { if (!self::isOpen()) { goto tHigj; } throw new \Exception("\x41\40\x73\145\163\x73\151\157\156\40\x6d\x65\147\x20\166\141\x6e\40\x6e\171\x69\164\x76\x61\54\40\x69\147\x79\x20\156\x65\x6d\40\x6c\x65\150\145\x74\40\163\x65\163\x73\x69\x6f\x6e\x20\x6e\145\166\145\x74\40\141\x6c\154\151\x74\x61\156\151"); tHigj: session_name($EMrXw); } public static function regenerateId($Y7NVi = true) { if (self::isOpen()) { goto PTB3t; } self::$isRegenerateIdNeeded = true; return; PTB3t: if (!(self::$handler !== null)) { goto GCgZB; } self::$handler->regenerateId(); GCgZB: session_regenerate_id($Y7NVi); Application::getInstance()->getResponse()->setCookie(session_name(), session_id(), 0, '', self::$cookieDomain); self::$isRegenerateIdNeeded = false; } public static function open() { if (!self::isOpen()) { goto jXO2D; } throw new \Exception("\101\40\163\x65\x73\163\x69\157\156\40\x6d\x61\x72\x20\155\145\x67\x20\166\141\156\40\x6e\171\151\x74\x76\x61\54\x20\156\x65\x6d\x20\154\x65\150\145\164\40\155\145\x67\x20\145\x67\x79\x73\x7a\x65\162\40\155\145\147\x6e\171\x69\164\x6e\151"); jXO2D: session_start(); $XGnt9 = session_id(); if (!(!isset($_COOKIE[session_name()]) || $_COOKIE[session_name()] !== $XGnt9)) { goto owMfu; } Application::getInstance()->getResponse()->setCookie(session_name(), $XGnt9, 0, '', self::$cookieDomain); owMfu: if (!self::$isRegenerateIdNeeded) { goto d42uS; } self::regenerateId(); d42uS: SessionNamespace::initialize(); Events::addEventListener("\163\171\x73\x74\x65\x6d\x2e\x62\145\x66\x6f\162\x65\137\x73\145\156\x64\137\162\145\x73\x70\x6f\x6e\x73\145", array("\x5c\101\x6c\x75\x6d\145\x6e\x74\165\x6d\x5c\123\x65\163\163\151\157\156", "\x63\154\x6f\163\145")); } public static function isOpen() { return session_id() !== ''; } public static function close() { if (self::isOpen()) { goto A2rmR; } throw new \Exception("\101\40\163\145\x73\x73\151\x6f\x6e\x20\156\151\x6e\143\163\40\155\145\x67\x6e\x79\151\x74\166\x61\54\x20\151\147\171\40\x6e\145\x6d\40\154\145\x68\145\164\x20\x6c\145\172\141\162\156\151"); A2rmR: Events::removeEventListener("\x73\171\x73\x74\145\155\x2e\142\145\146\x6f\162\x65\137\x73\145\156\x64\x5f\162\x65\x73\x70\x6f\x6e\163\145", array("\134\101\154\165\x6d\145\156\x74\x75\155\x5c\123\145\163\163\151\x6f\156", "\x63\154\157\163\145")); session_write_close(); } public static function destroy() { if (self::isOpen()) { goto nPjI7; } throw new \Exception("\101\x20\163\145\x73\163\x69\157\x6e\x20\156\x69\x6e\143\x73\x20\x6d\x65\x67\156\171\151\x74\166\x61\54\x20\x69\147\x79\40\156\145\155\x20\154\x65\150\145\x74\x20\x74\157\162\157\x6c\156\151"); nPjI7: SessionNamespace::removeAllNamespaces(); Events::removeEventListener("\x73\171\163\x74\145\x6d\x2e\x62\145\x66\x6f\x72\x65\x5f\x73\145\x6e\144\x5f\162\145\x73\160\x6f\x6e\x73\x65", array("\x5c\101\154\x75\155\145\x6e\x74\x75\155\134\123\x65\163\163\151\x6f\156", "\143\154\157\x73\145")); $_SESSION = array(); $fCMb6 = session_name(); if (!isset($_COOKIE[$fCMb6])) { goto Iy42y; } $pZJ2Q = session_get_cookie_params(); Application::getInstance()->getResponse()->setCookie($fCMb6, '', 1, $pZJ2Q["\160\x61\x74\x68"], $pZJ2Q["\144\157\155\141\x69\156"], $pZJ2Q["\x73\145\143\x75\x72\145"], $pZJ2Q["\150\164\164\160\157\x6e\x6c\x79"]); unset($_COOKIE[$fCMb6]); Iy42y: session_destroy(); } public static function rememberMe($aj4VK = 30) { if (!(self::$handler !== null)) { goto mQCui; } self::$handler->rememberMe($aj4VK); mQCui: ini_set("\x73\145\x73\x73\x69\x6f\156\56\143\157\x6f\x6b\x69\x65\137\154\151\146\145\164\151\x6d\145", $aj4VK * 86400); self::regenerateId(); } } namespace Alumentum; class SessionNamespace implements \ArrayAccess { const SYSTEM_NAMESPACE_NAME = "\137\x5f\x61\x6c\x75\155\x65\156\x74\165\x6d"; private static $namespaces = array(); private static $expiringData = array(); private $name; public static function initialize() { static $jWSNb = false; if (!$jWSNb) { goto M0BvQ; } return; M0BvQ: $jWSNb = true; if (isset($_SESSION[self::SYSTEM_NAMESPACE_NAME])) { goto q2keB; } return; q2keB: foreach ($_SESSION[self::SYSTEM_NAMESPACE_NAME] as $JZE13 => $DloY0) { foreach ($DloY0 as $p5e6p => $aMc97) { if ($aMc97 === 1) { goto AZd6e; } $_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13][$p5e6p]--; goto dmLcn; AZd6e: self::$expiringData[$JZE13][$p5e6p] = $_SESSION[$JZE13][$p5e6p]; unset($_SESSION[$JZE13][$p5e6p]); unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13][$p5e6p]); dmLcn: eNpri: } oMTzC: if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13])) { goto FU8GY; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$JZE13]); FU8GY: ZgcPi: } R0ugB: if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME])) { goto zbWwf; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME]); zbWwf: } public static function getNamespace($EMrXw = "\144\x65\x66\x61\x75\x6c\164") { if (isset(self::$namespaces[$EMrXw])) { goto sbu27; } self::$namespaces[$EMrXw] = new SessionNamespace($EMrXw); sbu27: return self::$namespaces[$EMrXw]; } public static function removeAllNamespaces() { self::$namespaces = array(); } private function __construct($EMrXw) { if (!($EMrXw === self::SYSTEM_NAMESPACE_NAME)) { goto QGBo_; } throw new \Exception("\101\x20\162\x65\x6e\144\x73\x7a\145\162\40\x61\x6c\x74\x61\154\40\x66\x65\x6e\156\164\141\162\164\x6f\164\164\40\x73\145\x73\x73\x69\x6f\x6e\40\x6e\x65\x76\164\145\x72\x20\x6e\145\166\x65\164\x20\x6e\x65\x6d\x20\x6c\145\150\145\164\x20\150\x61\163\172\156\x61\x6c\x6e\x69"); QGBo_: $this->name = $EMrXw; if (Session::isOpen()) { goto mCVGx; } Session::open(); mCVGx: } private function __clone() { } public function getName() { return $this->name; } public function get($p5e6p, $xoUHz = null) { if (Session::isOpen()) { goto kWKaa; } throw new \Exception("\101\40\x73\145\163\x73\151\157\x6e\x20\x6e\151\156\143\x73\40\x6d\145\x67\156\x79\151\164\166\x61\x2c\x20\151\x67\171\40\x6e\145\155\40\154\x65\x68\145\x74\40\142\x65\x6c\x6f\x6c\x65\x20\x6f\x6c\x76\x61\163\156\151"); kWKaa: if (isset($_SESSION[$this->name][$p5e6p])) { goto IoNfB; } if (isset(self::$expiringData[$this->name][$p5e6p])) { goto Upwbn; } return $xoUHz; goto ywDSp; IoNfB: return $_SESSION[$this->name][$p5e6p]; goto ywDSp; Upwbn: return self::$expiringData[$this->name][$p5e6p]; ywDSp: } public function set($p5e6p, $mCvrK, $aMc97 = 0) { if (Session::isOpen()) { goto xmZBP; } throw new \Exception("\x41\40\x73\145\x73\163\x69\157\156\40\x6e\151\x6e\x63\x73\40\x6d\145\x67\156\171\151\164\166\141\54\x20\x69\147\171\x20\156\145\x6d\x20\154\x65\150\x65\x74\40\142\x65\x6c\x65\x20\x69\162\x6e\151"); xmZBP: $_SESSION[$this->name][$p5e6p] = $mCvrK; if (!($aMc97 > 0)) { goto ynh67; } $_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name][$p5e6p] = $aMc97; ynh67: } public function remove($p5e6p) { if (Session::isOpen()) { goto SUQr2; } throw new \Exception("\101\x20\163\x65\163\163\x69\157\156\40\x6e\x69\x6e\143\x73\40\x6d\145\x67\156\171\x69\164\166\141\x2c\x20\151\147\x79\x20\x6e\145\155\x20\x6c\145\x68\x65\x74\x20\142\145\154\x65\x20\151\x72\x6e\151"); SUQr2: unset($_SESSION[$this->name][$p5e6p]); unset(self::$expiringData[$this->name][$p5e6p]); if (!empty($_SESSION[$this->name])) { goto pWsLo; } unset($_SESSION[$this->name]); pWsLo: if (!isset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name][$p5e6p])) { goto KQ80J; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name][$p5e6p]); if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name])) { goto sH__M; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME][$this->name]); if (!empty($_SESSION[self::SYSTEM_NAMESPACE_NAME])) { goto ScVjs; } unset($_SESSION[self::SYSTEM_NAMESPACE_NAME]); ScVjs: sH__M: KQ80J: } public function reset() { if (Session::isOpen()) { goto fR3fP; } throw new \Exception("\101\40\163\x65\163\163\151\157\x6e\40\x6e\151\x6e\x63\163\40\x6d\x65\x67\x6e\171\151\164\166\x61\54\40\151\147\x79\40\x6e\145\x6d\40\154\145\x68\x65\x74\x20\x62\x65\154\x65\40\x69\x72\x6e\151"); fR3fP: $_SESSION[$this->name] = array(); } public function has($p5e6p) { if (Session::isOpen()) { goto HbpUm; } throw new \Exception("\x41\40\163\x65\x73\x73\151\157\156\x20\156\x69\x6e\x63\163\40\155\145\147\156\171\151\164\x76\x61\54\40\151\147\171\40\156\145\155\40\154\x65\150\145\x74\x20\x62\x65\x6c\x6f\154\145\x20\157\x6c\x76\141\x73\156\151"); HbpUm: return isset($_SESSION[$this->name][$p5e6p]) || isset(self::$expiringData[$this->name][$p5e6p]); } public function isEmpty($p5e6p) { if (Session::isOpen()) { goto ECBnD; } throw new \Exception("\x41\x20\x73\x65\x73\163\151\157\156\x20\x6e\151\x6e\x63\x73\40\155\145\147\156\171\151\x74\x76\141\x2c\40\x69\147\171\x20\x6e\x65\155\40\154\x65\150\145\x74\x20\x62\x65\x6c\157\154\x65\x20\157\x6c\166\141\163\156\151"); ECBnD: return empty($_SESSION[$this->name][$p5e6p]) && empty(self::$expiringData[$this->name][$p5e6p]); } public function offsetGet($p5e6p) { return $this->get($p5e6p); } public function offsetSet($p5e6p, $mCvrK) { $this->set($p5e6p, $mCvrK); } public function offsetUnset($p5e6p) { $this->remove($p5e6p); } public function offsetExists($p5e6p) { return $this->has($p5e6p); } } namespace Alumentum; abstract class SessionHandlerAbstract { private $autoRenewRememberMe = true; private $lifetime = 1800; private $updateInterval = 600; private $sessionHash = ''; private $modifiedAt = 0; private $isPersistent = false; public function setAutoRenewRememberMe($mIFC1) { $this->autoRenewRememberMe = $mIFC1; } public function setLifetime($aj4VK) { if (!($aj4VK <= 0 || $aj4VK >= 86400)) { goto cLgnD; } throw new \Exception("\x41\40\x73\x65\163\x73\151\x6f\x6e\40\x65\154\x65\164\164\x61\162\x74\141\155\x61\x6e\141\x6b\x20\x70\x6f\172\x69\164\x69\x76\40\x65\163\40\x31\40\x6e\x61\x70\156\141\154\40\153\x69\x73\145\142\142\x20\145\162\x74\145\x6b\x6e\x65\x6b\x20\153\x65\154\x6c\40\154\145\156\x6e\151\x65"); cLgnD: $this->lifetime = $aj4VK; } public function setUpdateInterval($gwLwa) { $this->updateInterval = $gwLwa; } public function rememberMe($aj4VK) { $this->lifetime = $aj4VK * 86400; } public function regenerateId() { $this->sessionHash = ''; } public function open($R7pov = '', $fCMb6 = '') { return true; } public function close() { return true; } public function read($XGnt9) { $dp748 = $this->load($XGnt9); $this->sessionHash = md5($dp748["\x64\141\164\141"]); $this->modifiedAt = $dp748["\155\157\144\151\x66\x69\x65\144\101\164"]; if (!($dp748["\154\x69\x66\145\164\x69\x6d\x65"] >= 86400)) { goto aWdeg; } $this->isPersistent = true; aWdeg: $this->lifetime = $dp748["\154\151\146\x65\x74\151\x6d\145"] > 0 ? $dp748["\x6c\151\146\x65\x74\151\x6d\x65"] : $this->lifetime; return $dp748["\x64\x61\x74\141"]; } public function write($XGnt9, $AhHrL) { $Sba0r = time(); if (!(md5($AhHrL) !== $this->sessionHash || $Sba0r > $this->modifiedAt + $this->updateInterval)) { goto TTuS2; } if (!($this->autoRenewRememberMe && $this->isPersistent)) { goto TpHDN; } $pZJ2Q = session_get_cookie_params(); Application::getInstance()->getResponse()->setCookie(session_name(), $XGnt9, $Sba0r + $this->lifetime, $pZJ2Q["\x70\141\x74\150"], $pZJ2Q["\x64\x6f\x6d\x61\151\x6e"], $pZJ2Q["\163\x65\x63\x75\x72\145"], $pZJ2Q["\150\x74\x74\160\x6f\156\x6c\171"]); TpHDN: return $this->save($XGnt9, $this->autoRenewRememberMe ? $this->lifetime : $this->lifetime - ($Sba0r - $this->modifiedAt), $AhHrL); TTuS2: return true; } public function destroy($XGnt9) { return $this->delete($XGnt9); } public function gc($fDiPm) { return $this->deleteExpired($fDiPm); } protected abstract function load($XGnt9); protected abstract function save($XGnt9, $aj4VK, $AhHrL); protected abstract function delete($XGnt9); protected abstract function deleteExpired($eUjNz); } namespace Alumentum; class SessionHandlerMysql extends SessionHandlerAbstract { private $connectionName; private $connection; public function __construct($aufVH) { $this->connectionName = $aufVH; } public function open($R7pov = '', $fCMb6 = '') { $this->connection = Db::getInstance()->getConnection($this->connectionName, Db::TYPE_READ_WRITE); return true; } protected function load($XGnt9) { $LMXXm = "\12\11\11\11\x53\x45\114\x45\103\124\xa\x9\x9\x9\11\x64\141\x74\x61\x2c\40\155\x6f\144\151\x66\x69\145\144\x5f\141\x74\x2c\x20\x65\170\x70\151\162\x65\x73\x5f\141\x74\12\11\x9\x9\106\x52\x4f\x4d\12\11\x9\x9\11\x73\x65\163\x73\x69\x6f\156\x73\xa\x9\x9\11\x57\110\105\x52\105\12\11\x9\11\x9\x69\x64\x20\75\x20\x3a\x73\x65\x73\163\151\x6f\x6e\x49\144\40\101\x4e\x44\40\x65\170\x70\x69\x72\145\163\x5f\141\164\40\x3e\x20\72\143\165\162\162\145\156\x74\124\151\155\145\xa\11\x9"; $h1cMa = $this->connection->query($LMXXm, array("\163\x65\163\x73\x69\157\156\x49\144" => $XGnt9, "\x63\165\x72\x72\x65\x6e\x74\124\x69\155\x65" => time()))->fetchRow(); return $h1cMa === false ? array("\x64\141\x74\141" => '', "\x6d\x6f\144\x69\146\x69\145\x64\101\x74" => 0, "\x6c\151\x66\x65\164\x69\x6d\x65" => 0) : array("\x64\141\164\x61" => $h1cMa["\x64\141\164\141"], "\155\x6f\x64\x69\146\x69\x65\x64\101\164" => (int) $h1cMa["\x6d\x6f\x64\x69\146\x69\145\144\137\x61\164"], "\x6c\x69\x66\145\x74\x69\x6d\145" => (int) $h1cMa["\145\x78\160\x69\162\x65\x73\137\141\164"] - (int) $h1cMa["\155\157\144\151\146\151\145\144\137\x61\164"]); } protected function save($XGnt9, $aj4VK, $AhHrL) { $LMXXm = "\12\x9\x9\11\x49\x4e\x53\105\122\x54\x20\x49\x4e\124\x4f\12\11\x9\11\11\163\x65\x73\163\x69\157\x6e\x73\12\11\11\x9\x9\50\151\144\x2c\x20\144\141\164\141\54\x20\155\157\x64\x69\146\151\x65\144\137\x61\x74\54\40\145\x78\x70\151\162\145\163\137\x61\164\x29\xa\11\11\11\x56\x41\x4c\125\x45\123\xa\x9\x9\x9\11\x28\x3a\x73\x65\x73\163\x69\x6f\x6e\x49\x64\54\40\72\144\141\164\x61\x31\x2c\x20\72\155\x6f\144\x69\x66\x69\145\144\x41\164\x31\54\40\x3a\x65\170\160\x69\162\x65\163\101\x74\61\x29\xa\11\x9\11\117\x4e\40\x44\125\x50\x4c\x49\103\101\124\x45\x20\x4b\x45\131\x20\x55\x50\x44\x41\x54\105\xa\x9\11\11\11\x64\x61\x74\141\40\x3d\x20\72\x64\141\x74\x61\62\54\40\155\157\x64\x69\146\151\145\144\x5f\141\x74\40\75\x20\72\x6d\157\144\x69\x66\151\x65\144\101\x74\62\x2c\x20\145\x78\x70\151\x72\145\x73\137\141\x74\x20\75\x20\72\x65\170\x70\151\x72\145\x73\101\164\62\xa\x9\x9"; $AZP2m = time(); $this->connection->query($LMXXm, array("\x73\145\163\163\151\x6f\156\111\144" => $XGnt9, "\144\141\164\141\x31" => $AhHrL, "\144\x61\164\x61\x32" => $AhHrL, "\155\x6f\144\151\x66\151\x65\144\x41\x74\x31" => $AZP2m, "\155\x6f\144\151\146\151\x65\x64\101\164\x32" => $AZP2m, "\x65\x78\x70\x69\162\145\163\x41\x74\61" => $AZP2m + $aj4VK, "\145\x78\x70\x69\x72\145\x73\101\164\62" => $AZP2m + $aj4VK)); return true; } protected function delete($XGnt9) { $LMXXm = "\xa\x9\x9\x9\104\x45\114\105\124\105\40\106\122\117\x4d\xa\11\11\11\11\x73\145\163\163\151\x6f\x6e\163\xa\x9\11\11\x57\x48\x45\122\105\xa\11\x9\11\x9\151\144\x20\75\40\x3a\x73\x65\163\163\x69\157\x6e\x49\144\12\x9\x9"; $this->connection->query($LMXXm, array("\x73\145\163\x73\x69\x6f\156\111\144" => $XGnt9)); return true; } protected function deleteExpired($eUjNz) { $LMXXm = "\xa\x9\11\x9\104\105\x4c\105\124\105\x20\x46\122\117\115\xa\11\11\x9\x9\163\x65\163\163\x69\x6f\156\163\xa\11\x9\11\x57\110\105\122\105\12\11\x9\x9\x9\145\170\x70\151\x72\145\163\x5f\x61\164\40\x3c\x20\72\143\x75\x72\162\145\x6e\x74\x54\x69\x6d\x65\xa\11\x9"; $this->connection->query($LMXXm, array("\x63\x75\x72\x72\145\x6e\164\x54\151\155\x65" => time())); return true; } } namespace Alumentum; abstract class ErrorHandlerAbstract { const E_EXCEPTION = 1073741824; public static $errorNames = array(E_ERROR => "\106\141\164\x61\x6c\x20\105\162\162\157\x72", E_WARNING => "\127\141\162\x6e\x69\156\147", E_PARSE => "\120\141\x72\x73\x65\x20\x45\162\x72\157\162", E_NOTICE => "\x4e\157\x74\x69\143\x65", E_CORE_ERROR => "\103\x6f\162\145\40\105\162\x72\157\x72", E_CORE_WARNING => "\103\157\x72\145\x20\127\x61\x72\x6e\x69\156\147", E_COMPILE_ERROR => "\103\x6f\x6d\x70\x69\x6c\x65\x20\x45\162\x72\157\162", E_COMPILE_WARNING => "\x43\157\x6d\x70\151\154\145\x20\x57\141\x72\156\151\156\x67", E_USER_ERROR => "\x55\163\x65\162\x20\x45\x72\x72\157\162", E_USER_WARNING => "\125\163\x65\x72\40\x57\141\x72\x6e\151\x6e\x67", E_USER_NOTICE => "\125\x73\x65\x72\x20\x4e\157\x74\151\143\x65", E_STRICT => "\x53\x74\x72\151\143\x74", E_RECOVERABLE_ERROR => "\122\145\x63\x6f\x76\145\162\141\142\x6c\x65\40\105\162\x72\x6f\162", E_DEPRECATED => "\x44\145\160\162\x65\x63\x61\164\x65\144", E_USER_DEPRECATED => "\125\163\145\162\40\104\x65\160\162\145\143\x61\x74\x65\144", self::E_EXCEPTION => "\x45\x78\143\x65\160\164\151\157\156"); public abstract function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r); } namespace Alumentum; use AlumentumPortal\AluVarDumper; class ErrorHandlerFile extends ErrorHandlerAbstract { private $ignoredVariables = array("\110\124\124\x50\x5f\107\105\124\x5f\x56\x41\x52\123", "\x48\124\124\120\x5f\x50\x4f\x53\124\x5f\126\x41\122\x53", "\110\124\x54\x50\137\x43\117\x4f\113\111\105\137\126\101\x52\x53", "\x48\x54\x54\120\137\123\x45\122\126\105\122\137\126\x41\x52\x53", "\110\124\x54\x50\137\120\117\x53\x54\137\x46\x49\x4c\x45\x53", "\110\124\x54\120\x5f\x53\105\x53\123\111\x4f\116\137\x56\101\x52\x53", "\110\x54\x54\x50\137\x45\x4e\x56\137\x56\x41\x52\x53", "\107\114\x4f\x42\x41\x4c\x53", "\137\x45\x4e\126", "\137\122\x45\121\x55\105\123\x54", "\137\106\111\x4c\x45\x53"); private $logPath; public function __construct($vibYS) { $this->logPath = $vibYS; } public function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r) { $G6EXD = $NnBmC . "\x2e\154\x6f\x67"; if (file_exists($this->logPath . $G6EXD)) { goto Zn0No; } $hZI0C = "\133" . self::$errorNames[$dnbH6] . "\x5d\40" . $CBRMl . "\40\133" . $oHn6t . "\x2c\x20" . $CJfhk . "\56\x20\163\x6f\x72\x5d" . "\xa" . "\x48\151\x62\x61\x20\x61\x7a\x6f\156\x6f\x73\303\xad\164\xc3\263\x3a\40" . $NnBmC . "\xa" . "\x49\144\xc5\221\x70\157\x6e\164\72\x20" . date("\x59\55\155\x2d\x64\x20\x48\72\151\x3a\x73", $Sba0r) . "\12"; $hZI0C .= "\xa\x2d\x2d\55\55\55\x2d\55\55\x2d\x2d\55\55\x2d\x2d\55\x2d\x2d\x2d\55\55\55\x2d\x2d\55\55\x2d\55\55\55\55\x2d\x2d\x2d\x2d\55\55\x2d\55\55\x2d\xa"; $hZI0C .= "\x2d\40\40\x20\x20\40\x20\40\40\x20\x20\40\102\145\x74\xc3\266\x6c\164\303\xb6\x74\164\x20\146\x69\x6c\x65\55\x6f\153\40\40\40\x20\x20\x20\x20\x20\x20\40\x2d\12"; $hZI0C .= "\55\55\55\55\x2d\x2d\55\55\x2d\x2d\55\55\55\55\55\x2d\x2d\55\55\x2d\55\x2d\x2d\55\x2d\55\x2d\x2d\55\55\55\55\55\x2d\x2d\55\x2d\x2d\x2d\55\xa"; foreach (get_included_files() as $Saw4x) { $hZI0C .= $Saw4x . "\12"; qDmNe: } yHoHL: $CTKqP = debug_backtrace(); $cTIQb = count($CTKqP); if (!($cTIQb > 1)) { goto mDErX; } $hZI0C .= "\12\xa\x2d\55\55\x2d\55\55\55\55\55\55\x2d\55\x2d\x2d\x2d\55\55\x2d\x2d\55\55\x2d\55\x2d\x2d\x2d\x2d\55\55\55\55\x2d\55\55\55\55\55\55\x2d\55\xa"; $hZI0C .= "\x2d\40\x20\40\40\x20\40\x20\40\40\40\x20\40\x44\x65\x62\165\x67\x20\x62\x61\x63\153\x74\162\x61\x63\x65\40\40\40\x20\40\40\x20\40\40\40\x20\55\12"; $hZI0C .= "\55\55\55\55\x2d\55\x2d\x2d\x2d\x2d\55\x2d\55\55\55\x2d\x2d\x2d\x2d\55\x2d\x2d\55\55\x2d\x2d\55\x2d\55\x2d\x2d\x2d\55\55\55\55\x2d\55\x2d\x2d\xa"; $mwC1X = 1; GIT0g: if (!($mwC1X < $cTIQb)) { goto xd9U0; } $CTKqP[$mwC1X] += array("\146\x69\x6c\145" => "\x3f", "\x6c\151\156\145" => "\77"); $hZI0C .= $CTKqP[$mwC1X]["\146\x75\156\143\164\x69\157\x6e"] . "\50\x29\x20\x5b" . $CTKqP[$mwC1X]["\146\151\154\x65"] . "\x2c\x20" . $CTKqP[$mwC1X]["\x6c\151\156\145"] . "\56\x20\163\157\x72\135\xa"; KVgHM: $mwC1X++; goto GIT0g; xd9U0: mDErX: $pjR8S = array(); $hZI0C .= "\xa\12\55\55\55\x2d\55\55\55\55\55\x2d\x2d\55\55\x2d\55\x2d\x2d\55\55\x2d\55\x2d\x2d\x2d\55\x2d\55\x2d\55\x2d\55\x2d\x2d\x2d\55\55\55\55\x2d\x2d\12"; $hZI0C .= "\55\x20\40\40\40\x20\x20\x20\x20\40\40\x20\40\40\x20\40\x56\303\241\x6c\x74\x6f\x7a\303\xb3\x6b\40\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\40\55\xa"; $hZI0C .= "\x2d\55\55\55\x2d\x2d\x2d\55\55\x2d\55\x2d\55\55\55\x2d\55\55\x2d\x2d\x2d\55\x2d\x2d\x2d\55\x2d\x2d\x2d\x2d\55\55\x2d\x2d\x2d\x2d\x2d\55\55\x2d\12"; foreach ($xYAch as $p5e6p => $mCvrK) { if (in_array($p5e6p, $this->ignoredVariables)) { goto TaHd0; } $pjR8S[$p5e6p] = $mCvrK; TaHd0: OCDg_: } ccGq6: $pjR8S += array("\137\123\105\122\x56\105\x52" => $_SERVER, "\x5f\107\105\124" => $_GET, "\x5f\120\117\123\x54" => $_POST, "\x5f\103\117\x4f\113\x49\x45" => $_COOKIE); if (isset($xYAch["\x47\x4c\x4f\x42\101\114\x53"])) { goto GP8jz; } $IIS58 = array(); $bMoPy = array_merge($this->ignoredVariables, array("\107\114\117\x42\101\x4c\x53", "\x5f\x47\105\x54", "\x5f\120\117\x53\x54", "\137\103\117\x4f\x4b\x49\105", "\137\x53\105\122\x56\x45\x52")); foreach ($GLOBALS as $p5e6p => $mCvrK) { if (in_array($p5e6p, $bMoPy)) { goto pevft; } $IIS58[$p5e6p] = $mCvrK; pevft: pbEz8: } hrO7z: $pjR8S["\x47\x4c\x4f\102\101\x4c\x53"] = $IIS58; GP8jz: $hZI0C .= AluVarDumper::dump($pjR8S); @file_put_contents($this->logPath . $G6EXD, $hZI0C); @chmod($this->logPath . $G6EXD, 0644); Zn0No: } } namespace Alumentum; class ErrorHandlerSyslog extends ErrorHandlerAbstract { private $syslogTag; private $syslogFacility; public function __construct($yGi3C = "\x50\x48\x50", $expny = LOG_LOCAL7) { $this->syslogTag = $yGi3C; $this->syslogFacility = $expny; } public function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r) { switch ($dnbH6) { case E_ERROR: case E_PARSE: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: case self::E_EXCEPTION: $y27Tr = LOG_ERR; goto TcPgB; case E_WARNING: case E_CORE_WARNING: case E_COMPILE_WARNING: case E_USER_WARNING: case E_RECOVERABLE_ERROR: $y27Tr = LOG_WARNING; goto TcPgB; case E_NOTICE: case E_USER_NOTICE: case E_STRICT: case E_DEPRECATED: case E_USER_DEPRECATED: default: $y27Tr = LOG_NOTICE; } zh9jN: TcPgB: @openlog($this->syslogTag, LOG_NDELAY, $this->syslogFacility); $CBRMl = str_replace(PHP_EOL, '', $CBRMl); @syslog($y27Tr, "\x5b" . self::$errorNames[$dnbH6] . "\x5d\x20" . $CBRMl . "\x20\133" . $oHn6t . "\x2c\x20" . $CJfhk . "\x2e\x20\x73\157\x72\135\x20\133\151\144\75" . $NnBmC . "\x5d"); @closelog(); } } namespace Alumentum; class ErrorHandlerFilter extends ErrorHandlerAbstract { private $errorHandler; private $filterCallback; public function __construct(ErrorHandlerAbstract $FAxMQ, $QLiSX) { $this->errorHandler = $FAxMQ; $this->filterCallback = $QLiSX; } public function handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, array $xYAch, $Sba0r) { if (!call_user_func($this->filterCallback, $NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch, $Sba0r)) { goto JpioA; } return; JpioA: $this->errorHandler->handleError($NnBmC, $dnbH6, $CBRMl, $oHn6t, $CJfhk, $xYAch, $Sba0r); } } namespace Alumentum; class UrlHelper { public static function url($p5Lm2, array $u6GFy = array(), array $wyQsJ = array(), $oA9V3 = '') { return htmlspecialchars(Application::getInstance()->getRouter()->generateUrl($p5Lm2, $u6GFy, $wyQsJ, $oA9V3), ENT_QUOTES); } }
Function Calls
None |
Stats
MD5 | 51d75b30cc15f51f1f6003ad117616d7 |
Eval Count | 0 |
Decode Time | 205 ms |