echo '<td><button type=submit name=action value=update_schedule>Update Schedule</button></td>'; echo '</tr></table>'; echo '</form>'; if (isset($_POST['action'])) { if ($_SESSION['login'] != 'root' && substr($_SESSION['login'], 0, 3) != 'Dr.') { echo '<h2><font color=red>Please instruct appropriate person for pending work. Thank you</font></h2>'; } else { if ($_POST['action'] == 'delete_reminder') { delete_cron($_POST['id']); view_pending_cron(); } if ($_POST['action'] == 'show_schedule') { show_schedule(); } if ($_POST['action'] == 'delete_schedule') { delete_schedule($_POST['id']); update_schedule(); show_schedule(); } if ($_POST['action'] == 'update_schedule') { update_schedule(); show_schedule(); } if ($_POST['action'] == 'new_schedule') { new_schedule(); } if ($_POST['action'] == 'save_new_schedule') { save_new_schedule($_POST); update_schedule(); } if ($_POST['action'] == 'day' || $_POST['action'] == 'hour' || $_POST['action'] == 'week' || $_POST['action'] == 'month' || $_POST['action'] == 'year') {
$page_file = "schedule_delete.php"; $page_title = "Delete a Schedule"; require "functions/main_fns.php"; require "functions/schedule_fns.php"; require "partials/_header.php"; $id = $_GET['id']; if (!$_SESSION["logged_in"]) { login_prompt($_POST[username], $_POST[remember_me], $_SESSION["error"]); } else { /*----- CONTENT ------*/ ?> <div class="row"> <div class="tweleve columns content full-width"> <h1>Delete a Schedule</h1> <?php if (!$id) { echo '<div class="top-spacer_20 center error">Error - missing ID value</div>'; } else { delete_schedule($id); } ?> <div class="top-spacer_20"> <a href="schedule_view_all.php">View all Schedules</a> <p> <a href="cp.php">Control Panel</a> </div> </div> </div> <!-- end of row div --> <?php } require "partials/_footer.php";