* Date: 2026-6-1 */ $page = isset($_GET['page']) ? max(1, intval($_GET['page'])) : 1; $pageSize = 12; $offset = ($page - 1) * $pageSize; $channelId = isset($_GET['id']) ? intval($_GET['id']) : 0; $channel = $db->fetch("SELECT * FROM {$db->table('channel')} WHERE id = ? AND channel_type = 2", [$channelId]); if(empty($channel)) { header('Location: /'); exit; } $totalRow = $db->fetch("SELECT COUNT(*) as cnt FROM {$db->table('product')} WHERE channel_id = ? AND status = 1", [$channelId]); $total = $totalRow ? intval($totalRow['cnt']) : 0; $products = $db->fetchAll("SELECT * FROM {$db->table('product')} WHERE channel_id = ? AND status = 1 ORDER BY create_time DESC LIMIT ? OFFSET ?", [$channelId, $pageSize, $offset]); $totalPages = $total > 0 ? ceil($total / $pageSize) : 1; ?> <?php echo htmlspecialchars($channel['channel_name']); ?> - <?php echo htmlspecialchars($site['site_name']); ?>

1): ?>