Added html_top and html_bottom hooks to read_body for compression plugin
[squirrelmail.git] / src / signout.php
1 <?php
2 session_start();
3
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 **/
14
15 include ("../src/load_prefs.php");
16
17 if (!isset($config_php))
18 include("../config/config.php");
19 if (!isset($i18n_php))
20 include("../functions/i18n.php");
21 if (!isset($prefs_php))
22 include ("../functions/prefs.php");
23 if (!isset($plugin_php))
24 include ("../functions/plugin.php");
25
26 set_up_language(getPref($data_dir, $username, "language"));
27
28 do_hook("logout");
29 setcookie("username", "", 0, $base_uri);
30 setcookie("key", "", 0, $base_uri);
31 setcookie("logged_in", "", 0, $base_uri);
32 session_destroy();
33 ?>
34 <HTML>
35 <HEAD>
36 <?php
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";
43 echo "</HEAD><BODY TEXT=$color[8] BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
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%>";
46 echo " <TD ALIGN=CENTER>";
47 echo " <B>";
48 echo _("Sign Out");
49 echo "</B>";
50 echo " </TD>";
51 echo " </TR>";
52 echo " <TR BGCOLOR=$color[4] WIDTH=100%>";
53 echo " <TD ALIGN=CENTER>";
54 echo " <BR>";
55 echo _("You have been successfully signed out.");
56 echo "<BR>";
57 echo "<A HREF=\"login.php\" TARGET=_top>";
58 echo _("Click here to log back in.");
59 echo "</A><BR><BR>";
60 echo " </TD>";
61 echo " </TR>";
62 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
63 echo " <TD ALIGN=CENTER>";
64 echo " <br>";
65 echo " </TD>";
66 echo " </TR>";
67 echo "</TABLE>";
68 echo "<br><br>";
69 ?>
70 </BODY>
71 </HTML>