* Removed all of the echo statements
[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 if (!isset($strings_php))
17 include('../functions/strings.php');
18
19 include ('../src/load_prefs.php');
20
21 if (!isset($config_php))
22 include('../config/config.php');
23 if (!isset($i18n_php))
24 include('../functions/i18n.php');
25 if (!isset($prefs_php))
26 include ('../functions/prefs.php');
27 if (!isset($plugin_php))
28 include ('../functions/plugin.php');
29
30 set_up_language(getPref($data_dir, $username, 'language'));
31
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
40 do_hook('logout');
41 setcookie('username', '', 0, $base_uri);
42 setcookie('key', '', 0, $base_uri);
43 setcookie('logged_in', '', 0, $base_uri);
44 session_destroy();
45 ?>
46 <HTML>
47 <HEAD>
48 <?php
49 if ($theme_css != '') {
50 ?>
51 <LINK REL="stylesheet" TYPE=text/css" HREF="<?= $theme_css ?>">
52 <?php
53 }
54 ?>
55 <TITLE><?= $org_title ?> - Signout</TITLE>
56 </HEAD>
57 <BODY TEXT="<?= $color[8] ?>" BGCOLOR="<?= $color[4] ?>"
58 LINK="<?= $color[7] ?>" VLINK="<?= $color[7] ?>" ALINK="<?= $color[7] ?>">
59 <BR><BR>
60 <TABLE BGCOLOR="FFFFFF" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0"
61 CELLPADDING="2" ALIGN="CENTER">
62 <TR BGCOLOR="<?= $color[0] ?>" WIDTH=100%>
63 <TD ALIGN="CENTER">
64 <B><?= _("Sign Out") ?></B>
65 </TD>
66 </TR>
67 <TR BGCOLOR="<?= $color[4] ?>" WIDTH=100%>
68 <TD ALIGN="CENTER">
69 <?= _("You have been successfully signed out.") ?><BR>
70 <A HREF="login.php" TARGET="_top"><?= _("Click here to log back in.") ?>
71 </A><BR><BR>
72 </TD>
73 </TR>
74 <TR BGCOLOR="<?= $color[0] ?>" WIDTH=100%>
75 <TD ALIGN="CENTER">
76 <BR>
77 </TD>
78 </TR>
79 </TABLE>
80 </BODY>
81 </HTML>