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 © 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 | /** |
202bcbcc |
15 | * Include the SquirrelMail initialization file. |
30967a1e |
16 | */ |
202bcbcc |
17 | require('../include/init.php'); |
f740c049 |
18 | |
46b0c6f4 |
19 | /* Erase any lingering attachments */ |
c077ffeb |
20 | sqgetGlobalVar('compose_messages', $compose_messages, SQ_SESSION); |
f9b9ca12 |
21 | |
22 | if (!empty($compose_message) && is_array($compose_messages)) { |
23 | foreach($compose_messages as $composeMessage) { |
24 | $composeMessage->purgeAttachments(); |
25 | } |
32f4e318 |
26 | } |
288491a4 |
27 | |
32f4e318 |
28 | if (!isset($frame_top)) { |
fb745cc7 |
29 | $frame_top = '_top'; |
32f4e318 |
30 | } |
d03f3582 |
31 | |
32f4e318 |
32 | /* If a user hits reload on the last page, $base_uri isn't set |
33 | * because it was deleted with the session. */ |
f38b7cf0 |
34 | if (! sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) { |
f3bc099d |
35 | $base_uri = sqm_baseuri(); |
32f4e318 |
36 | } |
e8bef7f4 |
37 | |
32f4e318 |
38 | do_hook('logout'); |
f923b93d |
39 | |
e8bef7f4 |
40 | sqsession_destroy(); |
41 | |
32f4e318 |
42 | if ($signout_page) { |
43 | header('Status: 303 See Other'); |
44 | header("Location: $signout_page"); |
45 | exit; /* we send no content if we're redirecting. */ |
46 | } |
118eb9a4 |
47 | |
48 | /* internal gettext functions will fail, if language is not set */ |
49 | set_up_language($squirrelmail_language, true, true); |
21c3249f |
50 | ?> |
151562a7 |
51 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
52 | "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> |
fab3baa6 |
53 | <html> |
e8bef7f4 |
54 | <head> |
59177427 |
55 | <?php |
32f4e318 |
56 | if ($theme_css != '') { |
8c65f339 |
57 | ?> |
3c621ba1 |
58 | <link rel="stylesheet" type="text/css" href="<?php echo $theme_css; ?>" /> |
8c65f339 |
59 | <?php |
32f4e318 |
60 | } |
21c3249f |
61 | ?> |
be2b5012 |
62 | <meta name="robots" content="noindex,nofollow"> |
8178e728 |
63 | <title><?php echo $org_title . ' - ' . _("Signout"); ?></title> |
fab3baa6 |
64 | </head> |
91e0dccc |
65 | <body text="<?php echo $color[8]; ?>" bgcolor="<?php echo $color[4]; ?>" |
3c621ba1 |
66 | link="<?php echo $color[7]; ?>" vlink="<?php echo $color[7]; ?>" |
67 | alink="<?php echo $color[7]; ?>"> |
68 | <br /><br /> |
d4651fa2 |
69 | <?php |
ed89e55b |
70 | $plugin_message = concat_hook_function('logout_above_text'); |
fab3baa6 |
71 | echo |
72 | html_tag( 'table', |
73 | html_tag( 'tr', |
ca52e31b |
74 | html_tag( 'th', _("Sign Out"), 'center' ) , |
a74103dd |
75 | '', $color[0] ) . |
ed89e55b |
76 | $plugin_message . |
fab3baa6 |
77 | html_tag( 'tr', |
78 | html_tag( 'td', _("You have been successfully signed out.") . |
3c621ba1 |
79 | '<br /><a href="login.php" target="' . $frame_top . '">' . |
80 | _("Click here to log back in.") . '</a><br />' , |
fab3baa6 |
81 | 'center' ) , |
a74103dd |
82 | '', $color[4] ) . |
fab3baa6 |
83 | html_tag( 'tr', |
3c621ba1 |
84 | html_tag( 'td', '<br />', 'center' ) , |
a74103dd |
85 | '', $color[0] ) , |
a73a2136 |
86 | 'center', $color[4], 'width="50%" cellpadding="2" cellspacing="0" border="0"' ); |
a2b193bc |
87 | |
5c4ff7bf |
88 | $oTemplate->display('footer.tpl'); |
a73a2136 |
89 | ?> |