bugfixes
[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
11 // Quick Fix for Gettext in LogOut Screen
12if (!function_exists("_")) {
13 function _($string) {
14 return $string;
15 }
16 }
17
71fd5383 18 // $squirrelmail_language is set by a cookie when the user
19 // selects language
20 if (isset($squirrelmail_language)) {
21 if ($squirrelmail_language != "en") {
22 putenv("LANG=".$squirrelmail_language);
23 bindtextdomain("squirrelmail", "../locale/");
24 textdomain("squirrelmail");
25 }
26 }
288491a4 27
71fd5383 28 include ("../src/load_prefs.php");
21c3249f 29
9f2215a1 30 setcookie("username", "", time(), "/");
31 setcookie("key", "", time(), "/");
32 setcookie("logged_in", 0, time(), "/");
33 session_destroy();
21c3249f 34?>
35<HTML>
59177427 36<?php
71fd5383 37 echo "<BODY TEXT=000000 BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
38 echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
39 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
21c3249f 40 echo " <TD ALIGN=CENTER>";
aae41ae9 41 echo " <B>";
b581fa60 42 echo _("Sign Out");
aae41ae9 43 echo "</B>";
21c3249f 44 echo " </TD>";
45 echo " </TR>";
71fd5383 46 echo " <TR BGCOLOR=$color[4] WIDTH=100%>";
21c3249f 47 echo " <TD ALIGN=CENTER>";
aae41ae9 48 echo " <BR>";
b581fa60 49 echo _("You have been successfully signed out.");
aae41ae9 50 echo "<BR>";
b581fa60 51 echo _("Click here to ");
52 echo "<A HREF=\"login.php\" TARGET=_top>";
53 echo _("log back in.");
aae41ae9 54 echo "</A><BR><BR>";
21c3249f 55 echo " </TD>";
56 echo " </TR>";
71fd5383 57 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
21c3249f 58 echo " <TD ALIGN=CENTER>";
42a54da4 59 echo " <br>";
21c3249f 60 echo " </TD>";
61 echo " </TR>";
62 echo "</TABLE>";
42a54da4 63 echo "<br><br>";
21c3249f 64?>
65</BODY>
66</HTML>