<html lang=en><meta charset=UTF-8><meta content="width=device-width,initial-scale=1"name=viewport><title>Coders Hosting Panel</title><script src=https://cdn.tailwindcss.com></script><link href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css rel=stylesheet><link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap"rel=stylesheet><style>body{font-family:Roboto,sans-serif}.status{transition:all .3s ease-in-out}.status.active{color:#34d399}.status.inactive{color:#f87171}.logs ul{list-style-type:none;padding:0}.logs ul li{margin-bottom:.5rem}.logs ul li::before{content:"";margin-right:.5rem}.status-animation{display:inline-block;width:1rem;height:1rem;border-radius:50%;margin-left:.5rem;animation:pulse 1.5s infinite}.status-animation.active{background-color:#34d399}.status-animation.inactive{background-color:#f87171}@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.alert{display:none;position:fixed;top:20px;right:20px;padding:20px;background-color:#34d399;color:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1);animation:slideIn .5s forwards}.alert.show{display:block}.alert.error{background-color:#f87171}@keyframes slideIn{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}</style><body class="flex bg-gray-900 items-center justify-center min-h-screen"><div class="rounded-lg bg-gray-800 container mx-auto p-12 shadow-2xl max-w-md"id=loginPanel><h1 class="text-white font-bold mb-8 text-center text-4xl">Login</h1><form class=space-y-6 id=loginForm><div><label class="block font-medium mb-2 text-gray-400"for=email>Email:</label> <input class="rounded-lg text-white w-full bg-gray-700 border border-gray-600 p-4"id=email name=email required type=email></div><div><label class="block font-medium mb-2 text-gray-400"for=password>Password:</label> <input class="rounded-lg text-white w-full bg-gray-700 border border-gray-600 p-4"id=password name=password required type=password></div><button class="rounded-lg text-white w-full duration-300 font-bold py-4 transition bg-blue-600 hover:bg-blue-700"type=submit>Login</button></form></div><div class="rounded-lg bg-gray-800 container mx-auto p-12 shadow-2xl hidden max-w-4xl"id=mainPanel><h1 class="text-white font-bold mb-8 text-center text-5xl">Coders Hosting Panel</h1><div class="mb-8 flex space-x-4"><button class="rounded-lg text-white w-full duration-300 font-bold py-4 transition hover:scale-105 transform bg-green-600 hover:bg-green-700"id=startButton>Start</button> <button class="rounded-lg text-white w-full duration-300 font-bold py-4 transition hover:scale-105 transform bg-red-600 hover:bg-red-700"id=stopButton>Stop</button></div><div class="rounded-lg bg-gray-700 mt-8 p-6 text-gray-300 font-semibold status text-2xl text-center"id=status>Status: Checking... <span class=status-animation id=statusAnimation></span></div><div class="rounded-lg bg-gray-700 mt-8 p-6 text-gray-300 logs text-sm"id=logs><h2 class="text-2xl font-bold mb-4">Logs:</h2><ul id=logList><li>No logs available</ul></div></div><div class=alert id=alert><i class="fa-check-circle fas"></i> Action completed successfully!</div><script>const users = [
            { email: "yuvaldora@host.panel.com", password: "ybhost4ga", id: `yuval-dora` },
            { email: "ragedis@host.panel.com", password: "rgpanelgyra", id: `rage` },
            { email: "somin@host.panel.com", password: "smhpliuy", id: `somin-bot` },
            { email: "slixs@host.panel.com", password: "sxpaho4a", id: `slixs` },
            { email: "mrshibolet@host.panel.com", password: "mrpaho7fa", id: `mrshib` },
            { email: "masterohad@host.panel.com", password: "msobroles3", id: `master_ohad_bot` },
            { email: "TownZone@host.panel.com", password: "tzopea35a", id: `TownZone` },
        ];

        let currentUserId = null;

        document.getElementById('loginForm').addEventListener('submit', function(event) {
            event.preventDefault();
            const email = document.getElementById('email').value;
            const password = document.getElementById('password').value;

            const user = users.find(user => user.email === email && user.password === password);

            if (user) {
                currentUserId = user.id;
                document.getElementById('loginPanel').classList.add('hidden');
                document.getElementById('mainPanel').classList.remove('hidden');
                checkStatus();
            } else {
                showAlert('Invalid email or password', true);
            }
        });

        function showAlert(message, isError = false) {
            const alert = document.getElementById('alert');
            alert.innerHTML = isError ? `<i class="fas fa-times-circle"></i> ${message}` : `<i class="fas fa-check-circle"></i> ${message}`;
            alert.className = isError ? 'alert show error' : 'alert show';
            setTimeout(() => {
                alert.classList.remove('show');
            }, 3000);
        }

        function updateStatus(action, data) {
            const statusElement = document.getElementById('status');
            const statusAnimation = document.getElementById('statusAnimation');
            statusElement.innerText = action === 'start' ? 'Status: Online' : 'Status: Offline';
            statusElement.appendChild(statusAnimation);
            statusAnimation.className = action === 'start' ? 'status-animation active' : 'status-animation inactive';
            const logList = document.getElementById('logList');
            const logItem = document.createElement('li');
            logItem.innerText = `${action} bot`;
            logList.appendChild(logItem);
            showAlert('Action completed successfully!');
        }

        function checkStatus() {
            const action = 'status';

            const url = ` https://true-marginally-bat.ngrok-free.app/${action}/${currentUserId}`;

            fetch(url, {
                method: 'GET',
                headers: {
                    'Content-Type': 'application/json'
                }
            })
            .then(response => {
                if (!response.ok) {
                    throw new Error('Network response was not ok');
                }
                return response.json();
            })
            .then(data => {
                const status = data.status ? 'start' : 'stop';
                updateStatus(status, data.message);
            })
            .catch(error => {
                console.error('There was a problem with the fetch operation:', error);
                showAlert('Error: ' + error.message, true);
            });
        }

        document.getElementById('startButton').addEventListener('click', function() {
            const action = 'start';

            const url = ` https://true-marginally-bat.ngrok-free.app/${action}/${currentUserId}`;

            fetch(url, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                }
            })
            .then(response => {
                if (!response.ok) {
                    throw new Error('Network response was not ok');
                }
                return response.text();
            })
            .then(data => {
                updateStatus(action, data);
            })
            .catch(error => {
                console.error('There was a problem with the fetch operation:', error);
                showAlert('Error: ' + error.message, true);
            });
        });

        document.getElementById('stopButton').addEventListener('click', function() {
            const action = 'stop';

            const url = ` https://true-marginally-bat.ngrok-free.app/${action}/${currentUserId}`;

            fetch(url, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                }
            })
            .then(response => {
                if (!response.ok) {
                    throw new Error('Network response was not ok');
                }
                return response.text();
            })
            .then(data => {
                updateStatus(action, data);
            })
            .catch(error => {
                console.error('There was a problem with the fetch operation:', error);
                showAlert('Error: ' + error.message, true);
            });
        });</script>