Converted all short tags to full tags
[aur-xilon.git] / web / html / logout.php
blob4f267ed3de4ab246fe6e7264637b2281ebdb2c97
1 <?php
3 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
5 include("aur.inc"); # access AUR common functions
6 include("pkgfuncs_po.inc"); # Add to handle the i18n of My Packages
7 include("logout_po.inc"); # use some form of this for i18n support
8 set_lang(); # this sets up the visitor's language
10 # if they've got a cookie, log them out - need to do this before
11 # sending any HTML output.
13 if (isset($_COOKIE["AURSID"])) {
14 $q = "DELETE FROM Sessions WHERE SessionID = '";
15 $q.= mysql_real_escape_string($_COOKIE["AURSID"]) . "'";
16 $dbh = db_connect();
17 db_query($q, $dbh);
18 setcookie("AURSID", "", time() - (60*60*24*30), "/");
19 setcookie("AURLANG", "", time() - (60*60*24*30), "/");
22 html_header(); # print out the HTML header
23 print __("You have been successfully logged out.")."<br />\n";
26 html_footer("\$Id: logout.php 295 2006-08-08 00:59:10Z pjmattal $");
27 # vim: ts=2 sw=2 noet ft=php