3 ** signout.php -- cleans up session and logs the user out
5 ** Copyright (c) 1999-2000 The SquirrelMail development team
6 ** Licensed under the GNU GPL. For full terms see the file COPYING.
8 ** Cleans up after the user. Resets cookies and terminates
14 include('../src/validate.php');
15 include ('../src/load_prefs.php');
16 include ('../functions/prefs.php');
17 include ('../functions/plugin.php');
19 // Erase any lingering attachments
20 if (! isset($attachments)) {
21 $attachments = array();
23 foreach ($attachments as $info) {
24 if (file_exists($attachment_dir . $info['localfilename'])) {
25 unlink($attachment_dir . $info['localfilename']);
28 set_up_language(getPref($data_dir, $username, 'language'));
30 // If a user hits reload on the last page, $base_uri isn't set
31 // because it was deleted with the session.
32 if (! isset($base_uri)) {
33 ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
38 setcookie('username', '', 0, $base_uri);
39 setcookie('key', '', 0, $base_uri);
40 setcookie('logged_in', '', 0, $base_uri);
44 header("Status: 303 See Other");
45 header("Location: $signout_page");
46 exit; /* we send no content if we're redirecting. */
52 if ($theme_css != '') {
54 <LINK REL
="stylesheet" TYPE
="text/css" HREF
="<?php echo $theme_css ?>">
58 <TITLE
><?php
echo $org_title ?
> - Signout
</TITLE
>
60 <BODY TEXT
="<?php echo $color[8] ?>" BGCOLOR
="<?php echo $color[4] ?>"
61 LINK
="<?php echo $color[7] ?>" VLINK
="<?php echo $color[7] ?>" A
62 LINK
="<?php echo $color[7] ?>">
64 <TABLE BGCOLOR
="FFFFFF" BORDER
="0" COLS
="1" WIDTH
="50%" CELLSPACING
="0"
65 CELLPADDING
="2" ALIGN
="CENTER">
66 <TR BGCOLOR
="<?php echo $color[0] ?>" WIDTH
=100%
>
68 <B
><?php
echo _("Sign Out") ?
></B
>
71 <TR BGCOLOR
="<?php echo $color[4] ?>" WIDTH
=100%
>
73 <?php
echo _("You have been successfully signed out.") ?
><BR
>
74 <A HREF
="login.php" TARGET
="_top">
75 <?php
echo _("Click here to log back in.") ?
>
79 <TR BGCOLOR
="<?php echo $color[0] ?>" WIDTH
=100%
>