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('../functions/strings.php');
16 include ('../src/load_prefs.php');
17 include('../config/config.php');
18 include('../functions/i18n.php');
19 include ('../functions/prefs.php');
20 include ('../functions/plugin.php');
23 // Erase any lingering attachments
24 if (! isset($attachments))
25 $attachments = array();
26 foreach ($attachments as $info)
28 if (file_exists($attachment_dir . $info['localfilename']))
30 unlink($attachment_dir . $info['localfilename']);
34 set_up_language(getPref($data_dir, $username, 'language'));
36 // If a user hits reload on the last page, $base_uri isn't set
37 // because it was deleted with the session.
38 if (! isset($base_uri))
40 ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
45 setcookie('username', '', 0, $base_uri);
46 setcookie('key', '', 0, $base_uri);
47 setcookie('logged_in', '', 0, $base_uri);
53 if ($theme_css != '') {
55 <LINK REL
="stylesheet" TYPE
="text/css" HREF
="<?php echo $theme_css ?>">
59 <TITLE
><?php
echo $org_title ?
> - Signout
</TITLE
>
61 <BODY TEXT
="<?php echo $color[8] ?>" BGCOLOR
="<?php echo $color[4] ?>"
62 LINK
="<?php echo $color[7] ?>" VLINK
="<?php echo $color[7] ?>" A
63 LINK
="<?php echo $color[7] ?>">
65 <TABLE BGCOLOR
="FFFFFF" BORDER
="0" COLS
="1" WIDTH
="50%" CELLSPACING
="0"
66 CELLPADDING
="2" ALIGN
="CENTER">
67 <TR BGCOLOR
="<?php echo $color[0] ?>" WIDTH
=100%
>
69 <B
><?php
echo _("Sign Out") ?
></B
>
72 <TR BGCOLOR
="<?php echo $color[4] ?>" WIDTH
=100%
>
74 <?php
echo _("You have been successfully signed out.") ?
><BR
>
75 <A HREF
="login.php" TARGET
="_top">
76 <?php
echo _("Click here to log back in.") ?
>
80 <TR BGCOLOR
="<?php echo $color[0] ?>" WIDTH
=100%
>