Fix for [ Bug #125985 ] Random Login Failure. Sometimes funky characters in
[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
e90872be 17 if (!isset($config_php))
18 include("../config/config.php");
7b0a0f19 19 if (!isset($i18n_php))
20 include("../functions/i18n.php");
21 if (!isset($prefs_php))
22 include ("../functions/prefs.php");
c6d6fe73 23 if (!isset($plugin_php))
24 include ("../functions/plugin.php");
7b0a0f19 25
441f2d33 26 set_up_language(getPref($data_dir, $username, "language"));
288491a4 27
c6d6fe73 28 do_hook("logout");
29 setcookie("username", "", 0, $base_uri);
30 setcookie("key", "", 0, $base_uri);
31 setcookie("logged_in", "", 0, $base_uri);
9f2215a1 32 session_destroy();
21c3249f 33?>
34<HTML>
e90872be 35 <HEAD>
59177427 36<?php
e90872be 37 if ($theme_css != "") {
38 printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">',
39 $theme_css);
40 echo "\n";
41 }
42 echo "<TITLE>$title - Signout</TITLE>\n";
5218b282 43 echo "</HEAD><BODY TEXT=$color[8] BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
71fd5383 44 echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
45 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
21c3249f 46 echo " <TD ALIGN=CENTER>";
aae41ae9 47 echo " <B>";
b581fa60 48 echo _("Sign Out");
aae41ae9 49 echo "</B>";
21c3249f 50 echo " </TD>";
51 echo " </TR>";
71fd5383 52 echo " <TR BGCOLOR=$color[4] WIDTH=100%>";
21c3249f 53 echo " <TD ALIGN=CENTER>";
aae41ae9 54 echo " <BR>";
b581fa60 55 echo _("You have been successfully signed out.");
aae41ae9 56 echo "<BR>";
b581fa60 57 echo "<A HREF=\"login.php\" TARGET=_top>";
7b0a0f19 58 echo _("Click here to log back in.");
aae41ae9 59 echo "</A><BR><BR>";
21c3249f 60 echo " </TD>";
61 echo " </TR>";
71fd5383 62 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
21c3249f 63 echo " <TD ALIGN=CENTER>";
42a54da4 64 echo " <br>";
21c3249f 65 echo " </TD>";
66 echo " </TR>";
67 echo "</TABLE>";
42a54da4 68 echo "<br><br>";
21c3249f 69?>
70</BODY>
71</HTML>