Changed regexps
[squirrelmail.git] / src / signout.php
1 <?php
2 /**
3 ** signout.php -- cleans up session and logs the user out
4 **
5 ** Copyright (c) 1999-2000 The SquirrelMail development team
6 ** Licensed under the GNU GPL. For full terms see the file COPYING.
7 **
8 ** Cleans up after the user. Resets cookies and terminates
9 ** session.
10 **
11 ** $Id$
12 **/
13
14 session_start();
15
16 include ("../src/load_prefs.php");
17
18 if (!isset($config_php))
19 include("../config/config.php");
20 if (!isset($i18n_php))
21 include("../functions/i18n.php");
22 if (!isset($prefs_php))
23 include ("../functions/prefs.php");
24 if (!isset($plugin_php))
25 include ("../functions/plugin.php");
26
27 set_up_language(getPref($data_dir, $username, "language"));
28
29 do_hook("logout");
30 setcookie("username", "", 0, $base_uri);
31 setcookie("key", "", 0, $base_uri);
32 setcookie("logged_in", "", 0, $base_uri);
33 session_destroy();
34 ?>
35 <HTML>
36 <HEAD>
37 <?php
38 if ($theme_css != "") {
39 printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">',
40 $theme_css);
41 echo "\n";
42 }
43 echo "<TITLE>$title - Signout</TITLE>\n";
44 echo "</HEAD><BODY TEXT=$color[8] BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
45 echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
46 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
47 echo " <TD ALIGN=CENTER>";
48 echo " <B>";
49 echo _("Sign Out");
50 echo "</B>";
51 echo " </TD>";
52 echo " </TR>";
53 echo " <TR BGCOLOR=$color[4] WIDTH=100%>";
54 echo " <TD ALIGN=CENTER>";
55 echo " <BR>";
56 echo _("You have been successfully signed out.");
57 echo "<BR>";
58 echo "<A HREF=\"login.php\" TARGET=_top>";
59 echo _("Click here to log back in.");
60 echo "</A><BR><BR>";
61 echo " </TD>";
62 echo " </TR>";
63 echo " <TR BGCOLOR=$color[0] WIDTH=100%>";
64 echo " <TD ALIGN=CENTER>";
65 echo " <br>";
66 echo " </TD>";
67 echo " </TR>";
68 echo "</TABLE>";
69 echo "<br><br>";
70 ?>
71 </BODY>
72 </HTML>