Итерация 1: каркас Slim 4 приложения
- Slim 4 + php-di контейнер с маршрутизацией - Docker Compose: app (PHP 8.3-FPM) + web (nginx) + db (MariaDB) - Phinx миграция: таблица users (uuid, username, password_hash) - Auth: login/logout с сессиями - Setup: создание первого пользователя - Dashboard с layout (Bootstrap 5.3) - CLI: bin/console, bin/run-scan-worker.php - Smoke test: scripts/check.sh - README.md, PLAN.md
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php ob_start(); ?>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<div class="card mt-5">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title text-center mb-4">Создание первого пользователя</h4>
|
||||
<p class="text-muted text-center">Это будет администратор системы "Домовой"</p>
|
||||
<?php if (isset($error)): ?>
|
||||
<div class="alert alert-danger"><?= htmlspecialchars($error) ?></div>
|
||||
<?php endif; ?>
|
||||
<form method="POST" action="/setup">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Имя пользователя</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required autofocus
|
||||
minlength="2" maxlength="255">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Пароль</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required
|
||||
minlength="8">
|
||||
<div class="form-text">Минимум 8 символов</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Создать аккаунт</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $content = ob_get_clean(); ?>
|
||||
<?php require dirname(__DIR__) . '/layout.php'; ?>
|
||||
Reference in New Issue
Block a user