39233-vm/admin/index.php
2026-03-18 06:44:17 +00:00

21 lines
704 B
PHP

<?php
session_start();
// Basic password protection for admin
if (!isset($_SESSION['is_admin']) || !$_SESSION['is_admin']) {
// If not authenticated, show login form
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['password'] === 'admin123') {
$_SESSION['is_admin'] = true;
header('Location: /admin/');
exit;
}
echo '<form method="post">Password: <input type="password" name="password"><button>Login</button></form>';
exit;
}
?>
<h1>Admin Panel</h1>
<nav>
<a href="/admin/billing.php">Billing</a>
<a href="/admin/queue.php">Queue</a>
<a href="/admin/webhook.php">Webhooks</a>
</nav>
<p>Manage users, pricing, and system configurations here.</p>