public static function Logout() { $DB = GetDB(); self::$authenticated = false; $cookie_settings = self::GetCookieSettings(); if (isset($_COOKIE[self::COOKIE_NAME])) { $cookie = array(); parse_str($_COOKIE[self::COOKIE_NAME], $cookie); $DB->Update('DELETE FROM `tbx_administrator_session` WHERE `username`=? AND `session`=?', array($cookie[self::FIELD_USERNAME], $cookie[self::FIELD_SESSION])); } setcookie(self::COOKIE_NAME, false, time() - self::SESSION_LENGTH, $cookie_settings['path'], $cookie_settings['domain']); }