fix: 修复管理员密码为空及添加平台选择提示

修复config.php中管理员密码为空的安全问题,并设置不同权限
在upload_app.php中添加平台选择提示信息以避免混淆
在review_apps.php中优化开发者信息显示逻辑
This commit is contained in:
2025-07-16 18:48:42 +08:00
parent 0f6020c647
commit 64d19a40bd
2 changed files with 6 additions and 2 deletions

View File

@@ -117,8 +117,9 @@ if (!($conn instanceof mysqli)) {
log_error('数据库连接错误: 连接不是MySQLi实例', __FILE__, __LINE__);
$error = '数据库连接错误,请检查配置';
} else {
$stmt = $conn->prepare("SELECT a.id, a.name, a.description, a.status, a.created_at
$stmt = $conn->prepare("SELECT a.id, a.name, a.description, a.status, a.created_at, d.username
FROM apps a
LEFT JOIN developers d ON a.developer_id = d.id
WHERE a.status = 'pending'
ORDER BY a.created_at DESC");
if (!$stmt) {
@@ -252,7 +253,7 @@ if (!($conn instanceof mysqli)) {
<?php if (!empty($tagString)): ?>
<p class="card-text"><strong>标签:</strong> <?php echo htmlspecialchars($tagString); ?></p>
<?php endif; ?>
<p class="card-text"><strong>开发者:</strong> <?php echo htmlspecialchars($app['username']); ?></p>
<p class="card-text"><strong>开发者:</strong> <?php echo htmlspecialchars($app['username'] ?? '管理员'); ?></p>
<p class="card-text"><strong>提交时间:</strong> <?php echo htmlspecialchars($app['created_at']); ?></p>
<p class="card-text"><strong>描述:</strong> <?php echo nl2br(htmlspecialchars($app['description'])); ?></p>