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 require_once('../src/validate.php');
15 require_once('../functions/prefs.php');
16 require_once('../functions/plugin.php');
18 // Erase any lingering attachments
19 if (! isset($attachments)) {
20 $attachments = array();
22 foreach ($attachments as $info) {
23 if (file_exists($attachment_dir . $info['localfilename'])) {
24 unlink($attachment_dir . $info['localfilename']);
28 // If a user hits reload on the last page, $base_uri isn't set
29 // because it was deleted with the session.
30 if (! isset($base_uri)) {
31 ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
36 setcookie('username', '', 0, $base_uri);
37 setcookie('key', '', 0, $base_uri);
41 header("Status: 303 See Other");
42 header("Location: $signout_page");
43 exit; /* we send no content if we're redirecting. */
49 if ($theme_css != '') {
51 <LINK REL
="stylesheet" TYPE
="text/css" HREF
="<?php echo $theme_css ?>">
55 <TITLE
><?php
echo $org_title ?
> - Signout
</TITLE
>
57 <BODY TEXT
="<?php echo $color[8] ?>" BGCOLOR
="<?php echo $color[4] ?>"
58 LINK
="<?php echo $color[7] ?>" VLINK
="<?php echo $color[7] ?>"
59 ALINK
="<?php echo $color[7] ?>">
61 <TABLE BGCOLOR
="FFFFFF" BORDER
="0" COLS
="1" WIDTH
="50%" CELLSPACING
="0"
62 CELLPADDING
="2" ALIGN
="CENTER">
63 <TR BGCOLOR
="<?php echo $color[0] ?>" WIDTH
=100%
>
65 <B
><?php
echo _("Sign Out") ?
></B
>
68 <TR BGCOLOR
="<?php echo $color[4] ?>" WIDTH
=100%
>
70 <?php
do_hook('logout_above_text'); ?
>
71 <?php
echo _("You have been successfully signed out.") ?
><BR
>
72 <A HREF
="login.php" TARGET
="_top">
73 <?php
echo _("Click here to log back in.") ?
>
77 <TR BGCOLOR
="<?php echo $color[0] ?>" WIDTH
=100%
>