switched doctype to standard compliance mode
[squirrelmail.git] / src / signout.php
CommitLineData
59177427 1<?php
895905c0 2
35586184 3/**
4 * signout.php -- cleans up session and logs the user out
5 *
35586184 6 * Cleans up after the user. Resets cookies and terminates session.
7 *
47ccfad4 8 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
4b4abf93 9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
30967a1e 10 * @version $Id$
8f6f9ba5 11 * @package squirrelmail
35586184 12 */
8b522a59 13
30967a1e 14/**
15 * Path for SquirrelMail required files.
16 * @ignore
17 */
86725763 18define('SM_PATH','../');
19
5c4ff7bf 20include_once(SM_PATH . 'include/validate.php');
46b0c6f4 21require_once(SM_PATH . 'functions/prefs.php');
86725763 22require_once(SM_PATH . 'functions/plugin.php');
23require_once(SM_PATH . 'functions/strings.php');
24require_once(SM_PATH . 'functions/html.php');
f740c049 25
46b0c6f4 26/* Erase any lingering attachments */
c077ffeb 27sqgetGlobalVar('compose_messages', $compose_messages, SQ_SESSION);
f9b9ca12 28
29if (!empty($compose_message) && is_array($compose_messages)) {
30 foreach($compose_messages as $composeMessage) {
31 $composeMessage->purgeAttachments();
32 }
32f4e318 33}
288491a4 34
32f4e318 35if (!isset($frame_top)) {
fb745cc7 36 $frame_top = '_top';
32f4e318 37}
d03f3582 38
32f4e318 39/* If a user hits reload on the last page, $base_uri isn't set
40 * because it was deleted with the session. */
f38b7cf0 41if (! sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) {
42 require_once(SM_PATH . 'functions/display_messages.php');
f3bc099d 43 $base_uri = sqm_baseuri();
32f4e318 44}
e8bef7f4 45
32f4e318 46do_hook('logout');
f923b93d 47
e8bef7f4 48sqsession_destroy();
49
32f4e318 50if ($signout_page) {
51 header('Status: 303 See Other');
52 header("Location: $signout_page");
53 exit; /* we send no content if we're redirecting. */
54}
118eb9a4 55
56/* internal gettext functions will fail, if language is not set */
57set_up_language($squirrelmail_language, true, true);
21c3249f 58?>
151562a7 59<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
60 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
fab3baa6 61<html>
e8bef7f4 62<head>
59177427 63<?php
32f4e318 64 if ($theme_css != '') {
8c65f339 65?>
3c621ba1 66 <link rel="stylesheet" type="text/css" href="<?php echo $theme_css; ?>" />
8c65f339 67<?php
32f4e318 68 }
21c3249f 69?>
be2b5012 70 <meta name="robots" content="noindex,nofollow">
8178e728 71 <title><?php echo $org_title . ' - ' . _("Signout"); ?></title>
fab3baa6 72</head>
91e0dccc 73<body text="<?php echo $color[8]; ?>" bgcolor="<?php echo $color[4]; ?>"
3c621ba1 74link="<?php echo $color[7]; ?>" vlink="<?php echo $color[7]; ?>"
75alink="<?php echo $color[7]; ?>">
76<br /><br />
d4651fa2 77<?php
ed89e55b 78$plugin_message = concat_hook_function('logout_above_text');
fab3baa6 79echo
80html_tag( 'table',
81 html_tag( 'tr',
ca52e31b 82 html_tag( 'th', _("Sign Out"), 'center' ) ,
a74103dd 83 '', $color[0] ) .
ed89e55b 84 $plugin_message .
fab3baa6 85 html_tag( 'tr',
86 html_tag( 'td', _("You have been successfully signed out.") .
3c621ba1 87 '<br /><a href="login.php" target="' . $frame_top . '">' .
88 _("Click here to log back in.") . '</a><br />' ,
fab3baa6 89 'center' ) ,
a74103dd 90 '', $color[4] ) .
fab3baa6 91 html_tag( 'tr',
3c621ba1 92 html_tag( 'td', '<br />', 'center' ) ,
a74103dd 93 '', $color[0] ) ,
a73a2136 94'center', $color[4], 'width="50%" cellpadding="2" cellspacing="0" border="0"' );
a2b193bc 95
5c4ff7bf 96$oTemplate->display('footer.tpl');
a73a2136 97?>