4 * signout.php -- cleans up session and logs the user out
6 * Cleans up after the user. Resets cookies and terminates session.
8 * @copyright © 1999-2005 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @package squirrelmail
15 * Path for SquirrelMail required files.
18 define('SM_PATH','../');
20 require_once(SM_PATH
. 'include/validate.php');
21 require_once(SM_PATH
. 'functions/prefs.php');
22 require_once(SM_PATH
. 'functions/plugin.php');
23 require_once(SM_PATH
. 'functions/strings.php');
24 require_once(SM_PATH
. 'functions/html.php');
26 /* Erase any lingering attachments */
27 if (isset($attachments) && is_array($attachments)
28 && sizeof($attachments)){
29 $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
30 foreach ($attachments as $info) {
31 $attached_file = "$hashed_attachment_dir/$info[localfilename]";
32 if (file_exists($attached_file)) {
33 unlink($attached_file);
38 if (!isset($frame_top)) {
42 /* If a user hits reload on the last page, $base_uri isn't set
43 * because it was deleted with the session. */
44 if (! sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION
) ) {
45 require_once(SM_PATH
. 'functions/display_messages.php');
46 $base_uri = sqm_baseuri();
54 header('Status: 303 See Other');
55 header("Location: $signout_page");
56 exit; /* we send no content if we're redirecting. */
59 /* internal gettext functions will fail, if language is not set */
60 set_up_language($squirrelmail_language, true, true);
62 <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
66 if ($theme_css != '') {
68 <link rel
="stylesheet" type
="text/css" href
="<?php echo $theme_css; ?>" />
72 <meta name
="robots" content
="noindex,nofollow">
73 <title
><?php
echo $org_title . ' - ' . _("Signout"); ?
></title
>
75 <body text
="<?php echo $color[8]; ?>" bgcolor
="<?php echo $color[4]; ?>"
76 link
="<?php echo $color[7]; ?>" vlink
="<?php echo $color[7]; ?>"
77 alink
="<?php echo $color[7]; ?>">
80 $plugin_message = concat_hook_function('logout_above_text');
84 html_tag( 'th', _("Sign Out"), 'center' ) ,
88 html_tag( 'td', _("You have been successfully signed out.") .
89 '<br /><a href="login.php" target="' . $frame_top . '">' .
90 _("Click here to log back in.") . '</a><br />' ,
94 html_tag( 'td', '<br />', 'center' ) ,
96 'center', $color[4], 'width="50%" cellpadding="2" cellspacing="0" border="0"' )