feat: 为管理界面添加Font Awesome图标并优化UI
refactor: 更新配置文件和密码设置 style: 统一按钮和表单元素的图标样式
This commit is contained in:
@@ -9,4 +9,8 @@ ErrorDocument 404 /error_pages/404.html
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^api(/.*)?$ api.php?action=$1 [QSA,L]
|
||||
RewriteRule ^api(/.*)?$ api.php?action=$1 [QSA,L]
|
||||
Header append X-Powered-By "LeonAPP Server"
|
||||
Header append X-System-Discription "LeonAPP Server System, a powerful APP store system."
|
||||
Header append X-System-Author "LeonMMcoset"
|
||||
Header append X-System-Email "leonmmcoset@outlook.com"
|
||||
|
||||
@@ -103,9 +103,16 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_app'])) {
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>添加应用</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>添加App - <?php echo APP_STORE_NAME; ?></title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<script src="/js/sweetalert.js"></script>
|
||||
</head>
|
||||
@@ -195,26 +202,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_app'])) {
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="name" name="name" required>
|
||||
<label for="name">App名称</label>
|
||||
<label for="name"><i class="fas fa-file-signature me-2"></i>App名称</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="tags" class="form-label">标签</label>
|
||||
<select id="tags" name="tags[]" multiple class="form-control">
|
||||
<?php
|
||||
$tagResult = $conn->query("SELECT id, name FROM tags");
|
||||
while ($tag = $tagResult->fetch_assoc()):
|
||||
?>
|
||||
<option value="<?php echo $tag['id']; ?>"><?php echo htmlspecialchars($tag['name']); ?></option>
|
||||
<?php endwhile; ?>
|
||||
</select>
|
||||
<small class="form-text text-muted">按住Ctrl键可选择多个标签</small>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<label for="description" class="form-label"><i class="fas fa-align-left me-2"></i>描述</label>
|
||||
<textarea class="form-control" id="description" name="description" rows="3" required></textarea>
|
||||
<label for="description">描述</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="age_rating" class="form-label">年龄分级</label>
|
||||
<label for="age_rating" class="form-label"><i class="fas fa-shield-alt me-2"></i>年龄分级</label>
|
||||
<select class="form-select" id="age_rating" name="age_rating" required>
|
||||
<option value="3+">3+</option>
|
||||
<option value="7+">7+</option>
|
||||
@@ -277,21 +272,21 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_app'])) {
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="version" name="version" required>
|
||||
<label for="version">版本号</label>
|
||||
<label for="version" class="form-label"><i class="fas fa-code-branch me-2"></i>版本号</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<textarea class="form-control" id="changelog" name="changelog" rows="3" required></textarea>
|
||||
<label for="changelog">更新日志</label>
|
||||
<label for="changelog" class="form-label"><i class="fas fa-history me-2"></i>更新日志</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control" type="file" id="app_file" name="app_file" required>
|
||||
<label for="app_file">App文件</label>
|
||||
<label for="app_file" class="form-label"><i class="fas fa-file-archive me-2"></i>App文件</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control" type="file" id="images" name="images[]" multiple>
|
||||
<label for="images">预览图片 (可多选)</label>
|
||||
<label for="images" class="form-label"><i class="fas fa-upload me-2"></i>预览图片 (可多选)</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="add_app">添加App</button>
|
||||
<button type="submit" name="add_app" class="btn btn-primary"><i class="fas fa-plus-circle me-2"></i>添加App</button>
|
||||
<a href="index.php" class="btn btn-secondary ms-2">取消</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -63,6 +63,8 @@ $result = $conn->query($sql);
|
||||
<title>公告管理 - <?php echo APP_STORE_NAME; ?></title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- SweetAlert2 CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
@@ -159,28 +161,28 @@ $result = $conn->query($sql);
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>发布公告</h2>
|
||||
<h2><i class="fas fa-bullhorn me-2"></i>发布公告</h2>
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label for="title" class="form-label">标题</label>
|
||||
<label for="title" class="form-label"><i class="fas fa-heading me-2"></i>标题</label>
|
||||
<input type="text" class="form-control" id="title" name="title" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="content" class="form-label">内容</label>
|
||||
<label for="content" class="form-label"><i class="fas fa-paragraph me-2"></i>内容</label>
|
||||
<textarea class="form-control" id="content" name="content" rows="4" required></textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">发布</button>
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-paper-plane me-2"></i>发布</button>
|
||||
</form>
|
||||
|
||||
<h2 class="mt-4">公告列表</h2>
|
||||
<h2 class="mt-4"><i class="fas fa-list-alt me-2"></i>公告列表</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>标题</th>
|
||||
<th>发布者</th>
|
||||
<th>发布时间</th>
|
||||
<th>操作</th>
|
||||
<th><i class="fas fa-id-card me-2"></i>ID</th>
|
||||
<th><i class="fas fa-heading me-2"></i>标题</th>
|
||||
<th><i class="fas fa-user me-2"></i>发布者</th>
|
||||
<th><i class="fas fa-clock me-2"></i>发布时间</th>
|
||||
<th><i class="fas fa-cog me-2"></i>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -191,7 +193,7 @@ $result = $conn->query($sql);
|
||||
<td><?php echo htmlspecialchars($row['username']); ?></td>
|
||||
<td><?php echo $row['created_at']; ?></td>
|
||||
<td>
|
||||
<button class="btn btn-danger btn-sm" onclick="confirmDelete(<?php echo $row['id']; ?>)">删除</button>
|
||||
<button class="btn btn-danger btn-sm" onclick="confirmDelete(<?php echo $row['id']; ?>)"><i class="fas fa-trash-alt me-1"></i>删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
|
||||
@@ -127,6 +127,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['edit_app'])) {
|
||||
<title>编辑App - <?php echo APP_STORE_NAME; ?></title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<script src="/js/sweetalert.js"></script>
|
||||
@@ -192,36 +194,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['edit_app'])) {
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="name" name="name" value="<?php echo htmlspecialchars($app['name']); ?>" required>
|
||||
<label for="name">App名称</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="tags" class="form-label">标签</label>
|
||||
<select id="tags" name="tags[]" multiple class="form-control">
|
||||
<?php
|
||||
$selectedTags = [];
|
||||
$tagQuery = $conn->prepare("SELECT tag_id FROM app_tags WHERE app_id = ?");
|
||||
$tagQuery->bind_param("i", $appId);
|
||||
$tagQuery->execute();
|
||||
$tagResult = $tagQuery->get_result();
|
||||
while ($tag = $tagResult->fetch_assoc()) {
|
||||
$selectedTags[] = $tag['tag_id'];
|
||||
}
|
||||
|
||||
$allTags = $conn->query("SELECT id, name FROM tags");
|
||||
while ($tag = $allTags->fetch_assoc()):
|
||||
$selected = in_array($tag['id'], $selectedTags) ? 'selected' : '';
|
||||
?>
|
||||
<option value="<?php echo $tag['id']; ?>" <?php echo $selected; ?>><?php echo htmlspecialchars($tag['name']); ?></option>
|
||||
<?php endwhile; ?>
|
||||
</select>
|
||||
<div class="form-text">按住Ctrl键可选择多个标签</div>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<textarea class="form-control" id="description" name="description" rows="3" required><?php echo htmlspecialchars($app['description']); ?></textarea>
|
||||
<label for="description">描述</label>
|
||||
<label for="name"><i class="fas fa-file-signature me-2"></i>App名称</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="age_rating" class="form-label">年龄分级</label>
|
||||
<label for="description" class="form-label"><i class="fas fa-align-left me-2"></i>描述</label>
|
||||
<textarea class="form-control" id="description" name="description" rows="3" required><?php echo htmlspecialchars($app['description']); ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="age_rating" class="form-label"><i class="fas fa-shield-alt me-2"></i>年龄分级</label>
|
||||
<select class="form-select" id="age_rating" name="age_rating" required>
|
||||
<option value="3+" <?php echo $app['age_rating'] === '3+' ? 'selected' : ''; ?>>3+</option>
|
||||
<option value="7+" <?php echo $app['age_rating'] === '7+' ? 'selected' : ''; ?>>7+</option>
|
||||
@@ -305,22 +285,22 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['edit_app'])) {
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="version" name="version" placeholder="如: 1.0.1">
|
||||
<label for="version">新版本号</label>
|
||||
<label for="version" class="form-label"><i class="fas fa-code-branch me-2"></i>版本号</label>
|
||||
<div class="form-text">仅在上传新安装包时填写</div>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<textarea class="form-control" id="changelog" name="changelog" rows="3" placeholder="描述本次更新内容"></textarea>
|
||||
<label for="changelog">更新日志</label>
|
||||
<label for="changelog" class="form-label"><i class="fas fa-history me-2"></i>更新日志</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="app_file" class="form-label">新App文件 (可选)</label>
|
||||
<input class="form-control" type="file" id="app_file" name="app_file">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="images" class="form-label">新增预览图片 (可选, 可多选)</label>
|
||||
<label for="images" class="form-label"><i class="fas fa-upload me-2"></i>预览图片 (可多选)</label>
|
||||
<input class="form-control" type="file" id="images" name="images[]" multiple>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="edit_app">更新App</button>
|
||||
<button type="submit" name="edit_app" class="btn btn-primary"><i class="fas fa-save me-2"></i>保存修改</button>
|
||||
<a href="index.php" class="btn btn-secondary ms-2">取消</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -64,6 +64,8 @@ if (!$resultApps) {
|
||||
<title>App管理 - <?php echo APP_STORE_NAME; ?></title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<script src="/js/sweetalert.js"></script>
|
||||
@@ -146,7 +148,7 @@ if (!$resultApps) {
|
||||
</script>
|
||||
<h2>App列表</h2>
|
||||
<div class="mb-3">
|
||||
<a href="manage_tags.php" class="btn btn-info">标签管理</a>
|
||||
<a href="manage_tags.php" class="btn btn-info"><i class="fas fa-tags me-2"></i>标签管理</a>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
@@ -166,8 +168,8 @@ if (!$resultApps) {
|
||||
<td><?php echo $app['age_rating']; ?></td>
|
||||
<td><?php echo $app['created_at']; ?></td>
|
||||
<td>
|
||||
<a href="editapp.php?id=<?php echo $app['id']; ?>" class="btn btn-sm btn-outline-primary">编辑</a>
|
||||
<a href="manage_versions.php?app_id=<?php echo $app['id']; ?>" class="btn btn-sm btn-outline-secondary">版本管理</a>
|
||||
<a href="editapp.php?id=<?php echo $app['id']; ?>" class="btn btn-sm btn-outline-primary"><i class="fas fa-edit me-1"></i>编辑</a>
|
||||
<a href="manage_versions.php?app_id=<?php echo $app['id']; ?>" class="btn btn-sm btn-outline-secondary"><i class="fas fa-code-branch me-1"></i>版本管理</a>
|
||||
<a href="deleteapp.php?id=<?php echo $app['id']; ?>" class="btn btn-sm btn-outline-danger" onclick="event.preventDefault(); Swal.fire({
|
||||
title: '确定要删除吗?',
|
||||
text: '删除后将无法恢复!',
|
||||
|
||||
@@ -61,6 +61,8 @@ if (!isset($_SESSION['admin'])) {
|
||||
<title>管理员登录 - <?php echo APP_STORE_NAME; ?></title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<!-- 顶栏样式 -->
|
||||
@@ -120,7 +122,7 @@ if (!isset($_SESSION['admin'])) {
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card blur-bg">
|
||||
<div class="card-header">管理员登录</div>
|
||||
<div class="card-header"><i class="fas fa-sign-in-alt me-2"></i>管理员登录</div>
|
||||
<div class="card-body">
|
||||
<!-- <?php if (isset($error)): ?>
|
||||
<script>
|
||||
@@ -134,19 +136,19 @@ if (!isset($_SESSION['admin'])) {
|
||||
<form method="post">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="username" name="username" required>
|
||||
<label for="username">用户名</label>
|
||||
<label for="username"><i class="fas fa-user me-2"></i>用户名</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
<label for="password">密码</label>
|
||||
<label for="password"><i class="fas fa-lock me-2"></i>密码</label>
|
||||
</div>
|
||||
<div class="form-check mb-3">
|
||||
<input class="form-check-input" type="checkbox" name="remember_me" id="remember_me">
|
||||
<label class="form-check-label" for="remember_me">
|
||||
自动登录
|
||||
<i class="fas fa-clock me-2"></i>自动登录
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">登录</button>
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-sign-in-alt me-2"></i>登录</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -202,6 +202,8 @@ if (!$stmt) {
|
||||
<title>管理开发者用户 - 应用商店管理</title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<!-- Fluent Design 模糊效果 -->
|
||||
@@ -245,7 +247,7 @@ if (!$stmt) {
|
||||
});
|
||||
</script>
|
||||
<div class="container">
|
||||
<h1>管理开发者用户</h1>
|
||||
<h1><i class="fas fa-users me-2"></i>管理开发者用户</h1>
|
||||
<pre>调试信息:
|
||||
查询SQL: <?php echo $sql; ?>
|
||||
查询结果行数: <?php echo $rowCount; ?>
|
||||
@@ -263,21 +265,21 @@ if (!$stmt) {
|
||||
<?php if ($editUser): ?>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h2>编辑开发者用户</h2>
|
||||
<h2><i class="fas fa-edit me-2"></i>编辑开发者用户</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" action="manage_developers.php">
|
||||
<input type="hidden" name="user_id" value="<?php echo $editUser['id']; ?>">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="username" name="username" value="<?php echo htmlspecialchars($editUser['username']); ?>" required>
|
||||
<label for="username">用户名</label>
|
||||
<label for="username"><i class="fas fa-user me-2"></i>用户名</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input type="email" class="form-control" id="email" name="email" value="<?php echo htmlspecialchars($editUser['email']); ?>" required>
|
||||
<label for="email">邮箱</label>
|
||||
<label for="email"><i class="fas fa-envelope me-2"></i>邮箱</label>
|
||||
</div>
|
||||
<button type="submit" name="update_user" class="btn btn-primary me-2">更新用户</button>
|
||||
<a href="manage_developers.php" class="btn btn-secondary">取消</a>
|
||||
<button type="submit" name="update_user" class="btn btn-primary me-2"><i class="fas fa-save me-2"></i>更新用户</button>
|
||||
<a href="manage_developers.php" class="btn btn-secondary"><i class="fas fa-times-circle me-2"></i>取消</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -286,11 +288,11 @@ if (!$stmt) {
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>用户名</th>
|
||||
<th>邮箱</th>
|
||||
<th>注册时间</th>
|
||||
<th>操作</th>
|
||||
<th><i class="fas fa-id-card me-2"></i>ID</th>
|
||||
<th><i class="fas fa-user me-2"></i>用户名</th>
|
||||
<th><i class="fas fa-envelope me-2"></i>邮箱</th>
|
||||
<th><i class="fas fa-clock me-2"></i>注册时间</th>
|
||||
<th><i class="fas fa-cog me-2"></i>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -301,10 +303,10 @@ if (!$stmt) {
|
||||
<td><?php echo htmlspecialchars($developer['email']); ?></td>
|
||||
<td><?php echo $developer['created_at']; ?></td>
|
||||
<td>
|
||||
<a href="manage_developers.php?edit=<?php echo $developer['id']; ?>" class="btn btn-sm btn-outline-primary">编辑</a>
|
||||
<a href="manage_developers.php?edit=<?php echo $developer['id']; ?>" class="btn btn-sm btn-outline-primary"><i class="fas fa-edit me-1"></i>编辑</a>
|
||||
<form method="post" action="manage_developers.php" style="display: inline-block;" onsubmit="return confirm('确定要删除这个用户吗?');">
|
||||
<input type="hidden" name="user_id" value="<?php echo $developer['id']; ?>">
|
||||
<button type="submit" name="delete_user" class="btn btn-sm btn-outline-danger">删除</button>
|
||||
<button type="submit" name="delete_user" class="btn btn-sm btn-outline-danger"><i class="fas fa-trash-alt me-1"></i>删除</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -67,6 +67,8 @@ $tagsResult = $conn->query("SELECT * FROM tags ORDER BY created_at DESC");
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>标签管理 - 应用商店后台</title>
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<script src="/js/sweetalert.js"></script>
|
||||
<script>
|
||||
@@ -88,7 +90,7 @@ $tagsResult = $conn->query("SELECT * FROM tags ORDER BY created_at DESC");
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<h1 class="mb-4">标签管理</h1>
|
||||
<a href="index.php" class="btn btn-secondary mb-3">返回应用列表</a>
|
||||
<a href="index.php" class="btn btn-secondary mb-3"><i class="fas fa-arrow-left me-2"></i>返回应用列表</a>
|
||||
|
||||
<?php if (isset($_GET['success'])): ?>
|
||||
<div class="alert alert-success"><?php echo $_GET['success']; ?></div>
|
||||
@@ -100,15 +102,15 @@ $tagsResult = $conn->query("SELECT * FROM tags ORDER BY created_at DESC");
|
||||
<!-- 添加标签表单 -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">添加新标签</h5>
|
||||
<h5 class="mb-0"><i class="fas fa-plus-circle me-2"></i>添加新标签</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="tag_name" name="tag_name" required>
|
||||
<label for="tag_name">标签名称</label>
|
||||
<label for="tag_name"><i class="fas fa-tag me-2"></i>标签名称</label>
|
||||
</div>
|
||||
<button type="submit" name="add_tag" class="btn btn-primary">添加标签</button>
|
||||
<button type="submit" name="add_tag" class="btn btn-primary"><i class="fas fa-save me-2"></i>添加标签</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -116,7 +118,7 @@ $tagsResult = $conn->query("SELECT * FROM tags ORDER BY created_at DESC");
|
||||
<!-- 标签列表 -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">现有标签</h5>
|
||||
<h5 class="mb-0"><i class="fas fa-list me-2"></i>现有标签</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped">
|
||||
@@ -137,9 +139,9 @@ $tagsResult = $conn->query("SELECT * FROM tags ORDER BY created_at DESC");
|
||||
<td>
|
||||
<!-- 编辑按钮触发模态框 -->
|
||||
<button type="button" class="btn btn-sm btn-outline-primary" data-bs-toggle="modal" data-bs-target="#editModal<?php echo $tag['id']; ?>">
|
||||
编辑
|
||||
<i class="fas fa-edit me-1"></i>编辑
|
||||
</button>
|
||||
<a href="manage_tags.php?delete=<?php echo $tag['id']; ?>" class="btn btn-sm btn-outline-danger" onclick="return confirm('确定要删除这个标签吗?关联的应用标签也会被删除。');">删除</a>
|
||||
<a href="manage_tags.php?delete=<?php echo $tag['id']; ?>" class="btn btn-sm btn-outline-danger" onclick="return confirm('确定要删除这个标签吗?关联的应用标签也会被删除。');"><i class="fas fa-trash-alt me-1"></i>删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -148,7 +150,7 @@ $tagsResult = $conn->query("SELECT * FROM tags ORDER BY created_at DESC");
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">编辑标签</h5>
|
||||
<h5 class="modal-title"><i class="fas fa-edit me-2"></i>编辑标签</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -156,11 +158,11 @@ $tagsResult = $conn->query("SELECT * FROM tags ORDER BY created_at DESC");
|
||||
<input type="hidden" name="tag_id" value="<?php echo $tag['id']; ?>">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="edit_tag_name<?php echo $tag['id']; ?>" name="tag_name" value="<?php echo htmlspecialchars($tag['name']); ?>" required>
|
||||
<label for="edit_tag_name<?php echo $tag['id']; ?>">标签名称</label>
|
||||
<label for="edit_tag_name<?php echo $tag['id']; ?>"><i class="fas fa-tag me-2"></i>标签名称</label>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
|
||||
<button type="submit" name="edit_tag" class="btn btn-primary">保存修改</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><i class="fas fa-times-circle me-2"></i>取消</button>
|
||||
<button type="submit" name="edit_tag" class="btn btn-primary"><i class="fas fa-save me-2"></i>保存修改</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -188,6 +188,8 @@ if (isset($_GET['success'])) {
|
||||
<title>管理版本 - <?php echo htmlspecialchars($app['name']); ?></title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<style>
|
||||
@@ -236,12 +238,12 @@ if (isset($_GET['success'])) {
|
||||
<div class="container mt-4">
|
||||
<div class="row mb-4">
|
||||
<div class="col">
|
||||
<h1>管理版本: <?php echo htmlspecialchars($app['name']); ?></h1>
|
||||
<h1><i class="fas fa-code-branch me-2"></i>管理版本: <?php echo htmlspecialchars($app['name']); ?></h1>
|
||||
<p class="text-muted">管理该应用的所有版本</p>
|
||||
</div>
|
||||
<div class="col text-end">
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addVersionModal">
|
||||
添加新版本
|
||||
<i class="fas fa-plus-circle me-2"></i>添加新版本
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -263,7 +265,7 @@ if (isset($_GET['success'])) {
|
||||
<div class="col-md-6 col-lg-4 mb-4">
|
||||
<div class="card version-card h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">版本 <?php echo htmlspecialchars($version['version']); ?></h5>
|
||||
<h5 class="card-title"><i class="fas fa-tag me-2"></i>版本 <?php echo htmlspecialchars($version['version']); ?></h5>
|
||||
<h6 class="card-subtitle mb-2 text-muted">发布日期: <?php echo date('Y-m-d H:i', strtotime($version['created_at'])); ?></h6>
|
||||
<p class="card-text"><?php echo nl2br(htmlspecialchars($version['changelog'])); ?></p>
|
||||
</div>
|
||||
@@ -286,7 +288,7 @@ if (isset($_GET['success'])) {
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="editVersionModalLabel">编辑版本 <?php echo htmlspecialchars($version['version']); ?></h5>
|
||||
<h5 class="modal-title" id="editVersionModalLabel"><i class="fas fa-edit me-2"></i>编辑版本 <?php echo htmlspecialchars($version['version']); ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
@@ -294,14 +296,14 @@ if (isset($_GET['success'])) {
|
||||
<input type="hidden" name="version_id" value="<?php echo $version['id']; ?>">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="version_<?php echo $version['id']; ?>" name="version" value="<?php echo htmlspecialchars($version['version']); ?>" placeholder="如: 1.0.0" required>
|
||||
<label for="version_<?php echo $version['id']; ?>">版本号</label>
|
||||
<label for="version_<?php echo $version['id']; ?>"><i class="fas fa-hashtag me-2"></i>版本号</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<textarea class="form-control" id="changelog_<?php echo $version['id']; ?>" name="changelog" rows="3" placeholder="描述本次更新内容" required><?php echo htmlspecialchars($version['changelog']); ?></textarea>
|
||||
<label for="changelog_<?php echo $version['id']; ?>">更新日志</label>
|
||||
<label for="changelog_<?php echo $version['id']; ?>"><i class="fas fa-history me-2"></i>更新日志</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="new_app_file_<?php echo $version['id']; ?>" class="form-label">更新App文件 (可选)</label>
|
||||
<label for="new_app_file_<?php echo $version['id']; ?>" class="form-label"><i class="fas fa-upload me-2"></i>更新App文件 (可选)</label>
|
||||
<input class="form-control" type="file" id="new_app_file_<?php echo $version['id']; ?>" name="new_app_file">
|
||||
<div class="form-text">当前文件: <?php echo basename($version['file_path']); ?></div>
|
||||
</div>
|
||||
@@ -324,21 +326,21 @@ if (isset($_GET['success'])) {
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addVersionModalLabel">添加新版本</h5>
|
||||
<h5 class="modal-title" id="addVersionModalLabel"><i class="fas fa-plus-circle me-2"></i>添加新版本</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
<div class="form-floating mb-3">
|
||||
<input type="text" class="form-control" id="version" name="version" placeholder="如: 1.0.0" required>
|
||||
<label for="version">版本号</label>
|
||||
<label for="version"><i class="fas fa-hashtag me-2"></i>版本号</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<textarea class="form-control" id="changelog" name="changelog" rows="3" placeholder="描述本次更新内容" required></textarea>
|
||||
<label for="changelog">更新日志</label>
|
||||
<label for="changelog"><i class="fas fa-history me-2"></i>更新日志</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="app_file" class="form-label">App文件</label>
|
||||
<label for="app_file" class="form-label"><i class="fas fa-upload me-2"></i>App文件</label>
|
||||
<input class="form-control" type="file" id="app_file" name="app_file" required>
|
||||
<a href="<?php echo htmlspecialchars($version['file_path']); ?>" class="btn btn-sm btn-primary" download>下载</a>
|
||||
</div>
|
||||
|
||||
@@ -139,6 +139,8 @@ if (!($conn instanceof mysqli)) {
|
||||
<title>应用审核 - <?php echo APP_STORE_NAME; ?></title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<!-- SweetAlert2 CSS -->
|
||||
<link rel="stylesheet" href="/js/sweetalert.js/dist/sweetalert2.min.css">
|
||||
<!-- 自定义CSS -->
|
||||
@@ -187,7 +189,7 @@ if (!($conn instanceof mysqli)) {
|
||||
|
||||
<div class="container mt-4">
|
||||
<div class="alert alert-info">
|
||||
请遵循应用商店的<a href="/docs/app_review_standards.php" target="_blank">审核规则</a>,确保应用符合平台要求。
|
||||
请遵循应用商店的<a href="/docs/app_review_standards.php" target="_blank"><i class="fas fa-external-link-alt me-1"></i>审核规则</a>,确保应用符合平台要求。
|
||||
</div>
|
||||
<?php if (!empty($success)): ?>
|
||||
<div class="alert alert-success"><?php echo $success; ?></div>
|
||||
@@ -196,8 +198,8 @@ if (!($conn instanceof mysqli)) {
|
||||
<div class="alert alert-danger"><?php echo $error; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>应用审核</h2>
|
||||
<p class="text-muted">待审核应用: <?php echo count($pendingApps); ?></p>
|
||||
<h2><i class="fas fa-check-circle me-2"></i>应用审核</h2>
|
||||
<p class="text-muted"><i class="fas fa-clock me-1"></i>待审核应用: <?php echo count($pendingApps); ?></p>
|
||||
|
||||
<?php if (empty($pendingApps)): ?>
|
||||
<div class="alert alert-info">没有待审核的应用</div>
|
||||
@@ -277,8 +279,8 @@ if (!($conn instanceof mysqli)) {
|
||||
<form method="post" class="mt-3">
|
||||
<input type="hidden" name="app_id" value="<?php echo $app['id']; ?>">
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" name="review_action" value="approve" class="btn btn-success flex-grow-1">通过</button>
|
||||
<button type="button" class="btn btn-danger flex-grow-1" onclick="showRejectReason(<?php echo $app['id']; ?>, '<?php echo addslashes(htmlspecialchars($app['name'])); ?>')">拒绝</button>
|
||||
<button type="submit" name="review_action" value="approve" class="btn btn-success me-2"><i class="fas fa-check me-1"></i>通过</button>
|
||||
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#rejectModal<?php echo $app['id']; ?>"><i class="fas fa-times me-1"></i>拒绝</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -104,6 +104,8 @@
|
||||
<title>系统信息 - 上传文件列表</title>
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<!-- 自定义CSS -->
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
@@ -132,13 +134,13 @@
|
||||
|
||||
<div class="container mt-4">
|
||||
<form method="post">
|
||||
<h2>上传文件信息</h2>
|
||||
<h2><i class="fas fa-file-alt me-2"></i>上传文件信息</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="selectAll"></th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th><i class="fas fa-file-name me-2"></i>文件名</th>
|
||||
<th><i class="fas fa-database me-2"></i>大小</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -154,13 +156,13 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>上传图片信息</h2>
|
||||
<h2><i class="fas fa-image me-2"></i>上传图片信息</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="selectAllImages"></th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th><i class="fas fa-file-image me-2"></i>文件名</th>
|
||||
<th><i class="fas fa-database me-2"></i>大小</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -175,8 +177,8 @@
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="submit" name="delete_all" class="btn btn-danger" onclick="return confirm('确定要删除所有文件吗?')">全量删除</button>
|
||||
<button type="submit" class="btn btn-danger ms-2" onclick="return confirm('确定要删除选中的文件吗?')">删除选中</button>
|
||||
<button type="submit" name="delete_all" class="btn btn-danger" onclick="return confirm('确定要删除所有文件吗?')"><i class="fas fa-trash-alt me-2"></i>全量删除</button>
|
||||
<button type="submit" class="btn btn-danger ms-2" onclick="return confirm('确定要删除选中的文件吗?')"><i class="fas fa-trash-alt me-2"></i>删除选中</button>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
22
app.php
22
app.php
@@ -196,7 +196,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
<div class="col-md-6">
|
||||
<h1><i class="fas fa-box-open"></i> <?php echo $app['name']; ?></h1>
|
||||
<p class="lead"><i class="fas fa-info-circle"></i> <?php echo $app['description']; ?></p>
|
||||
<p>年龄分级:
|
||||
<p><i class="fas fa-shield-alt"></i> 年龄分级:
|
||||
<?php
|
||||
$svgHeader = '<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><defs><filter id="shadow"><feGaussianBlur in="SourceAlpha" stdDeviation="2"/><feOffset dx="0" dy="2" result="offsetblur"/><feFlood flood-color="rgba(0,0,0,0.2)"/><feComposite in2="offsetblur" operator="in"/><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs>';
|
||||
$esrbIcons = [
|
||||
@@ -214,7 +214,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
<p><?php echo nl2br(htmlspecialchars($app['age_rating_description'])); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<p>适用平台: <?php
|
||||
<p><i class="fas fa-laptop"></i> 适用平台: <?php
|
||||
$platforms = json_decode($app['platforms'], true) ?? [];
|
||||
$platformIcons = [
|
||||
'windows' => '<i class="fab fa-windows"></i>',
|
||||
@@ -247,7 +247,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
}
|
||||
echo implode(', ', $platformTexts);
|
||||
?></p>
|
||||
<p>评分: <?php echo round($app['avg_rating'], 1); ?>/5</p>
|
||||
<p><i class="fas fa-star"></i> 评分: <?php echo round($app['avg_rating'], 1); ?>/5</p>
|
||||
<p>开发者: <?php if ($developerId == 0 || empty($developerName)): ?>管理员<?php else: ?><a href="developer_apps.php?id=<?php echo $developerId; ?>"><?php echo htmlspecialchars($developerName); ?></a><?php endif; ?></p>
|
||||
|
||||
<?php
|
||||
@@ -262,7 +262,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
$tags[] = $tag['name'];
|
||||
}
|
||||
if (!empty($tags)): ?>
|
||||
<p>标签: <?php echo implode(', ', $tags); ?></p>
|
||||
<p><i class="fas fa-tags"></i> 标签: <?php echo implode(', ', $tags); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -297,10 +297,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
<?php while ($version = $resultVersions->fetch_assoc()): ?>
|
||||
<div class="card mb-3 blur-bg">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">版本 <?php echo $version['version']; ?></h5>
|
||||
<h5 class="card-title"><i class="fas fa-code-branch"></i> 版本 <?php echo $version['version']; ?></h5>
|
||||
<p class="card-text"><?php echo $version['changelog']; ?></p>
|
||||
<a href="<?php echo htmlspecialchars($version['file_path']); ?>" class="btn btn-primary btn-lg" download>立即下载</a>
|
||||
<a href="version_list.php?id=<?php echo $app['id']; ?>" class="btn btn-outline-secondary">查看版本历史</a>
|
||||
<a href="<?php echo htmlspecialchars($version['file_path']); ?>" class="btn btn-primary btn-lg" download><i class="fas fa-download"></i> 立即下载</a>
|
||||
<a href="version_list.php?id=<?php echo $app['id']; ?>" class="btn btn-outline-secondary"><i class="fas fa-history"></i> 查看版本历史</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
@@ -309,10 +309,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-6">
|
||||
<h2>提交评价</h2>
|
||||
<h2><i class="fas fa-comments"></i> 评价</h2>
|
||||
<form method="post" action="">
|
||||
<div class="mb-3">
|
||||
<label for="rating" class="form-label">评分</label>
|
||||
<label for="rating" class="form-label"><i class="fas fa-star"></i> 评分</label>
|
||||
<select class="form-select" id="rating" name="rating" required>
|
||||
<option value="1">1星</option>
|
||||
<option value="2">2星</option>
|
||||
@@ -321,7 +321,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
<option value="5">5星</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">提交评价</button>
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-paper-plane"></i> 提交评价</button>
|
||||
</form>
|
||||
<h2>评价</h2>
|
||||
<div id="reviews-container">
|
||||
@@ -342,7 +342,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rating'])) {
|
||||
}
|
||||
echo '</p>';
|
||||
?>
|
||||
<p class="card-text"><small class="text-muted">评价时间: <?php echo $review['created_at']; ?></small></p>
|
||||
<p class="card-text"><i class="fas fa-clock"></i> <small class="text-muted">评价时间: <?php echo $review['created_at']; ?></small></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
Reference in New Issue
Block a user