_/___.' >'"". // // | | : `- \`.;`\ _ /`;.`/ - ` : | | // // \ \ `-. \_ __\ /__ _/ .-` / / // // ========`-.____`-.___\_____/___.-`____.-'======== // // `=---=' // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // 佛祖保佑 永不宕机 永无BUG // //////////////////////////////////////////////////////////////////// session_start(); require_once 'config.php'; if (!isset($conn) || !$conn instanceof mysqli) { die('数据库连接失败,请检查配置文件。'); }?> <?php echo APP_STORE_NAME; ?> query($announcementQuery); $announcement = $announcementResult && $announcementResult->num_rows > 0 ? $announcementResult->fetch_assoc() : null; ?>

发布时间:

查看所有历史公告

= 1073741824) { return round($bytes / 1073741824, 2) . ' GB'; } elseif ($bytes >= 1048576) { return round($bytes / 1048576, 2) . ' MB'; } elseif ($bytes >= 1024) { return round($bytes / 1024, 2) . ' KB'; } else { return $bytes . ' B'; } } // 计算网站占用量 function getDirectorySize($dir) { $size = 0; try { $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)); foreach ($iterator as $file) { try { if ($file->isFile()) { $size += $file->getSize(); } } catch (RuntimeException $e) { // 跳过无法访问的文件(由于open_basedir限制) continue; } } } catch (RuntimeException $e) { // 处理目录访问错误 error_log('无法访问目录: ' . $e->getMessage()); } return $size; } $websiteSpace = getDirectorySize(__DIR__); $websiteUsagePercent = round(($websiteSpace / $totalSpace) * 100, 2); ?>
磁盘使用情况 /
%

网站使用情况 /
%

为你推荐

prepare($tagSql); $tagStmt->bind_param('i', $userId); $tagStmt->execute(); $tagResult = $tagStmt->get_result(); $tagIds = []; while ($tag = $tagResult->fetch_assoc()) { $tagIds[] = $tag['id']; } $tagStmt->close(); // 获取用户已下载的应用 $downloadedSql = "SELECT DISTINCT a.id FROM apps a JOIN app_versions av ON a.id = av.app_id JOIN download_history dh ON av.id = dh.version_id WHERE dh.user_id = ?"; $downloadedStmt = $conn->prepare($downloadedSql); $downloadedStmt->bind_param('i', $userId); $downloadedStmt->execute(); $downloadedResult = $downloadedStmt->get_result(); $downloadedIds = []; while ($app = $downloadedResult->fetch_assoc()) { $downloadedIds[] = $app['id']; } $downloadedStmt->close(); // 基于标签推荐应用 if (!empty($tagIds)) { $placeholders = implode(',', array_fill(0, count($tagIds), '?')); $recommendSql = "SELECT a.id, a.name, a.description, a.age_rating, a.platforms, AVG(r.rating) as avg_rating FROM apps a LEFT JOIN reviews r ON a.id = r.app_id JOIN app_tags at ON a.id = at.app_id WHERE at.tag_id IN ($placeholders) AND a.id NOT IN (" . (!empty($downloadedIds) ? implode(',', $downloadedIds) : '0') . ") AND a.status = 'approved' GROUP BY a.id ORDER BY COUNT(at.tag_id) DESC LIMIT 12"; $recommendStmt = $conn->prepare($recommendSql); $types = str_repeat('i', count($tagIds)); $recommendStmt->bind_param($types, ...$tagIds); $recommendStmt->execute(); $recommendResult = $recommendStmt->get_result(); } else { // 如果没有标签数据,显示热门应用 $recommendSql = "SELECT a.id, a.name, a.description, a.age_rating, AVG(r.rating) as avg_rating, SUM(av.download_count) as total_downloads FROM apps a LEFT JOIN reviews r ON a.id = r.app_id LEFT JOIN app_versions av ON a.id = av.app_id WHERE a.status = 'approved' GROUP BY a.id ORDER BY total_downloads DESC LIMIT 12"; $recommendResult = $conn->query($recommendSql); } if ($recommendResult && $recommendResult->num_rows > 0) { while ($row = $recommendResult->fetch_assoc()) { echo '
'; echo '
'; echo '
'; echo '
'. htmlspecialchars($row['name']) . '
'; echo '

'. substr(htmlspecialchars($row['description']), 0, 100) . '...

'; // 获取应用标签 $tagSql = "SELECT t.name FROM tags t JOIN app_tags at ON t.id = at.tag_id WHERE at.app_id = ?"; $tagStmt = $conn->prepare($tagSql); $tagStmt->bind_param('i', $row['id']); $tagStmt->execute(); $tagResult = $tagStmt->get_result(); $tags = []; while ($tag = $tagResult->fetch_assoc()) { $tags[] = htmlspecialchars($tag['name']); } $tagStmt->close(); // 获取应用适用平台 $platforms = json_decode($row['platforms'], true); if (!is_array($platforms)) $platforms = []; echo '

标签: '. implode(', ', $tags) . '

'; echo '

平台: '. implode(', ', $platforms) . '

'; echo '

评分: '. round($row['avg_rating'] ?? 0, 1) . '/5

'; echo '查看详情'; echo '
'; } } else { echo '

暂无推荐内容

'; } if (isset($recommendStmt)) $recommendStmt->close(); ?>

应用列表

prepare($sql); if (!$stmt) { die('预处理语句失败: ' . $conn->error); } call_user_func_array([$stmt, 'bind_param'], array_merge([$paramTypes], $params)); if (!$stmt->execute()) { die('执行语句失败: ' . $stmt->error); } $result = $stmt->get_result(); } else { $result = $conn->query($sql); if (!$result) { die('查询失败: ' . $conn->error); } } if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo '
'; echo '
'; echo '
'; echo '
'. $row['name'] . '
'; echo '

'. substr($row['description'], 0, 100) . '...

'; // 获取应用标签 $tagSql = "SELECT t.name FROM tags t JOIN app_tags at ON t.id = at.tag_id WHERE at.app_id = ?"; $tagStmt = $conn->prepare($tagSql); $tagStmt->bind_param('i', $row['id']); $tagStmt->execute(); $tagResult = $tagStmt->get_result(); $tags = []; while ($tag = $tagResult->fetch_assoc()) { $tags[] = htmlspecialchars($tag['name']); } $tagStmt->close(); // 获取应用适用平台 $platforms = json_decode($row['platforms'], true); if (!is_array($platforms)) $platforms = []; echo '

标签: '. implode(', ', $tags) . '

'; echo '

平台: '. implode(', ', $platforms) . '

'; echo '

评分: '. round($row['avg_rating'], 1) . '/5

'; echo '查看详情'; echo '
'; echo '
'; echo '
'; } } ?>