mysql_query("ALTER TABLE " . DB_PREFIX . "_groups ADD events TINYINT(1) UNSIGNED NOT NULL DEFAULT '1'"); } require_once 'inc/class/Event.class.php'; // set the action from the url $action = isset($_GET['action']) && $_GET['action'] != '' ? $_GET['action'] : ''; // enable the event if ($action == 'enableEvent') { $event = new Event(); $event->storeFormValues($_GET); $event->updateStatus(); } // disable the event if ($action == 'disableEvent') { $event = new Event(); $event->storeFormValues($_GET); $event->updateStatus(); } // delete the event if ($action == 'deleteEvent') { $event = new Event(); $event->storeFormValues($_GET); $event->delete(); } // if $_POST is detected if (isset($_POST['events'])) { $_SESSION['postevents'] = $_POST['events'] != '' ? $_POST['events'] : 0; } if (isset($_GET['newGroup']) && $_GET['newGroup'] != '') { // Update the events access level for new groups $update = "UPDATE " . DB_PREFIX . "groups SET events = :events WHERE id = :id"; $st = $conn->prepare($update);