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