First git commit

This commit is contained in:
root
2026-09-08 18:21:10 +01:00
commit 66911dc450
65 changed files with 7012 additions and 0 deletions

20
public_html/login.php Normal file
View File

@ -0,0 +1,20 @@
<?php
require_once __DIR__ . '/lib/bootstrap.php';
$err = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
require_csrf();
$n = trim((string)($_POST['username'] ?? ''));
$p = (string)($_POST['pass'] ?? '');
if (user_login($n, $p)) redirect('/index.php');
$err = 'Bad username or password (or account banned).';
}
page_start('Log in', ['back' => '/index.php']);
if ($err) p_err($err);
p_form('/login.php', [
['name' => 'username', 'label' => 'Username', 'maxlength' => 16],
['name' => 'pass', 'label' => 'Password', 'type' => 'password', 'maxlength' => 40],
], 'Log in');
p_links([['/signup.php', 'Create an account'], ['/index.php', 'Home']]);
page_end();