+// Alerts the current user about malicious/suspicious traffic
+function crackerTrackerAlertCurrentUser () {
+ // Is there some data?
+ if (isset($GLOBALS['ctracker_last_suspicious_entry'])) {
+ // Does the user have a ticket?
+ if (ifCrackerTrackerIpHasTicket()) {
+ // Should we continue?
+ if (isset($_POST['ctracker_continue'])) {
+ // Set cookie
+ sendCrackerTrackerCookie();
+
+ // And redirect to same URL
+ crackerTrackerRedirectSameUrl();
+ } elseif (ifCrackerTrackerCookieIsSet()) {
+ // Return here to normal program
+ return;
+ } else {
+ // Load "Thank you" template
+ crackerTrackerLoadTemplate('add_ticket_thanks');
+ }
+ } elseif ((isset($_POST['ctracker_add_ticket'])) && (!empty($_POST['name'])) && (!empty($_POST['email']))) {
+ // Add the ticket
+ addCrackerTrackerTicket($_POST);
+
+ // Send the email out
+ sendCrackerTrackerTicketMails();
+ } else {
+ // Display the form for new ticket
+ crackerTrackerLoadTemplate('add_ticket');
+ }
+ } // END - if
+
+ // And stop here
+ die();
+}
+