Download admin_authenticate.php from Presidor1/STC_APP: direct link, hf CLI and curl.
- Browser
- Download file 627 Bytes
-
https://huggingface.co/spaces/Presidor1/STC_APP/resolve/main/admin_authenticate.php
- Command line
-
hf download hf://spaces/Presidor1/STC_APP/admin_authenticate.php
-
curl -L -o admin_authenticate.php https://huggingface.co/spaces/Presidor1/STC_APP/resolve/main/admin_authenticate.php
627 Bytes
| session_start(); | |
| // Default credentials | |
| $default_user = 'Admin'; | |
| $default_pass = 'Admin123'; | |
| // Replace with DB check in production | |
| if ($_SERVER["REQUEST_METHOD"] == "POST") { | |
| $username = trim($_POST["username"]); | |
| $password = trim($_POST["password"]); | |
| if ($username === $default_user && $password === $default_pass) { | |
| $_SESSION["admin"] = true; | |
| header("Location: dashboard.php"); | |
| exit(); | |
| } else { | |
| echo "<script>alert('Invalid credentials'); window.location.href='admin.html';</script>"; | |
| exit(); | |
| } | |
| } else { | |
| header("Location: admin.html"); | |
| exit(); | |
| } | |