include_once INCLUDESPATH . "easyparliament/member.php"; include_once INCLUDESPATH . "easyparliament/searchengine.php"; include_once INCLUDESPATH . '../../commonlib/phplib/auth.php'; include_once INCLUDESPATH . '../../commonlib/phplib/crosssell.php'; $this_page = "alert"; $extra = null; $ALERT = new ALERT(); $token = get_http_var('t'); $alert = $ALERT->check_token($token); $message = ''; if ($action = get_http_var('action')) { $success = true; if ($action == 'Confirm') { $success = $ALERT->confirm($token); if ($success) { $criteria = $ALERT->criteria_pretty(true); $message = "<p>Your alert has been confirmed. You will now\n receive email alerts for the following criteria:</p>\n <ul>{$criteria}</ul> <p>This is normally the day after, but could\n conceivably be later due to issues at our or parliament.uk's\n end.</p>"; } } elseif ($action == 'Suspend') { $success = $ALERT->suspend($token); if ($success) { $message = '<p><strong>That alert has been suspended.</strong> You will no longer receive this alert.</p>'; } } elseif ($action == 'Resume') { $success = $ALERT->resume($token); if ($success) { $message = '<p><strong>That alert has been resumed.</strong> You will now receive email alerts on any day when there are entries in Hansard that match your criteria.</p>'; } } elseif ($action == 'Delete') {