* Added the _ to further ensure that the bounary string can't be made
[squirrelmail.git] / src / signout.php
CommitLineData
59177427 1<?php
c6d6fe73 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 **
245a6892 11 ** $Id$
c6d6fe73 12 **/
8b522a59 13
245a6892 14 session_start();
15
ceac7a2f 16 if (!isset($strings_php))
91dc6e4e 17 include('../functions/strings.php');
ceac7a2f 18
91dc6e4e 19 include ('../src/load_prefs.php');
7b0a0f19 20
e90872be 21 if (!isset($config_php))
91dc6e4e 22 include('../config/config.php');
7b0a0f19 23 if (!isset($i18n_php))
91dc6e4e 24 include('../functions/i18n.php');
7b0a0f19 25 if (!isset($prefs_php))
91dc6e4e 26 include ('../functions/prefs.php');
c6d6fe73 27 if (!isset($plugin_php))
91dc6e4e 28 include ('../functions/plugin.php');
7b0a0f19 29
91dc6e4e 30 set_up_language(getPref($data_dir, $username, 'language'));
288491a4 31
ceac7a2f 32 // If a user hits reload on the last page, $base_uri isn't set
33 // because it was deleted with the session.
34 if (! isset($base_uri))
35 {
36 ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
37 $base_uri = $regs[1];
38 }
39
91dc6e4e 40 do_hook('logout');
41 setcookie('username', '', 0, $base_uri);
42 setcookie('key', '', 0, $base_uri);
43 setcookie('logged_in', '', 0, $base_uri);
9f2215a1 44 session_destroy();
21c3249f 45?>
46<HTML>
e90872be 47 <HEAD>
59177427 48<?php
91dc6e4e 49 if ($theme_css != '') {
8c65f339 50?>
8437bc78 51<LINK REL="stylesheet" TYPE=text/css" HREF="<?php echo $theme_css ?>">
8c65f339 52<?php
e90872be 53 }
21c3249f 54?>
8437bc78 55<TITLE><?php echo $org_title ?> - Signout</TITLE>
8c65f339 56</HEAD>
8437bc78 57<BODY TEXT="<?php echo $color[8] ?>" BGCOLOR="<?php echo $color[4] ?>"
58LINK="<?php echo $color[7] ?>" VLINK="<?php echo $color[7] ?>" A
59LINK="<?php echo $color[7] ?>">
8c65f339 60<BR><BR>
61<TABLE BGCOLOR="FFFFFF" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0"
62CELLPADDING="2" ALIGN="CENTER">
8437bc78 63 <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH=100%>
8c65f339 64 <TD ALIGN="CENTER">
8437bc78 65 <B><?php echo _("Sign Out") ?></B>
8c65f339 66 </TD>
67 </TR>
8437bc78 68 <TR BGCOLOR="<?php echo $color[4] ?>" WIDTH=100%>
8c65f339 69 <TD ALIGN="CENTER">
8437bc78 70 <?php echo _("You have been successfully signed out.") ?><BR>
71 <A HREF="login.php" TARGET="_top">
72 <?php echo _("Click here to log back in.") ?>
8c65f339 73 </A><BR><BR>
74 </TD>
75 </TR>
8437bc78 76 <TR BGCOLOR="<?php echo $color[0] ?>" WIDTH=100%>
8c65f339 77 <TD ALIGN="CENTER">
78 <BR>
79 </TD>
80 </TR>
81</TABLE>
21c3249f 82</BODY>
83</HTML>