X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsignout.php;h=6e5fc5183802da03d8a78a2ca074770cc3058ce2;hb=c8bd2d5acd59c8ab335a7c75ded5bf15bda79d4a;hp=84e693d073732b1fda7f976cbe116dc473db6851;hpb=5218b2823717b3d99bfbe440df933ff1795203e9;p=squirrelmail.git diff --git a/src/signout.php b/src/signout.php index 84e693d0..6e5fc518 100644 --- a/src/signout.php +++ b/src/signout.php @@ -1,92 +1,89 @@ purgeAttachments(); + } +} - $squirrelmail_language = getPref ($data_dir, $username, "language"); - if (isset($squirrelmail_language)) { - if ($squirrelmail_language != "en" && $squirrelmail_language != "") { - putenv("LC_ALL=".$squirrelmail_language); - bindtextdomain("squirrelmail", "../locale/"); - textdomain("squirrelmail"); - header ("Content-Type: text/html; charset=".$languages[$squirrelmail_language]["CHARSET"]); +if (!isset($frame_top)) { + $frame_top = '_top'; +} - // Setting cookie to use on the login screen the next time the - // same user logs in. - setcookie("squirrelmail_language", $squirrelmail_language, - time()+2592000); +/* If a user hits reload on the last page, $base_uri isn't set + * because it was deleted with the session. */ +if (! sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) { + $base_uri = sqm_baseuri(); +} - } - } +do_hook('logout'); - do_hook("logout"); - setcookie("username", "", 0, $base_uri); - setcookie("key", "", 0, $base_uri); - setcookie("logged_in", "", 0, $base_uri); - session_destroy(); +sqsession_destroy(); + +if ($signout_page) { + header('Status: 303 See Other'); + header("Location: $signout_page"); + exit; /* we send no content if we're redirecting. */ +} + +/* internal gettext functions will fail, if language is not set */ +set_up_language($squirrelmail_language, true, true); +?> + + + + - - + ', - $theme_css); - echo "\n"; - } - echo "$title - Signout\n"; - echo "\n"; - echo "

"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo " "; - echo _("Sign Out"); - echo ""; - echo "
"; - echo "
"; - echo _("You have been successfully signed out."); - echo "
"; - echo ""; - echo _("Click here to log back in."); - echo "

"; - echo "
"; - echo "
"; - echo "
"; - echo "

"; + } +?> + + <?php echo $org_title . ' - ' . _("Signout"); ?> + + +

+' . + _("Click here to log back in.") . '
' , + 'center' ) , + '', $color[4] ) . + html_tag( 'tr', + html_tag( 'td', '
', 'center' ) , + '', $color[0] ) , +'center', $color[4], 'width="50%" cellpadding="2" cellspacing="0" border="0"' ); + +$oTemplate->display('footer.tpl'); ?> - -