if (CHRIS_MAINTENANCE) { $t->replace('MAINTENANCE', 'display:block'); } else { $t->replace('MAINTENANCE', 'display:none'); } return $t; } // check if this is a logout attempt if (SecurityC::logout_attempt()) { echo 'LOGOUT ATTEMP' . PHP_EOL; // perform the logout SecurityC::logout(); exit; } // check if this is a login attempt if (SecurityC::login_attempt()) { // login could be requested using a session or a post request // perform the login if (!SecurityC::login()) { // invalid credentials // destroy the session session_destroy(); // .. and forward to the sorry page header('Location: ?sorry'); exit; } // check if query required $parsed_url = parse_url($_SERVER["REQUEST_URI"]); // we have args, let's have a look at them if (isset($parsed_url['query']) && !empty($parsed_url['query'])) { // if anything, might want to CURL it :)