11) $sm_idx = 11; $em_idx = $end_month - 1; if($em_idx < 0) $em_idx = 0; if($em_idx > 11) $em_idx = 11; $start_name = $monthNames[$sm_idx]; $end_name = $monthNames[$em_idx]; if ($start_month === $end_month) { $period_title = "Month $start_name $year"; } else { $period_title = "Months $start_name - $end_name $year"; } $stmt = $pdo->prepare("SELECT * FROM schedule WHERE (YEAR(date) = :y AND MONTH(date) >= :sm AND MONTH(date) <= :em) ORDER BY date ASC"); $stmt->execute(['y' => $year, 'sm' => $start_month, 'em' => $end_month]); $data = $stmt->fetchAll(); if ($format === 'excel') { header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=Schedule_Export_$year.xls"); } ?> Export Schedule Data

Schedule Data (Activities)

Period:

Export Data Activity Description Room

0): foreach($data as $row): $dt = new DateTime($row['date']); ?>
No Date Time Activity
format('d M Y') ?> format('H:i') ?>
No activity data for this period.