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 declare (strict_types = 1) { } namespace PhpMyAdmin\Controllers\Server\Status; use ..
Decoded Output download
<?php
declare (strict_types = 1) { } namespace PhpMyAdmin\Controllers\Server\Status; use PhpMyAdmin\DatabaseInterface; use PhpMyAdmin\ReplicationGui; use PhpMyAdmin\ResponseRenderer; use PhpMyAdmin\Server\Status\Data; use PhpMyAdmin\Template; use PhpMyAdmin\Url; use PhpMyAdmin\Util; use function __; use function implode; class StatusController extends AbstractController { private $replicationGui; private $dbi; public function __construct(ResponseRenderer $response, Template $template, Data $data, ReplicationGui $replicationGui, DatabaseInterface $dbi) { parent::__construct($response, $template, $data); $this->replicationGui = $replicationGui; $this->dbi = $dbi; } public function __invoke() : void { global $errorUrl; $errorUrl = Url::getFromRoute("/"); if ($this->dbi->isSuperUser()) { $this->dbi->selectDb("mysql"); } $replicationInfo = $this->data->getReplicationInfo(); $primaryInfo = $replicationInfo->getPrimaryInfo(); $replicaInfo = $replicationInfo->getReplicaInfo(); $traffic = array(); $connections = array(); $replication = ''; if ($this->data->dataLoaded) { if (isset($this->data->status["Bytes_received"], $this->data->status["Bytes_sent"])) { $bytes = Util::formatByteDown($this->data->status["Bytes_received"] + $this->data->status["Bytes_sent"], 3, 1); $networkTraffic = implode(" ", $bytes); } if (isset($this->data->status["Uptime"])) { $uptime = Util::timespanFormat($this->data->status["Uptime"]); } $startTime = Util::localisedDate($this->getStartTime()); $traffic = $this->getTrafficInfo(); $connections = $this->getConnectionsInfo(); if ($primaryInfo["status"]) { $replication .= $this->replicationGui->getHtmlForReplicationStatusTable("primary"); } if ($replicaInfo["status"]) { $replication .= $this->replicationGui->getHtmlForReplicationStatusTable("replica"); } } $this->render("server/status/status/index", array("is_data_loaded" => $this->data->dataLoaded, "network_traffic" => $networkTraffic ?? null, "uptime" => $uptime ?? null, "start_time" => $startTime ?? null, "traffic" => $traffic, "connections" => $connections, "is_primary" => $primaryInfo["status"], "is_replica" => $replicaInfo["status"], "replication" => $replication)); } private function getStartTime() : int { return (int) $this->dbi->fetchValue("SELECT UNIX_TIMESTAMP() - " . $this->data->status["Uptime"]); } private function getTrafficInfo() : array { $hourFactor = 3600 / $this->data->status["Uptime"]; $bytesReceived = Util::formatByteDown($this->data->status["Bytes_received"], 3, 1); $bytesReceivedPerHour = Util::formatByteDown($this->data->status["Bytes_received"] * $hourFactor, 3, 1); $bytesSent = Util::formatByteDown($this->data->status["Bytes_sent"], 3, 1); $bytesSentPerHour = Util::formatByteDown($this->data->status["Bytes_sent"] * $hourFactor, 3, 1); $bytesTotal = Util::formatByteDown($this->data->status["Bytes_received"] + $this->data->status["Bytes_sent"], 3, 1); $bytesTotalPerHour = Util::formatByteDown(($this->data->status["Bytes_received"] + $this->data->status["Bytes_sent"]) * $hourFactor, 3, 1); return array(array("name" => __("Received"), "number" => implode(" ", $bytesReceived), "per_hour" => implode(" ", $bytesReceivedPerHour)), array("name" => __("Sent"), "number" => implode(" ", $bytesSent), "per_hour" => implode(" ", $bytesSentPerHour)), array("name" => __("Total"), "number" => implode(" ", $bytesTotal), "per_hour" => implode(" ", $bytesTotalPerHour))); } private function getConnectionsInfo() : array { $hourFactor = 3600 / $this->data->status["Uptime"]; $failedAttemptsPercentage = "---"; $abortedPercentage = "---"; if ($this->data->status["Connections"] > 0) { $failedAttemptsPercentage = Util::formatNumber($this->data->status["Aborted_connects"] * 100 / $this->data->status["Connections"], 0, 2, true) . "%"; $abortedPercentage = Util::formatNumber($this->data->status["Aborted_clients"] * 100 / $this->data->status["Connections"], 0, 2, true) . "%"; } return array(array("name" => __("Max. concurrent connections"), "number" => Util::formatNumber($this->data->status["Max_used_connections"], 0), "per_hour" => "---", "percentage" => "---"), array("name" => __("Failed attempts"), "number" => Util::formatNumber($this->data->status["Aborted_connects"], 4, 1, true), "per_hour" => Util::formatNumber($this->data->status["Aborted_connects"] * $hourFactor, 4, 2, true), "percentage" => $failedAttemptsPercentage), array("name" => __("Aborted"), "number" => Util::formatNumber($this->data->status["Aborted_clients"], 4, 1, true), "per_hour" => Util::formatNumber($this->data->status["Aborted_clients"] * $hourFactor, 4, 2, true), "percentage" => $abortedPercentage), array("name" => __("Total"), "number" => Util::formatNumber($this->data->status["Connections"], 4, 0), "per_hour" => Util::formatNumber($this->data->status["Connections"] * $hourFactor, 4, 2), "percentage" => Util::formatNumber(100, 0, 2) . "%")); } } ?>
Did this file decode correctly?
Original Code
<?php
declare (strict_types = 1) { } namespace PhpMyAdmin\Controllers\Server\Status; use PhpMyAdmin\DatabaseInterface; use PhpMyAdmin\ReplicationGui; use PhpMyAdmin\ResponseRenderer; use PhpMyAdmin\Server\Status\Data; use PhpMyAdmin\Template; use PhpMyAdmin\Url; use PhpMyAdmin\Util; use function __; use function implode; class StatusController extends AbstractController { private $replicationGui; private $dbi; public function __construct(ResponseRenderer $response, Template $template, Data $data, ReplicationGui $replicationGui, DatabaseInterface $dbi) { parent::__construct($response, $template, $data); $this->replicationGui = $replicationGui; $this->dbi = $dbi; } public function __invoke() : void { global $errorUrl; $errorUrl = Url::getFromRoute("\57"); if ($this->dbi->isSuperUser()) { $this->dbi->selectDb("\155\171\163\x71\x6c"); } $replicationInfo = $this->data->getReplicationInfo(); $primaryInfo = $replicationInfo->getPrimaryInfo(); $replicaInfo = $replicationInfo->getReplicaInfo(); $traffic = array(); $connections = array(); $replication = ''; if ($this->data->dataLoaded) { if (isset($this->data->status["\x42\171\164\145\163\x5f\162\x65\x63\x65\x69\x76\x65\144"], $this->data->status["\x42\171\x74\145\x73\137\163\x65\156\x74"])) { $bytes = Util::formatByteDown($this->data->status["\x42\171\x74\x65\163\x5f\162\x65\x63\145\151\x76\x65\144"] + $this->data->status["\102\171\x74\x65\x73\137\x73\x65\156\x74"], 3, 1); $networkTraffic = implode("\40", $bytes); } if (isset($this->data->status["\x55\x70\164\x69\155\x65"])) { $uptime = Util::timespanFormat($this->data->status["\125\x70\x74\x69\155\x65"]); } $startTime = Util::localisedDate($this->getStartTime()); $traffic = $this->getTrafficInfo(); $connections = $this->getConnectionsInfo(); if ($primaryInfo["\x73\164\x61\164\x75\x73"]) { $replication .= $this->replicationGui->getHtmlForReplicationStatusTable("\160\162\x69\155\141\162\x79"); } if ($replicaInfo["\163\164\x61\x74\x75\x73"]) { $replication .= $this->replicationGui->getHtmlForReplicationStatusTable("\x72\145\160\x6c\151\x63\141"); } } $this->render("\x73\145\162\x76\x65\162\57\x73\164\141\164\165\x73\57\x73\164\141\164\x75\163\57\x69\x6e\x64\x65\170", array("\x69\163\137\144\x61\x74\x61\x5f\x6c\157\x61\144\x65\x64" => $this->data->dataLoaded, "\x6e\x65\164\167\157\162\x6b\137\x74\162\x61\x66\x66\x69\x63" => $networkTraffic ?? null, "\x75\160\164\x69\x6d\145" => $uptime ?? null, "\x73\x74\x61\x72\x74\137\164\151\155\x65" => $startTime ?? null, "\x74\162\x61\x66\146\151\143" => $traffic, "\143\x6f\156\156\145\143\164\151\x6f\156\163" => $connections, "\151\163\x5f\x70\162\x69\155\141\x72\171" => $primaryInfo["\x73\164\141\x74\165\x73"], "\151\x73\137\x72\x65\x70\154\151\143\141" => $replicaInfo["\x73\x74\141\x74\x75\x73"], "\x72\145\x70\154\x69\x63\x61\164\151\157\156" => $replication)); } private function getStartTime() : int { return (int) $this->dbi->fetchValue("\123\105\114\x45\x43\124\x20\125\116\x49\130\x5f\124\111\x4d\105\123\x54\101\x4d\120\50\x29\40\x2d\40" . $this->data->status["\x55\160\164\x69\155\145"]); } private function getTrafficInfo() : array { $hourFactor = 3600 / $this->data->status["\125\160\x74\151\x6d\x65"]; $bytesReceived = Util::formatByteDown($this->data->status["\102\171\164\x65\163\137\162\145\143\145\x69\x76\x65\144"], 3, 1); $bytesReceivedPerHour = Util::formatByteDown($this->data->status["\x42\171\164\145\x73\x5f\162\x65\143\145\151\x76\x65\144"] * $hourFactor, 3, 1); $bytesSent = Util::formatByteDown($this->data->status["\102\171\x74\x65\163\x5f\x73\145\156\x74"], 3, 1); $bytesSentPerHour = Util::formatByteDown($this->data->status["\102\x79\164\145\163\137\x73\x65\156\164"] * $hourFactor, 3, 1); $bytesTotal = Util::formatByteDown($this->data->status["\102\x79\164\x65\163\137\162\145\143\x65\x69\x76\145\x64"] + $this->data->status["\x42\x79\x74\x65\163\x5f\x73\145\156\x74"], 3, 1); $bytesTotalPerHour = Util::formatByteDown(($this->data->status["\102\171\164\145\163\137\162\145\143\x65\151\x76\x65\144"] + $this->data->status["\102\171\164\145\x73\137\x73\x65\156\164"]) * $hourFactor, 3, 1); return array(array("\156\141\155\145" => __("\x52\145\x63\145\151\166\x65\144"), "\156\x75\x6d\142\x65\162" => implode("\40", $bytesReceived), "\160\145\x72\137\x68\157\x75\162" => implode("\40", $bytesReceivedPerHour)), array("\156\141\x6d\145" => __("\x53\145\x6e\x74"), "\x6e\165\155\142\145\162" => implode("\x20", $bytesSent), "\x70\x65\x72\x5f\x68\x6f\165\x72" => implode("\x20", $bytesSentPerHour)), array("\156\x61\155\x65" => __("\124\157\x74\141\x6c"), "\156\x75\x6d\142\x65\162" => implode("\x20", $bytesTotal), "\x70\145\162\137\x68\157\x75\x72" => implode("\x20", $bytesTotalPerHour))); } private function getConnectionsInfo() : array { $hourFactor = 3600 / $this->data->status["\125\160\x74\x69\155\145"]; $failedAttemptsPercentage = "\55\x2d\55"; $abortedPercentage = "\55\x2d\x2d"; if ($this->data->status["\103\x6f\156\x6e\145\143\164\151\157\x6e\163"] > 0) { $failedAttemptsPercentage = Util::formatNumber($this->data->status["\101\142\x6f\162\164\145\x64\x5f\x63\x6f\x6e\156\x65\x63\x74\163"] * 100 / $this->data->status["\103\x6f\156\x6e\x65\143\164\x69\157\156\x73"], 0, 2, true) . "\45"; $abortedPercentage = Util::formatNumber($this->data->status["\101\142\157\162\164\x65\144\137\143\x6c\x69\x65\156\x74\163"] * 100 / $this->data->status["\x43\157\156\x6e\145\x63\164\x69\157\x6e\163"], 0, 2, true) . "\45"; } return array(array("\156\141\155\x65" => __("\x4d\x61\170\x2e\40\143\x6f\156\x63\165\x72\162\x65\x6e\x74\x20\143\x6f\x6e\x6e\x65\x63\164\x69\157\156\x73"), "\x6e\x75\x6d\142\145\x72" => Util::formatNumber($this->data->status["\115\x61\x78\x5f\x75\163\x65\x64\137\143\x6f\x6e\x6e\x65\143\x74\x69\x6f\156\163"], 0), "\x70\x65\x72\x5f\x68\x6f\x75\x72" => "\x2d\55\55", "\160\x65\x72\143\x65\156\x74\x61\x67\x65" => "\55\x2d\x2d"), array("\x6e\x61\155\145" => __("\x46\x61\151\154\x65\144\x20\x61\164\x74\x65\155\x70\x74\x73"), "\156\165\155\142\145\x72" => Util::formatNumber($this->data->status["\101\x62\x6f\x72\x74\145\x64\x5f\x63\x6f\156\156\145\x63\x74\x73"], 4, 1, true), "\x70\x65\162\x5f\150\157\x75\x72" => Util::formatNumber($this->data->status["\101\x62\157\x72\164\145\144\x5f\143\x6f\x6e\x6e\145\x63\x74\163"] * $hourFactor, 4, 2, true), "\x70\145\162\x63\145\156\x74\x61\147\x65" => $failedAttemptsPercentage), array("\156\141\x6d\145" => __("\x41\x62\x6f\x72\x74\145\x64"), "\x6e\x75\x6d\142\145\x72" => Util::formatNumber($this->data->status["\101\x62\157\x72\164\145\x64\x5f\143\154\151\145\156\x74\x73"], 4, 1, true), "\160\145\162\137\150\x6f\x75\162" => Util::formatNumber($this->data->status["\101\142\x6f\162\x74\x65\144\x5f\x63\x6c\x69\x65\x6e\x74\x73"] * $hourFactor, 4, 2, true), "\160\x65\162\x63\x65\x6e\164\x61\147\145" => $abortedPercentage), array("\156\x61\x6d\145" => __("\124\x6f\164\141\154"), "\156\x75\x6d\142\x65\162" => Util::formatNumber($this->data->status["\x43\x6f\x6e\156\x65\x63\x74\x69\x6f\156\x73"], 4, 0), "\160\x65\162\x5f\150\157\165\162" => Util::formatNumber($this->data->status["\x43\x6f\x6e\156\145\x63\164\x69\x6f\156\x73"] * $hourFactor, 4, 2), "\x70\x65\162\x63\145\156\x74\x61\x67\145" => Util::formatNumber(100, 0, 2) . "\x25")); } }
Function Calls
None |
Stats
MD5 | b2ef9a81aa35c3d0b0953be87b02485d |
Eval Count | 0 |
Decode Time | 54 ms |