login: emulate apache authentication to check admin login
[minimedit.git] / login.php
1 <?php
2 require 'auth.inc.php';
3
4 if ($editable) {
5         http_response_code(307);
6         header('Location: /');
7         exit;
8 }
9
10 header('WWW-Authenticate: Basic realm=""');
11 http_response_code(401);
12
13 // fallback page shown on authentication failure
14 include 'head.inc.php';
15 ?>
16 <h2>Inloggen mislukt</h2>
17 <p>Geen geldige login voor sitebeheer.</p>
18