moving main color tags to css
[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 *
4b4abf93 8 * @copyright &copy; 1999-2005 The SquirrelMail Project Team
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
46b0c6f4 20require_once(SM_PATH . 'include/validate.php');
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?>
e8bef7f4 59<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
fab3baa6 60<html>
e8bef7f4 61<head>
59177427 62<?php
32f4e318 63 if ($theme_css != '') {
8c65f339 64?>
3c621ba1 65 <link rel="stylesheet" type="text/css" href="<?php echo $theme_css; ?>" />
8c65f339 66<?php
32f4e318 67 }
21c3249f 68?>
be2b5012 69 <meta name="robots" content="noindex,nofollow">
8178e728 70 <title><?php echo $org_title . ' - ' . _("Signout"); ?></title>
fab3baa6 71</head>
91e0dccc 72<body text="<?php echo $color[8]; ?>" bgcolor="<?php echo $color[4]; ?>"
3c621ba1 73link="<?php echo $color[7]; ?>" vlink="<?php echo $color[7]; ?>"
74alink="<?php echo $color[7]; ?>">
75<br /><br />
d4651fa2 76<?php
ed89e55b 77$plugin_message = concat_hook_function('logout_above_text');
fab3baa6 78echo
79html_tag( 'table',
80 html_tag( 'tr',
ca52e31b 81 html_tag( 'th', _("Sign Out"), 'center' ) ,
a74103dd 82 '', $color[0] ) .
ed89e55b 83 $plugin_message .
fab3baa6 84 html_tag( 'tr',
85 html_tag( 'td', _("You have been successfully signed out.") .
3c621ba1 86 '<br /><a href="login.php" target="' . $frame_top . '">' .
87 _("Click here to log back in.") . '</a><br />' ,
fab3baa6 88 'center' ) ,
a74103dd 89 '', $color[4] ) .
fab3baa6 90 html_tag( 'tr',
3c621ba1 91 html_tag( 'td', '<br />', 'center' ) ,
a74103dd 92 '', $color[0] ) ,
93'center', $color[4], 'width="50%" cellpadding="2" cellspacing="0" border="0"' )
a2b193bc 94
fab3baa6 95?>
96</body>
c077ffeb 97</html>