Source for file signout.php

Documentation is available at signout.php

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

Documentation generated on Mon, 13 Jan 2020 04:25:20 +0100 by phpDocumentor 1.4.3