<?php
require_once __DIR__.'/config.php';

if (isset($_POST['pw']) && $_POST['pw'] === ADMIN_PASSWORD) {
  $_SESSION['is_admin'] = true;
}

if (!is_admin()) {
  echo '<form method="post"><input type="password" name="pw"><button>Login</button></form>';
  exit;
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Dash Admin V2</title>
<link rel="stylesheet" href="assets/css/admin.css">
</head>
<body>

<h1>Dash Admin</h1>

<section>
  <h2>Apps</h2>
  <p>URLs only. Choose embed / external.</p>
</section>

<section>
  <h2>Widgets</h2>
  <p>Sandbox or Godâ€‘Mode. Overlay or Window.</p>
</section>

<section>
  <h2>Start Menu</h2>
  <p>Apps + folders only. No scripts.</p>
</section>

</body>
</html>
