* 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('video')} WHERE id = ? AND status = 1 LIMIT 1", [intval($id)]) : null);
if (empty($row)) {
echo 'Video not found';
return;
}
$currentChannel = !empty($row['channel_id']) ? k607_channel_by_id($db, intval($row['channel_id'])) : null;
$pageTitle = (string) ($row['title'] ?? '视频详情');
$videoUrl = trim((string) ($row['video_path'] ?? ''));
$poster = trim((string) ($row['video_cover'] ?? ''));
if ($poster === '') {
$poster = trim((string) ($row['litpic'] ?? ''));
}
$heroImage = k607_channel_hero_image($currentChannel, $poster !== '' ? $poster : (!empty($slides[0]['litpic']) ? $slides[0]['litpic'] : ''));
require_once __DIR__ . '/_header.php';
?>