Source for file webmail.php

Documentation is available at webmail.php

  1. <?php
  2. /**
  3. * webmail.php -- Displays the main frameset
  4. *
  5. * This file generates the main frameset. The files that are
  6. * shown can be given as parameters. If the user is not logged in
  7. * this file will verify username and password.
  8. *
  9. * @copyright 1999-2020 The SquirrelMail Project Team
  10. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  11. * @version $Id: webmail.php 14845 2020年01月07日 08:09:34Z pdontthink $
  12. * @package squirrelmail
  13. */
  14. /** This is the webmail page */
  15. define ('PAGE_NAME', 'webmail');
  16. /**
  17. * Include the SquirrelMail initialization file.
  18. */
  19. require('../include/init.php');
  20. if (sqgetGlobalVar ('sort', $sort)) {
  21. $sort = (int) $sort;
  22. }
  23. if (sqgetGlobalVar ('startMessage', $startMessage)) {
  24. $startMessage = (int) $startMessage;
  25. }
  26. if (!sqgetGlobalVar ('mailbox', $mailbox)) {
  27. $mailbox = 'INBOX';
  28. }
  29. sqgetGlobalVar ('right_frame', $right_frame, SQ_GET );
  30. if (sqgetGlobalVar ('mailtodata', $mailtodata)) {
  31. $mailtourl = 'mailtodata='.urlencode ($mailtodata);
  32. } else {
  33. $mailtourl = '';
  34. }
  35. // Determine the size of the left frame
  36. $left_size = getPref ($data_dir, $username, 'left_size');
  37. if ($left_size == "") {
  38. if (isset($default_left_size)) {
  39. $left_size = $default_left_size;
  40. }
  41. else {
  42. $left_size = 200;
  43. }
  44. }
  45. // Determine where the navigation frame should be
  46. $location_of_bar = getPref ($data_dir, $username, 'location_of_bar');
  47. if (isset($languages[$squirrelmail_language]['DIR']) &&
  48. strtolower ($languages[$squirrelmail_language]['DIR']) == 'rtl') {
  49. $temp_location_of_bar = 'right';
  50. } else {
  51. $temp_location_of_bar = 'left';
  52. }
  53. if ($location_of_bar == '') {
  54. $location_of_bar = $temp_location_of_bar;
  55. }
  56. // this value may be changed by a plugin, but initialize
  57. // it first to avoid register_globals headaches
  58. //
  59. $right_frame_url = '';
  60. do_hook ('webmail_top', $null);
  61. // Determine the main frame URL
  62. /*
  63. * There are three ways to call webmail.php
  64. * 1. webmail.php
  65. * - This just loads the default entry screen.
  66. * 2. webmail.php?right_frame=right_main.php&sort=X&startMessage=X&mailbox=XXXX
  67. * - This loads the frames starting at the given values.
  68. * 3. webmail.php?right_frame=folders.php
  69. * - Loads the frames with the Folder options in the right frame.
  70. *
  71. * This was done to create a pure HTML way of refreshing the folder list since
  72. * we would like to use as little Javascript as possible.
  73. *
  74. * The test for // should catch any attempt to include off-site webpages into
  75. * our frameset.
  76. *
  77. * Note that plugins are allowed to completely and freely override the URI
  78. * used for the "right" (content) frame, and they do so by modifying the
  79. * global variable $right_frame_url.
  80. *
  81. */
  82. if (empty($right_frame) || (strpos (urldecode ($right_frame), '//') !== false)) {
  83. $right_frame = '';
  84. }
  85. if ( strpos ($right_frame,'?') ) {
  86. $right_frame_file = substr ($right_frame,0,strpos ($right_frame,'?'));
  87. } else {
  88. $right_frame_file = $right_frame;
  89. }
  90. if (empty($right_frame_url)) {
  91. switch($right_frame) {
  92. case 'right_main.php':
  93. $right_frame_url = "right_main.php?mailbox=".urlencode ($mailbox)
  94. . (!empty($sort)?"&amp;sort=$sort":'')
  95. . (!empty($startMessage)?"&amp;startMessage=$startMessage":'');
  96. break;
  97. case 'options.php':
  98. $right_frame_url = 'options.php';
  99. break;
  100. case 'folders.php':
  101. $right_frame_url = 'folders.php';
  102. break;
  103. case 'compose.php':
  104. $right_frame_url = 'compose.php?' . $mailtourl;
  105. break;
  106. case '':
  107. $right_frame_url = 'right_main.php';
  108. break;
  109. default:
  110. $right_frame_url = urlencode ($right_frame);
  111. break;
  112. }
  113. }
  114. $oErrorHandler->setDelayedErrors(true);
  115. $oTemplate->assign('nav_size', $left_size);
  116. $oTemplate->assign('nav_on_left', $location_of_bar=='left');
  117. $oTemplate->assign('right_frame_url', $right_frame_url);
  118. displayHtmlHeader ($org_title, '', false, true);
  119. $oTemplate->display('webmail.tpl');

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

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