prepare('SELECT id, name FROM shows WHERE id = ?'); $stmt->execute([(int)($_POST['show_id'] ?? 0)]); $show = $stmt->fetch(); if (!$show) { flash('Please choose a show.', 'error'); } elseif (setBroadcastShow($db, (int)$show['id']) === 'live') { flash("The live broadcast is now {$show['name']}."); } else { flash("{$show['name']} is queued. It will go live as soon as the stream starts."); } } elseif ($action === 'clear_queue') { clearQueuedShow($db); flash('The queued show has been cleared.'); } header('Location: index.php'); exit; } $live = liveBroadcast($db); $current = currentShow($db); $shows = $db->query('SELECT id, name FROM shows ORDER BY name')->fetchAll(); adminHeader('Dashboard', $admin); ?>
Live now= $current ? ': ' . e($current['name']) : ' (no show set)' ?>, since = e($live['started_at']) ?> UTC. Offline. = e($current['name']) ?> is queued for the next broadcast. Offline. No show is queued.
= $live ? 'Switch which show the live page and recently played list belong to.' : 'Choose the show before you start streaming. The broadcast goes live on the site automatically when the stream comes online.' ?>