summaryrefslogtreecommitdiffstats
path: root/web/html/logout.php
diff options
context:
space:
mode:
authoreric <eric>2004-06-20 23:26:28 +0000
committereric <eric>2004-06-20 23:26:28 +0000
commit84e15d0463726fe03b0cdb5a690621330034e737 (patch)
treefee94fa1046bfe56095cc4a35b06b033de9ee589 /web/html/logout.php
parent30aea4ec8cfee1ffc8786955ecb012ef73a68b73 (diff)
downloadaurweb-84e15d0463726fe03b0cdb5a690621330034e737.tar.xz
finished the login/logout/session stuff
Diffstat (limited to 'web/html/logout.php')
-rw-r--r--web/html/logout.php20
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$");
?>