diff options
author | eric <eric> | 2004-06-21 01:26:28 +0200 |
---|---|---|
committer | eric <eric> | 2004-06-21 01:26:28 +0200 |
commit | 84e15d0463726fe03b0cdb5a690621330034e737 (patch) | |
tree | fee94fa1046bfe56095cc4a35b06b033de9ee589 /web/html/logout.php | |
parent | 30aea4ec8cfee1ffc8786955ecb012ef73a68b73 (diff) | |
download | aur-84e15d0463726fe03b0cdb5a690621330034e737.tar.gz aur-84e15d0463726fe03b0cdb5a690621330034e737.tar.xz |
finished the login/logout/session stuff
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 6757784e..07a787a1 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$"); ?> |