<?php require_once "../includes/config.php"; require_once "../classes/Event.php"; if ($_SESSION['user_id'] != "UIC-000") { header("Location: ../"); exit; } if (isset($_POST['Event_ID'])) { $Event = new Event($_POST['Event_ID']); $Event->deleteEvent(); } ?> <!DOCTYPE html> <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class=""> <!--<![endif]--> <head> <title>Events</title> <meta charset="utf-8"> <base href="<?php echo BASE_URL; ?> "> <link rel="shortcut icon" href="img/titleicon.png" /> <meta name="viewport" content="width=device-width, initial-scale=1">
exit; } else { exit('ERROR: Could not delete the project.'); } exit; } else { exit('ERROR: You are not authorized to delete projects.'); } } else { if (isset($_GET['action']) && $_GET['action'] == 'event_delete') { //check if logged in and logged in as admin or editor before deleting if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == 1) { //instantiate the Project class $event = new Event(); //Delete the post and return to the entry if ($event->deleteEvent($_GET['id'])) { header('Location:../events.php'); exit; } else { exit('ERROR: Could not delete the event.'); } exit; } else { exit('ERROR: You are not authorized to delete events.'); } } else { if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['logout_submit'])) { //unset all login session variables if (isset($_SESSION['loggedin'])) { unset($_SESSION['loggedin']); }
break; case "send": $data['Title'] = $_POST['Title']; $data['Location'] = $_POST['Location']; $data['Start_Date'] = $_POST['Start_Date']; $data['End_Date'] = $_POST['End_Date']; $manufacturers = $_POST['manufacturer']; $data['Location'] = $_POST['Location']; $data['Service'] = $_POST['service']; $data['Sales'] = $_POST['sales']; $data['Link'] = $_POST['Link']; return Event::createEvent($data, $manufacturers); break; case "delete": $id = $_POST['id']; return Event::deleteEvent($id); break; case "saveChange": $id = $_POST['id']; $field = $_POST['field']; $value = addslashes($_POST['value']); Event::saveChange($id, $field, $value); break; case "saveClient": $id = $_POST['id']; $field = $_POST['field']; $value = addslashes($_POST['value']); Event::saveClient($id, $field, $value); break; case "saveColor": $data = $_POST['data'];