if (!Calendar::can_view()) { error(404); } if ($_GET['id']) { $Event = Calendar::get_event($_GET['id']); } else { $Year = $_GET['year']; $Month = $_GET['month']; $Day = $_GET['day']; if (10 > $Month) { $Month = "0" . $Month; } if (10 > $Day) { $Day = "0" . $Day; } $StartDate = $EndDate = $Year . "-" . $Month . "-" . $Day; } ?>