* Date: 2026-5-20
*/
if (!defined('ROOT_PATH')) { exit('Access Denied'); }
require_once __DIR__ . '/_functions.php';
$row = !empty($row) ? $row : (!empty($id) ? $db->fetch("SELECT * FROM {$db->table('download')} WHERE id = ? AND status = 1 LIMIT 1", [intval($id)]) : null);
if (empty($row)) {
echo 'Download not found';
return;
}
$currentChannel = !empty($row['channel_id']) ? k607_channel_by_id($db, intval($row['channel_id'])) : null;
$pageTitle = (string) ($row['title'] ?? '下载详情');
$heroImage = k607_channel_hero_image($currentChannel, !empty($row['litpic']) ? $row['litpic'] : (!empty($slides[0]['litpic']) ? $slides[0]['litpic'] : ''));
$fileUrl = trim((string) ($row['file_path'] ?? ''));
require_once __DIR__ . '/_header.php';
?>