Content & Operations
isset($_POST['is_active']) ? 1 : 0, 'type' => $_POST['type'] ?? 'holiday', 'headline' => $_POST['headline'] ?? '', 'message' => $_POST['message'] ?? '', 'start_date' => $_POST['start_date'] ?? null, 'end_date' => $_POST['end_date'] ?? null, 'show_banner' => isset($_POST['show_banner']) ? 1 : 0, 'show_in_hours' => isset($_POST['show_in_hours']) ? 1 : 0, ], $annId); $successMsg = 'Announcement updated successfully!'; } } // Fetch current announcement (or default empty template) $announcement = get_active_announcement(); if (!$announcement) { $stmt = $pdo->query("SELECT * FROM announcements ORDER BY id DESC LIMIT 1"); $announcement = $stmt->fetch() ?: [ 'id' => 0, 'is_active' => 0, 'type' => 'holiday', 'headline' => 'Holiday Closure', 'message' => 'The Old Fitz will be closed for the holiday weekend.', 'start_date' => '', 'end_date' => '', 'show_banner' => 1, 'show_in_hours' => 1 ]; } ?>
Content & Operations