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