Source for file signout.php

Documentation is available at signout.php

  1. <?php
  2. /**
  3. * signout.php -- cleans up session and logs the user out
  4. *
  5. * Cleans up after the user. Resets cookies and terminates session.
  6. *
  7. * @copyright 1999-2020 The SquirrelMail Project Team
  8. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  9. * @version $Id: signout.php 14840 2020年01月07日 07:42:38Z pdontthink $
  10. * @package squirrelmail
  11. */
  12. /** This is the signout page */
  13. define ('PAGE_NAME', 'signout');
  14. /**
  15. * Path for SquirrelMail required files.
  16. * @ignore
  17. */
  18. define ('SM_PATH','../');
  19. require_once(SM_PATH . 'include/validate.php');
  20. require_once(SM_PATH . 'functions/prefs.php');
  21. require_once(SM_PATH . 'functions/plugin.php');
  22. require_once(SM_PATH . 'functions/strings.php');
  23. require_once(SM_PATH . 'functions/html.php');
  24. /* Erase any lingering attachments */
  25. sqgetGlobalVar ('compose_messages', $compose_messages, SQ_SESSION );
  26. if (!empty($compose_messages) && is_array ($compose_messages)) {
  27. foreach($compose_messages as $composeMessage) {
  28. $composeMessage->purgeAttachments();
  29. }
  30. }
  31. if (!isset($frame_top)) {
  32. $frame_top = '_top';
  33. }
  34. /* If a user hits reload on the last page, $base_uri isn't set
  35. * because it was deleted with the session. */
  36. if (! sqgetGlobalVar ('base_uri', $base_uri, SQ_SESSION ) ) {
  37. require_once(SM_PATH . 'functions/display_messages.php');
  38. }
  39. do_hook ('logout');
  40. if ($signout_page) {
  41. // Status 303 header is disabled. PHP fastcgi bug. See 1.91 changelog.
  42. //header('Status: 303 See Other');
  43. header ("Location: $signout_page");
  44. exit; /* we send no content if we're redirecting. */
  45. }
  46. /* internal gettext functions will fail, if language is not set */
  47. set_up_language ($squirrelmail_language, true, true);
  48. ?>
  49. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  50. <html>
  51. <head>
  52. <meta name="robots" content="noindex,nofollow">
  53. <?php
  54. // For adding a favicon or anything else that should be inserted in *ALL* <head> for *ALL* documents,
  55. // define $head_tag_extra in config/config_local.php
  56. // The string "###SM BASEURI###" will be replaced with the base URI for this SquirrelMail installation.
  57. // When not defined, a default is provided that displays the default favicon.ico.
  58. // If you override this and still want to use the default favicon.ico, you'll have to include the following
  59. // following in your $head_tag_extra string:
  60. // $head_tag_extra = '<link rel="shortcut icon" href="###SM BASEURI###favicon.ico" />...<YOUR CONTENT HERE>...';
  61. //
  62. global $head_tag_extra;
  63. echo (empty($head_tag_extra) ? '<link rel="shortcut icon" href="' . sqm_baseuri () . 'favicon.ico" />'
  64. : str_replace ('###SM BASEURI###', sqm_baseuri (), $head_tag_extra));
  65. if ($theme_css != '') {
  66. ?>
  67. <link rel="stylesheet" type="text/css" href="<?php echo $theme_css; ?>">
  68. <?php
  69. }
  70. ?>
  71. <title><?php echo $org_title . ' - ' . _ ("Signout"); ?></title>
  72. </head>
  73. <body text="<?php echo $color[8]; ?>" bgcolor="<?php echo $color[4]; ?>"
  74. link="<?php echo $color[7]; ?>" vlink="<?php echo $color[7]; ?>"
  75. alink="<?php echo $color[7]; ?>">
  76. <br /><br />
  77. <?php
  78. $plugin_message = concat_hook_function ('logout_above_text');
  79. echo
  80. html_tag ( 'table',
  81. html_tag ( 'tr',
  82. html_tag ( 'th', _ ("Sign Out"), 'center' ) ,
  83. '', $color[0], 'width="100%"' ) .
  84. $plugin_message .
  85. html_tag ( 'tr',
  86. html_tag ( 'td', _ ("You have been successfully signed out.") .
  87. '<br /><a href="login.php" target="' . $frame_top . '">' .
  88. _ ("Click here to log back in.") . '</a><br />' ,
  89. 'center' ) ,
  90. '', $color[4], 'width="100%"' ) .
  91. html_tag ( 'tr',
  92. html_tag ( 'td', '<br />', 'center' ) ,
  93. '', $color[0], 'width="100%"' ) ,
  94. 'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' )
  95. ?>
  96. </body>
  97. </html>

Documentation generated on 2020年1月13日 04:25:20 +0100 by phpDocumentor 1.4.3

AltStyle によって変換されたページ (->オリジナル) /