Removed what appears to be leftover debug code.
[squirrelmail.git] / src / signout.php
CommitLineData
59177427 1<?php
2a32fc83 2 session_start();
3
21c3249f 4 /**
a09387f4 5 ** signout.php
21c3249f 6 **
7 ** Clears the cookie, and logs them out.
8 **
9 **/
8b522a59 10
7b0a0f19 11 include ("../src/load_prefs.php");
12
13 if (!isset($i18n_php))
14 include("../functions/i18n.php");
15 if (!isset($prefs_php))
16 include ("../functions/prefs.php");
17
18 // Quick Fix for Gettext in LogOut Screen
19 if (!function_exists("_")) {
8b522a59 20 function _($string) {
21 return $string;
22 }
23 }
24
7b0a0f19 25 $squirrelmail_language = getPref ($data_dir, $username, "language");
71fd5383 26 if (isset($squirrelmail_language)) {
7b0a0f19 27 if ($squirrelmail_language != "en" && $squirrelmail_language != "") {
28 putenv("LC_ALL=".$squirrelmail_language);
71fd5383 29 bindtextdomain("squirrelmail", "../locale/");
30 textdomain("squirrelmail");
7b0a0f19 31 header ("Content-Type: text/html; charset=".$languages[$squirrelmail_language]["CHARSET"]);
32
33 // Setting cookie to use on the login screen the next time the
34 // same user logs in.
35 setcookie("squirrelmail_language", $squirrelmail_language,
36 time()+2592000);
37
71fd5383 38 }
39 }
288491a4 40
7b0a0f19 41 setcookie("username", "", time(), "/");
42 setcookie("key", "", time(), "/");
43 setcookie("logged_in", 0, time(), "/");
9f2215a1 44 session_destroy();
21c3249f 45?>
46<HTML>
59177427 47<?php
71fd5383 48 echo "<BODY TEXT=000000 BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
49 echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
50 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
21c3249f 51 echo " <TD ALIGN=CENTER>";
aae41ae9 52 echo " <B>";
b581fa60 53 echo _("Sign Out");
aae41ae9 54 echo "</B>";
21c3249f 55 echo " </TD>";
56 echo " </TR>";
71fd5383 57 echo " <TR BGCOLOR=$color[4] WIDTH=100%>";
21c3249f 58 echo " <TD ALIGN=CENTER>";
aae41ae9 59 echo " <BR>";
b581fa60 60 echo _("You have been successfully signed out.");
aae41ae9 61 echo "<BR>";
b581fa60 62 echo "<A HREF=\"login.php\" TARGET=_top>";
7b0a0f19 63 echo _("Click here to log back in.");
aae41ae9 64 echo "</A><BR><BR>";
21c3249f 65 echo " </TD>";
66 echo " </TR>";
71fd5383 67 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
21c3249f 68 echo " <TD ALIGN=CENTER>";
42a54da4 69 echo " <br>";
21c3249f 70 echo " </TD>";
71 echo " </TR>";
72 echo "</TABLE>";
42a54da4 73 echo "<br><br>";
21c3249f 74?>
75</BODY>
76</HTML>