安装向导:首次部署浏览器引导建库建表(批 26)

- 新增 install.php 独立安装向导:环境检查 → 表单(站点标题/家庭名/数据库/
  高德/管理员)→ 全量建表 → 基本种子数据 → 生成 config.php → 自动自删。
  已安装判定以 config.php 为准,重复访问只显示「已安装」。
- 新增 sql/schema.sql 全量建表脚本(15 张表,按外键依赖排序,全部
  IF NOT EXISTS),由向导执行;tools/migrate.php 继续负责增量迁移。
- index.php 加未安装检测:config.php 缺失或无效时跳转安装页。
- layout.php 标题回退值接通 app.name,安装时填的网站标题在页面上生效。
- 种子数据仅基本款:节点类型 5、角色标签 4、出行方式 9(不含需绑定
  车辆的自驾两类);管理员账号按既有加密方式写入。
- README 部署章节改为向导优先,手动方式降为备选。
- 验证:本地 60 文件 php -l 全过;渲染检查 386 项全过;
  安装流程端到端 46 项全过(临时副本 + 独立 MariaDB:跳转、表单、
  建表、种子、加密可逆、自删、已安装拒绝、错误路径)。
This commit is contained in:
2026-09-28 20:55:16 +08:00
parent 4a5dd19503
commit 7ec3ea559e
5 changed files with 853 additions and 31 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ $__initial = $__name !== '' ? mb_substr($__name, 0, 1) : '·';
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title><?= e($pageTitle ?? 'TripLog 家庭旅行日记') ?></title>
<title><?= e($pageTitle ?? ((string)(app_config()['app']['name'] ?? '') ?: 'TripLog 家庭旅行日记')) ?></title>
<?php /* 站点图标:一本翻开的日记本 —— 左页「家」、右页「路线 + 图钉」。
ICO 放站点根(浏览器没写地址也会去 /favicon.ico 找),其余走 asset() 带版本号。 */ ?>
<link rel="icon" href="<?= e(asset('favicon.ico')) ?>" sizes="any">