diff options
Diffstat (limited to 'web/html/logout.php')
-rw-r--r-- | web/html/logout.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/web/html/logout.php b/web/html/logout.php index 6757784..07a787a 100644 --- a/web/html/logout.php +++ b/web/html/logout.php @@ -2,17 +2,19 @@ include("aur.inc"); # access AUR common functions include("logout_po.inc"); # use some form of this for i18n support set_lang(); # this sets up the visitor's language -html_header(); # print out the HTML header - -# Any text you print out to the visitor, use the __() function -# for i18n support. See 'testpo.php' for more details. +# if they've got a cookie, log them out - need to do this before +# sending any HTML output. # -print __("Under construction...")."<br/>\n"; +if (isset($_COOKIE["AURSID"])) { + $q = "DELETE FROM Sessions WHERE SessionID = '"; + $q.= mysql_escape_string($_COOKIE["AURSID"]) . "'"; + setcookie("AURSID", "", time() - (60*60*24*30), "/"); +} + +html_header(); # print out the HTML header +print __("You have been successfully logged out.")."<br/>\n"; -html_footer("\$Id$"); # Use the $Id$ keyword - # NOTE: when checking in a new file, use - # 'svn propset svn:keywords "Id" filename.php' - # to tell svn to expand the "Id" keyword. +html_footer("\$Id$"); ?> |