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 &copy; 1999-2006 The SquirrelMail Project Team
  9.  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10.  * @version $Id: signout.php,v 1.66.2.13 2006/07/30 19:37:38 tokul Exp $
  11.  * @package squirrelmail
  12.  */
  13.  
  14. /**
  15.  * Path for SquirrelMail required files.
  16.  * @ignore
  17.  */
  18. define('SM_PATH','../');
  19.  
  20. require_once(SM_PATH 'include/validate.php');
  21. require_once(SM_PATH 'functions/prefs.php');
  22. require_once(SM_PATH 'functions/plugin.php');
  23. require_once(SM_PATH 'functions/strings.php');
  24. require_once(SM_PATH 'functions/html.php');
  25.  
  26. /* Erase any lingering attachments */
  27. sqgetGlobalVar('compose_messages',  $compose_messages,  SQ_SESSION);
  28. if (!empty($compose_messages&& is_array($compose_messages)) {
  29.     foreach($compose_messages as $composeMessage{
  30.         $composeMessage->purgeAttachments();
  31.     }
  32. }
  33.  
  34. if (!isset($frame_top)) {
  35.     $frame_top '_top';
  36. }
  37.  
  38. /* If a user hits reload on the last page, $base_uri isn't set
  39.  * because it was deleted with the session. */
  40. if (sqgetGlobalVar('base_uri'$base_uriSQ_SESSION) ) {
  41.     require_once(SM_PATH 'functions/display_messages.php');
  42.     $base_uri sqm_baseuri();
  43. }
  44.  
  45. do_hook('logout');
  46.  
  47.  
  48. if ($signout_page{
  49.     // Status 303 header is disabled. PHP fastcgi bug. See 1.91 changelog.
  50.     //header('Status: 303 See Other');
  51.         header("Location$signout_page");
  52.     exit/* we send no content if we're redirecting. */
  53. }
  54.  
  55. /* internal gettext functions will fail, if language is not set */
  56. set_up_language($squirrelmail_languagetruetrue);
  57. ?>
  58. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  59. <html>
  60. <head>
  61.    <meta name="robots" content="noindex,nofollow">
  62. <?php
  63.     if ($theme_css != ''{
  64. ?>
  65.    <link rel="stylesheet" type="text/css" href="<?php echo $theme_css?>" />
  66. <?php
  67.     }
  68. ?>
  69.    <title><?php echo $org_title ' - ' _("Signout")?></title>
  70. </head>
  71. <body text="<?php echo $color[8]?>" bgcolor="<?php echo $color[4]?>"
  72. link="<?php echo $color[7]?>" vlink="<?php echo $color[7]?>"
  73. alink="<?php echo $color[7]?>">
  74. <br /><br />
  75. <?php
  76. $plugin_message concat_hook_function('logout_above_text');
  77. echo
  78. html_tag'table',
  79.     html_tag'tr',
  80.          html_tag'th'_("Sign Out")'center' ,
  81.     ''$color[0]'width="100%"' .
  82.     $plugin_message .
  83.     html_tag'tr',
  84.          html_tag'td'_("You have been successfully signed out.".
  85.              '<br /><a href="login.php" target="' $frame_top '">' .
  86.              _("Click here to log back in."'</a><br />' ,
  87.          'center' ,
  88.     ''$color[4]'width="100%"' .
  89.     html_tag'tr',
  90.          html_tag'td''<br />''center' ,
  91.     ''$color[0]'width="100%"' ,
  92. 'center'$color[4]'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' )
  93. ?>
  94. </body>
  95. </html>

Documentation generated on Sat, 07 Oct 2006 16:33:40 +0300 by phpDocumentor 1.3.0RC6