mirror of
https://gitlab.com/pancakes1234/wdiscordbotserver.git
synced 2025-06-16 07:14:21 -06:00
Update admin.html
This commit is contained in:
parent
d3d61b5284
commit
307016c477
@ -108,6 +108,22 @@
|
||||
socket.emit('chat message', message); // Sends as admin
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// Handle login
|
||||
loginButton.addEventListener('click', () => {
|
||||
const username = usernameInput.value.trim();
|
||||
const password = passwordInput.value.trim();
|
||||
|
||||
if (username === adminUsername && password === adminPassword) {
|
||||
document.cookie = "ADMINSERVERSERVICEPERMSEC3256=true; path=/"; // Set admin cookie
|
||||
alert('Welcome, Admin!');
|
||||
loginDiv.classList.add('hidden'); // Hide login form
|
||||
adminControlsDiv.classList.remove('hidden'); // Show admin controls
|
||||
} else {
|
||||
loginError.classList.remove('hidden'); // Show error message
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user