Explorar el Código

Code cleanup brigage...

thomppj hace 23 años
padre
commit
5d15361f1f
Se han modificado 69 ficheros con 2092 adiciones y 1170 borrados
  1. 46 30
      functions/abook_database.php
  2. 38 22
      functions/abook_global_file.php
  3. 44 28
      functions/abook_ldap_server.php
  4. 38 22
      functions/abook_local_file.php
  5. 45 32
      functions/addressbook.php
  6. 27 12
      functions/array.php
  7. 29 13
      functions/attachment_common.php
  8. 28 12
      functions/auth.php
  9. 34 18
      functions/constants.php
  10. 33 17
      functions/date.php
  11. 51 35
      functions/db_prefs.php
  12. 29 14
      functions/display_messages.php
  13. 33 17
      functions/gettext.php
  14. 34 18
      functions/i18n.php
  15. 17 17
      functions/imap.php
  16. 35 19
      functions/imap_general.php
  17. 31 15
      functions/imap_mailbox.php
  18. 31 15
      functions/imap_messages.php
  19. 33 18
      functions/imap_search.php
  20. 16 16
      functions/index.php
  21. 31 15
      functions/mailbox_display.php
  22. 43 28
      functions/mime.php
  23. 10 10
      functions/options.php
  24. 31 15
      functions/page_header.php
  25. 32 17
      functions/plugin.php
  26. 33 17
      functions/prefs.php
  27. 32 16
      functions/smtp.php
  28. 33 17
      functions/strings.php
  29. 33 19
      functions/tree.php
  30. 32 16
      functions/url_parser.php
  31. 16 15
      index.php
  32. 27 26
      src/addrbook_popup.php
  33. 33 17
      src/addrbook_search.php
  34. 39 23
      src/addrbook_search_html.php
  35. 32 16
      src/addressbook.php
  36. 40 24
      src/compose.php
  37. 30 14
      src/delete_message.php
  38. 35 19
      src/download.php
  39. 26 11
      src/draft_actions.php
  40. 33 17
      src/empty_trash.php
  41. 34 18
      src/folders.php
  42. 31 15
      src/folders_create.php
  43. 31 15
      src/folders_delete.php
  44. 29 13
      src/folders_rename_do.php
  45. 29 13
      src/folders_rename_getname.php
  46. 30 14
      src/folders_subscribe.php
  47. 32 16
      src/help.php
  48. 30 15
      src/image.php
  49. 13 13
      src/index.php
  50. 34 18
      src/left_main.php
  51. 29 19
      src/load_prefs.php
  52. 30 14
      src/login.php
  53. 29 13
      src/move_messages.php
  54. 12 12
      src/options.php
  55. 10 10
      src/options_display.php
  56. 10 10
      src/options_folder.php
  57. 30 14
      src/options_identities.php
  58. 33 17
      src/options_order.php
  59. 10 10
      src/options_personal.php
  60. 36 21
      src/printer_friendly_bottom.php
  61. 26 10
      src/printer_friendly_main.php
  62. 33 17
      src/printer_friendly_top.php
  63. 33 17
      src/read_body.php
  64. 35 19
      src/redirect.php
  65. 35 19
      src/retrievalerror.php
  66. 28 13
      src/search.php
  67. 29 14
      src/signout.php
  68. 27 14
      src/validate.php
  69. 31 15
      src/vcard.php

+ 46 - 30
functions/abook_database.php

@@ -1,36 +1,52 @@
 <?php {
    
-   /**
-    *   abook_database.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Backend for personal addressbook stored in a database,
-    *   accessed using the DB-classes in PEAR.
-    *
-    *   IMPORTANT:  The PEAR modules must be in the include path
-    *   for this class to work.
-    *
-    *   An array with the following elements must be passed to
-    *   the class constructor (elements marked ? are optional):
-    *
-    *      dsn       => database DNS (see PEAR for syntax)
-    *      table     => table to store addresses in (must exist)
-    *      owner     => current user (owner of address data)
-    *    ? writeable => set writeable flag (true/false)
-    *
-    *  The table used should have the following columns:
-    *   owner, nickname, firstname, lastname, email, label
-    *  The pair (owner,nickname) should be unique (primary key).
-    *
-    *   NOTE. This class should not be used directly. Use the
-    *         "AddressBook" class instead.
-    *
-    *  $Id$
-    */
+/**
+ * abook_database.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Backend for personal addressbook stored in a database,
+ * accessed using the DB-classes in PEAR.
+ *
+ * IMPORTANT:  The PEAR modules must be in the include path
+ * for this class to work.
+ *
+ * An array with the following elements must be passed to
+ * the class constructor (elements marked ? are optional):
+ *
+ *    dsn       => database DNS (see PEAR for syntax)
+ *    table     => table to store addresses in (must exist)
+ *    owner     => current user (owner of address data)
+ *  ? writeable => set writeable flag (true/false)
+ *
+ * The table used should have the following columns:
+ * owner, nickname, firstname, lastname, email, label
+ * The pair (owner,nickname) should be unique (primary key).
+ *
+ *  NOTE. This class should not be used directly. Use the
+ *        "AddressBook" class instead.
+ *
+ * $Id$
+ */
    
-   require_once('DB.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('DB.php');
    
    class abook_database extends addressbook_backend {
       var $btype = 'local';

+ 38 - 22
functions/abook_global_file.php

@@ -1,27 +1,43 @@
 <?php
 
-   /**
-    *   abook_local_file.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Backend for addressbook as a pipe separated file
-    *
-    *   An array with the following elements must be passed to
-    *   the class constructor (elements marked ? are optional):
-    *
-    *   NOTE. This class should not be used directly. Use the
-    *         "AddressBook" class instead.
-    *
-    *   Make sure you configure this before using it!
-    *
-    *  $Id$
-    */
-
-   class abook_global_file extends addressbook_backend {
-     var $btype = 'local';
-     var $bname = 'global_file';
+/**
+ * abook_local_file.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Backend for addressbook as a pipe separated file
+ *
+ * An array with the following elements must be passed to
+ * the class constructor (elements marked ? are optional):
+ *
+ * NOTE. This class should not be used directly. Use the
+ *       "AddressBook" class instead.
+ *
+ * Make sure you configure this before using it!
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the class definition below.        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+class abook_global_file extends addressbook_backend {
+    var $btype = 'local';
+    var $bname = 'global_file';
 
      var $filehandle = 0;
 

+ 44 - 28
functions/abook_ldap_server.php

@@ -1,33 +1,49 @@
 <?php
 
-   /**
-    *   abook_ldap_server.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Address book backend for LDAP server
-    *
-    *   An array with the following elements must be passed to
-    *   the class constructor (elements marked ? are optional):
-    *
-    *      host      => LDAP server hostname/IP-address
-    *      base      => LDAP server root (base dn). Empty string allowed.
-    *    ? port      => LDAP server TCP port number (default: 389)
-    *    ? charset   => LDAP server charset (default: utf-8)
-    *    ? name      => Name for LDAP server (default "LDAP: hostname")
-    *                   Used to tag the result data
-    *    ? maxrows   => Maximum # of rows in search result
-    *    ? timeout   => Timeout for LDAP operations (in seconds, default: 30)
-    *                   Might not work for all LDAP libraries or servers.
-    *
-    *   NOTE. This class should not be used directly. Use the
-    *         "AddressBook" class instead.
-    *
-    *  $Id$
-    */
-
-   class abook_ldap_server extends addressbook_backend {
+/**
+ * abook_ldap_server.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Address book backend for LDAP server
+ *
+ * An array with the following elements must be passed to
+ * the class constructor (elements marked ? are optional):
+ *
+ *    host      => LDAP server hostname/IP-address
+ *    base      => LDAP server root (base dn). Empty string allowed.
+ *  ? port      => LDAP server TCP port number (default: 389)
+ *  ? charset   => LDAP server charset (default: utf-8)
+ *  ? name      => Name for LDAP server (default "LDAP: hostname")
+ *                 Used to tag the result data
+ *  ? maxrows   => Maximum # of rows in search result
+ *  ? timeout   => Timeout for LDAP operations (in seconds, default: 30)
+ *                 Might not work for all LDAP libraries or servers.
+ *
+ * NOTE. This class should not be used directly. Use the
+ *       "AddressBook" class instead.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the class definition below.        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+class abook_ldap_server extends addressbook_backend {
      var $btype = 'remote';
      var $bname = 'ldap_server';
 

+ 38 - 22
functions/abook_local_file.php

@@ -1,27 +1,43 @@
 <?php
 
-   /**
-    *   abook_local_file.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Backend for addressbook as a pipe separated file
-    *
-    *   An array with the following elements must be passed to
-    *   the class constructor (elements marked ? are optional):
-    *
-    *      filename  => path to addressbook file
-    *    ? create    => if true: file is created if it does not exist.
-    *    ? umask     => umask set before opening file.
-    *
-    *   NOTE. This class should not be used directly. Use the
-    *         "AddressBook" class instead.
-    *
-    *  $Id$
-    */
-
-   class abook_local_file extends addressbook_backend {
+/**
+ * abook_local_file.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Backend for addressbook as a pipe separated file
+ *
+ * An array with the following elements must be passed to
+ * the class constructor (elements marked ? are optional):
+ *
+ *    filename  => path to addressbook file
+ *  ? create    => if true: file is created if it does not exist.
+ *  ? umask     => umask set before opening file.
+ *
+ * NOTE. This class should not be used directly. Use the
+ *       "AddressBook" class instead.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the class definition below.        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+class abook_local_file extends addressbook_backend {
      var $btype = 'local';
      var $bname = 'local_file';
 

+ 45 - 32
functions/addressbook.php

@@ -1,37 +1,50 @@
 <?php
 
-   /**
-    *   addressbook.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Functions and classes for the addressbook system.
-    *
-    *   $Id$
-    */
-
-
-   // This is the path to the global site-wide addressbook.
-   // It looks and feels just like a user's .abook file
-   // If this is in the data directory, use "$data_dir/global.abook"
-   // If not, specify the path as though it was accessed from the
-   // src/ directory ("../global.abook" -> in main directory)
-   //
-   // If you don't want a global site-wide addressbook, comment these
-   // two lines out.  (They are disabled by default.)
-   //
-   // The global addressbook is unmodifiable by anyone.  You must actually
-   // use a shell script or whatnot to modify the contents.
-   //
-   //global $data_dir;
-   //$address_book_global_filename = "$data_dir/global.abook";
-
-
-
-   // Include backends here.
-   require_once('../functions/abook_local_file.php');
-   require_once('../functions/abook_ldap_server.php');
+/**
+ * addressbook.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Functions and classes for the addressbook system.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+// This is the path to the global site-wide addressbook.
+// It looks and feels just like a user's .abook file
+// If this is in the data directory, use "$data_dir/global.abook"
+// If not, specify the path as though it was accessed from the
+// src/ directory ("../global.abook" -> in main directory)
+//
+// If you don't want a global site-wide addressbook, comment these
+// two lines out.  (They are disabled by default.)
+//
+// The global addressbook is unmodifiable by anyone.  You must actually
+// use a shell script or whatnot to modify the contents.
+//
+//global $data_dir;
+//$address_book_global_filename = "$data_dir/global.abook";
+
+// Include backends here.
+require_once('../functions/abook_local_file.php');
+require_once('../functions/abook_ldap_server.php');
 
    // Use this if you wanna have a global address book
    if (isset($address_book_global_filename))

+ 27 - 12
functions/array.php

@@ -1,19 +1,34 @@
 <?php
 
-   /**
-    *  array.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *  This contains functions that work with array manipulation.  They
-    *  will help sort, and do other types of things with arrays
-    *
-    *   $Id$
-    */
+/**
+ * array.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This contains functions that work with array manipulation.  They
+ * will help sort, and do other types of things with arrays
+ *
+ * $Id$
+ */
 
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the function definition below.     ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
 
-   function ary_sort($ary,$col, $dir = 1){
+function ary_sort($ary,$col, $dir = 1){
       // The globals are used because USORT determines what is passed to comp2
       // These should be $this->col and $this->dir in a class
       // Would beat using globals

+ 29 - 13
functions/attachment_common.php

@@ -1,18 +1,34 @@
 <?php
 
-   /**
-    *  attachment_common.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *  This file provides the handling of often-used attachment types.
-    *
-    *  $Id$
-    */
-
-  global $attachment_common_show_images_list;
-  $attachment_common_show_images_list = array();
+/**
+ * attachment_common.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This file provides the handling of often-used attachment types.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the $attachment_common_show_images_list stuff below. ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+global $attachment_common_show_images_list;
+$attachment_common_show_images_list = array();
 
   global $FileExtensionToMimeType, $attachment_common_types;
   $FileExtensionToMimeType = array('bmp'  => 'image/x-bitmap',

+ 28 - 12
functions/auth.php

@@ -1,17 +1,33 @@
 <?php
 
-   /**
-    *  auth.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *  Contains functions used to do authentication.
-    *
-    *  $Id$
-    */
-
-    require_once( '../functions/page_header.php' );
+/**
+ * auth.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Contains functions used to do authentication.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below.                              ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once( '../functions/page_header.php' );
 
     function is_logged_in () {
         global $squirrelmail_language;

+ 34 - 18
functions/constants.php

@@ -1,23 +1,39 @@
 <?php
 
-    /**
-     *  constants.php
-     *
-     *  Copyright (c) 1999-2001 The SquirrelMail Development Team
-     *  Licensed under the GNU GPL. For full terms see the file COPYING.
-     *
-     *  Loads constants used by the rest of the Squirrelmail source.
-     *  This file is include by src/login.php, src/redirect.php and
-     *  src/load_prefs.php.
-     *
-     *  $Id$
-     */
-
-    /**************************************************************/
-    /* Set values for constants used by Squirrelmail preferences. */
-    /**************************************************************/
-
-    require_once( '../functions/plugin.php' );      // Required for the hook
+/**
+ * constants.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Loads constants used by the rest of the Squirrelmail source.
+ * This file is include by src/login.php, src/redirect.php and
+ * src/load_prefs.php.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below.                              ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once( '../functions/plugin.php' );      // Required for the hook
+
+/**************************************************************/
+/* Set values for constants used by Squirrelmail preferences. */
+/**************************************************************/
 
     /* Define basic, general purpose preference constants. */
     define('SMPREF_NO', 0);

+ 33 - 17
functions/date.php

@@ -1,21 +1,37 @@
 <?php
 
-   /**
-    *   date.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Takes a date and parses it into a usable format.  The form that a
-    *   date SHOULD arrive in is:
-    *         <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
-    *   (as specified in RFC 822) -- 'Tue' is optional
-    *
-    *   $Id$
-    */
-
-   // corrects a time stamp to be the local time
-   function getGMTSeconds($stamp, $gmt) {
+/**
+ * date.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Takes a date and parses it into a usable format.  The form that a
+ * date SHOULD arrive in is:
+ *       <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
+ * (as specified in RFC 822) -- 'Tue' is optional
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the function definition below.     ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+// corrects a time stamp to be the local time
+function getGMTSeconds($stamp, $gmt) {
       global $invert_time;
       if (($gmt == 'Pacific') || ($gmt == 'PST'))
          $gmt = '-0800';
@@ -252,4 +268,4 @@
       return ($mtime);
    }
 */
-?>
+?>

+ 51 - 35
functions/db_prefs.php

@@ -1,39 +1,55 @@
 <?php
-   /**
-    *   db_prefs.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This contains functions for manipulating user preferences
-    *   stored in a database, accessed though the Pear DB layer.
-    *
-    *   To use this instead of the regular prefs.php, create a
-    *   database as described below, and replace prefs.php
-    *   with this file.
-    *
-    *   Database:
-    *   ---------
-    *
-    *   The preferences table should have tree columns:
-    *      username   char  \  primary
-    *      prefkey    char  /  key
-    *      prefval    blob
-    *
-    *     CREATE TABLE userprefs (user CHAR(32) NOT NULL DEFAULT '',
-    *                             prefkey CHAR(64) NOT NULL DEFAULT '',
-    *                             prefval BLOB NOT NULL DEFAULT '',
-    *                             primary key (user,prefkey));
-    *
-    *   Configuration of databasename, username and password is done
-    *   by changing $DSN below.
-    *
-    *   $Id$
-    */
-
-   require_once('DB.php');
-
-   class dbPrefs {
+/**
+ * db_prefs.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This contains functions for manipulating user preferences
+ * stored in a database, accessed though the Pear DB layer.
+ *
+ * To use this instead of the regular prefs.php, create a
+ * database as described below, and replace prefs.php
+ * with this file.
+ *
+ * Database:
+ * ---------
+ *
+ * The preferences table should have tree columns:
+ *    username   char  \  primary
+ *    prefkey    char  /  key
+ *    prefval    blob
+ *
+ *   CREATE TABLE userprefs (user CHAR(32) NOT NULL DEFAULT '',
+ *                           prefkey CHAR(64) NOT NULL DEFAULT '',
+ *                           prefval BLOB NOT NULL DEFAULT '',
+ *                           primary key (user,prefkey));
+ *
+ * Configuration of databasename, username and password is done
+ * by changing $DSN below.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below.                              ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('DB.php');
+
+class dbPrefs {
       var $DSN   = 'mysql://user@host/database';
       var $table = 'userprefs';
 

+ 29 - 14
functions/display_messages.php

@@ -1,20 +1,35 @@
 <?php
 
-   /**
-    *   display_messages.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This contains all messages, including information, error, and just
-    *   about any other message you can think of.
-    *
-    *  $Id$
-    */
+/**
+ * display_messages.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This contains all messages, including information, error, and just
+ * about any other message you can think of.
+ *
+ * $Id$
+ */
 
-    function error_username_password_incorrect($color) {
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the function definition below.     ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
 
-        echo '<BR>'.
+function error_username_password_incorrect($color) {
+    echo '<BR>'.
                 "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
                 '<TR>'.
                     "<TD BGCOLOR=\"$color[0]\">".
@@ -91,4 +106,4 @@
       echo '   </TD></TR>';
       echo '</TABLE>';
     }
-?>
+?>

+ 33 - 17
functions/gettext.php

@@ -1,23 +1,39 @@
 <?PHP
 
-   /**
-    *   gettext.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Alternate to the system's built-in gettext.
-    *   relies on .po files (can't read .mo easily).
-    *   Uses the session for caching (speed increase)
-    *   Possible use in other PHP scripts?  The only SM-specific thing is
-    *     $sm_language, I think
-    *
-    *  $Id$
-    */
+/**
+ * gettext.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Alternate to the system's built-in gettext.
+ * relies on .po files (can't read .mo easily).
+ * Uses the session for caching (speed increase)
+ * Possible use in other PHP scripts?  The only SM-specific thing is
+ *   $sm_language, I think
+ *
+ * $Id$
+ */
 
-   global $gettext_php_domain, $gettext_php_dir, $gettext_php_loaded,
-      $gettext_php_translateStrings, $gettext_php_loaded_language,
-      $gettext_php_short_circuit;
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the global definition below.                         ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+global $gettext_php_domain, $gettext_php_dir, $gettext_php_loaded,
+       $gettext_php_translateStrings, $gettext_php_loaded_language,
+       $gettext_php_short_circuit;
    
    if (! isset($gettext_php_loaded)) {
       $gettext_php_loaded = false;

+ 34 - 18
functions/i18n.php

@@ -1,22 +1,38 @@
 <?php
 
-   /**
-    *  i18n.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *  This file contains variuos functions that are needed to do
-    *  internationalization of SquirrelMail.
-    *
-    *  Internally the output character set is used. Other characters are
-    *  encoded using Unicode entities according to HTML 4.0.
-    *
-    *  $Id$
-    */
-
-   global $squirrelmail_language, $languages;
-   if (! isset($squirrelmail_language)) { $squirrelmail_language = ''; }
+/**
+ * i18n.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This file contains variuos functions that are needed to do
+ * internationalization of SquirrelMail.
+ *
+ * Internally the output character set is used. Other characters are
+ * encoded using Unicode entities according to HTML 4.0.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the global definition below.                         ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+global $squirrelmail_language, $languages;
+if (! isset($squirrelmail_language)) { $squirrelmail_language = ''; }
 
    // This array specifies the available languages.
    $languages['ca']['NAME']    = 'Catalan';
@@ -881,4 +897,4 @@
      if ($my_charset) $default_charset=$my_charset;
    }
 
-?>
+?>

+ 17 - 17
functions/imap.php

@@ -1,22 +1,22 @@
 <?php
 
-   /**
-    *   imap.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This just includes the different sections of the imap functions.
-    *   They have been organized into these sections for simplicity sake.
-    *
-    *   $Id$
-    */
+/**
+ * imap.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This just includes the different sections of the imap functions.
+ * They have been organized into these sections for simplicity sake.
+ *
+ * $Id$
+ */
 
-   $imap_backend = 'imap';
+$imap_backend = 'imap';
 
-   require_once('../functions/' . $imap_backend . '_mailbox.php');
-   require_once('../functions/' . $imap_backend . '_messages.php');
-   require_once('../functions/' . $imap_backend . '_general.php');
-   require_once('../functions/' . $imap_backend . '_search.php');
+require_once('../functions/' . $imap_backend . '_mailbox.php');
+require_once('../functions/' . $imap_backend . '_messages.php');
+require_once('../functions/' . $imap_backend . '_general.php');
+require_once('../functions/' . $imap_backend . '_search.php');
 
-?>
+?>

+ 35 - 19
functions/imap_general.php

@@ -1,24 +1,40 @@
 <?php
 
-   /**
-    *   imap.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This implements all functions that do general imap functions.
-    *
-    *   $Id$
-    */
-
-    /**
-    * Unique SessionId
-    *
-    * Sets an unique session id in order to avoid simultanous sessions crash.
-    *
-    * @return	string	a 4 chars unique string
-    */
-    function sqimap_session_id() {
+/**
+ *   imap.php
+ *
+ *   Copyright (c) 1999-2001 The SquirrelMail Development Team
+ *   Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ *   This implements all functions that do general imap functions.
+ *
+ *   $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the function definition and comments start below.    ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+/**
+ * Unique SessionId
+ *
+ * Sets an unique session id in order to avoid simultanous sessions crash.
+ *
+ * @return	string	a 4 chars unique string
+ */
+function sqimap_session_id() {
 
         global $data_dir, $username;
 

+ 31 - 15
functions/imap_mailbox.php

@@ -1,20 +1,36 @@
 <?php
 
-   /**
-    *   imap_mailbox.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This impliments all functions that manipulate mailboxes
-    *
-    *   $Id$
-    */
-
-   /******************************************************************************
-    **  Expunges a mailbox 
-    ******************************************************************************/
-   function sqimap_mailbox_expunge ($imap_stream, $mailbox,$handle_errors = true) {
+/**
+ * imap_mailbox.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This impliments all functions that manipulate mailboxes
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the function definition starts below.                ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+/*************************
+ **  Expunges a mailbox **
+ *************************/
+function sqimap_mailbox_expunge ($imap_stream, $mailbox,$handle_errors = true) {
       fputs ($imap_stream, sqimap_session_id() . " EXPUNGE\r\n");
       $read = sqimap_read_data($imap_stream, sqimap_session_id(), $handle_errors, $response, $message);
    }

+ 31 - 15
functions/imap_messages.php

@@ -1,20 +1,36 @@
 <?php
 
-   /**
-    *   imap_messages.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This implements functions that manipulate messages
-    *
-    *   $Id$
-    */
-
-   /******************************************************************************
-    **  Copies specified messages to specified folder
-    ******************************************************************************/
-   function sqimap_messages_copy ($imap_stream, $start, $end, $mailbox) {
+/**
+ * imap_messages.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This implements functions that manipulate messages
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the function definition starts below.                ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+/****************************************************
+ **  Copies specified messages to specified folder **
+ ****************************************************/
+function sqimap_messages_copy ($imap_stream, $start, $end, $mailbox) {
       fputs ($imap_stream, sqimap_session_id() . " COPY $start:$end \"$mailbox\"\r\n");
       $read = sqimap_read_data ($imap_stream, sqimap_session_id(), true, $response, $message);
    }

+ 33 - 18
functions/imap_search.php

@@ -1,22 +1,37 @@
 <?php
 
-   /**
-    *   imap_search.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   IMAP search routines
-    *
-    *  $Id$
-    */
-
-
-    require_once('../functions/imap.php');
-    require_once('../functions/date.php');
-    require_once('../functions/array.php');
-    require_once('../functions/mailbox_display.php');
-    require_once('../functions/mime.php');
+/**
+ *   imap_search.php
+ *
+ *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+ *   Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ *   IMAP search routines
+ *
+ *  $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below.                              ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../functions/imap.php');
+require_once('../functions/date.php');
+require_once('../functions/array.php');
+require_once('../functions/mailbox_display.php');
+require_once('../functions/mime.php');
 
 
     function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$color) {
@@ -157,4 +172,4 @@
         }
     }
 
-?>
+?>

+ 16 - 16
functions/index.php

@@ -1,21 +1,21 @@
 <?php
 
-   /**
-    *  index.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This file simply takes any attempt to view source files
-    *   and sends those people to the login screen. At this
-    *   point no attempt is made to see if the person is logged
-    *   or not.
-    *
-    *   $Id$
-    */
+/**
+ *  index.php
+ *
+ *   Copyright (c) 1999-2001 The SquirrelMail Development Team
+ *   Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ *   This file simply takes any attempt to view source files
+ *   and sends those people to the login screen. At this
+ *   point no attempt is made to see if the person is logged
+ *   or not.
+ *
+ *   $Id$
+ */
 
-    header("Location:../index.php");
+header("Location:../index.php");
 
-    /** pretty impressive huh? **/
+/* pretty impressive huh? */
 
-?>
+?>

+ 31 - 15
functions/mailbox_display.php

@@ -1,20 +1,36 @@
 <?php
 
-   /**
-    *   mailbox_display.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This contains functions that display mailbox information, such as the
-    *   table row that has sender, date, subject, etc...
-    *
-    *   $Id$
-    */
-
-   define('PG_SEL_MAX', 10);  /* Default value for page_selector_max. */
-
-   function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start_msg, $where, $what) {
+/**
+ * mailbox_display.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This contains functions that display mailbox information, such as the
+ * table row that has sender, date, subject, etc...
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the function definition below.     ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+define('PG_SEL_MAX', 10);  /* Default value for page_selector_max. */
+
+function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start_msg, $where, $what) {
       global $checkall;
       global $color, $msgs, $msort;
       global $sent_folder, $draft_folder;

+ 43 - 28
functions/mime.php

@@ -1,33 +1,48 @@
 <?php
 
-   /**
-    *  mime.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *  This contains the functions necessary to detect and decode MIME
-    *  messages.
-    *
-    *  $Id$
-    */
-
-   require_once('../functions/imap.php');
-   require_once('../functions/attachment_common.php');
-
-   /** Setting up the objects that have the structure for the message **/
-
-   class msg_header {
-      /** msg_header contains generic variables for values that **/
-      /** could be in a header.                                 **/
-
-      var $type0 = '', $type1 = '', $boundary = '', $charset = '';
-      var $encoding = '', $size = 0, $to = array(), $from = '', $date = '';
-      var $cc = array(), $bcc = array(), $reply_to = '', $subject = '';
-      var $id = 0, $mailbox = '', $description = '', $filename = '';
-      var $entity_id = 0, $message_id = 0, $name = '';
-      // var $priority = "";
-   }
+/**
+ * mime.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This contains the functions necessary to detect and decode MIME
+ * messages.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below.                              ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../functions/imap.php');
+require_once('../functions/attachment_common.php');
+
+/** Setting up the objects that have the structure for the message **/
+class msg_header {
+    /** msg_header contains generic variables for values that **/
+    /** could be in a header.                                 **/
+
+    var $type0 = '', $type1 = '', $boundary = '', $charset = '';
+    var $encoding = '', $size = 0, $to = array(), $from = '', $date = '';
+    var $cc = array(), $bcc = array(), $reply_to = '', $subject = '';
+    var $id = 0, $mailbox = '', $description = '', $filename = '';
+    var $entity_id = 0, $message_id = 0, $name = '';
+    // var $priority = "";
+}
 
    class message {
       /** message is the object that contains messages.  It is a recursive

+ 10 - 10
functions/options.php

@@ -1,15 +1,15 @@
 <?php
 
-    /**
-     *  options.php
-     *
-     *  Copyright (c) 1999-2001 The Squirrelmail Development Team
-     *  Licensed under the GNU GPL. For full terms see the file COPYING.
-     *
-     *  Functions needed to display the options pages.
-     *
-     *  $Id$
-     */
+/**
+ * options.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Functions needed to display the options pages.
+ *
+ * $Id$
+ */
 
 /**********************************************/
 /* Define constants used in the options code. */

+ 31 - 15
functions/page_header.php

@@ -1,19 +1,35 @@
 <?php
 
-   /**
-    *   page_header.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   Prints the page header (duh)
-    *
-    *   $Id$
-    */
-
-   // Always set up the language before calling these functions
-
-   function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
+/**
+ * page_header.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Prints the page header (duh)
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the function definition below.     ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+// Always set up the language before calling these functions
+function displayHtmlHeader
+    ($title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
 
         global $theme_css;
 
@@ -85,4 +101,4 @@
       // echo "</td></tr></table>";
   }
 
-?>
+?>

+ 32 - 17
functions/plugin.php

@@ -1,21 +1,36 @@
 <?php
 
-   /**
-    *   plugin.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This file provides the framework for a plugin architecture.
-    *
-    *   Documentation on how to write plugins might show up some time.
-    *
-    *   $Id$
-    */
-
-    global $squirrelmail_plugin_hooks;
-
-    $squirrelmail_plugin_hooks = array();
+/**
+ * plugin.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This file provides the framework for a plugin architecture.
+ *
+ * Documentation on how to write plugins might show up some time.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the $squirrelmail_plugin_hooks stuff below.          ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+global $squirrelmail_plugin_hooks;
+squirrelmail_plugin_hooks = array();
 
     // This function adds a plugin
     function use_plugin ($name) {
@@ -58,4 +73,4 @@
         }
     }
 
-?>
+?>

+ 33 - 17
functions/prefs.php

@@ -1,21 +1,37 @@
 <?php
 
-   /**
-    *   prefs.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This contains functions for manipulating user preferences
-    *
-    *   $Id$
-    */
-
-   global $prefs_are_cached, $prefs_cache;
-   if (!session_is_registered('prefs_are_cached')) {
-      $prefs_are_cached = false;
-      $prefs_cache = array();
-   }
+/**
+ * prefs.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This contains functions for manipulating user preferences
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the $prefs_are_cached and $prefs_cache stuff below.  ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+global $prefs_are_cached, $prefs_cache;
+if (!session_is_registered('prefs_are_cached')) {
+    $prefs_are_cached = false;
+    $prefs_cache = array();
+}
 
    function cachePrefValues($data_dir, $username) {
        global $prefs_are_cached, $prefs_cache;
@@ -151,4 +167,4 @@
       return $sig;
    }
 
-?>
+?>

+ 32 - 16
functions/smtp.php

@@ -1,21 +1,37 @@
 <?php
 
-   /**
-    *   smtp.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *  This contains all the functions needed to send messages through
-    *  an smtp server or sendmail.
-    *
-    *  $Id$
-    */
-
-   require_once('../functions/addressbook.php');
-   require_once('../functions/plugin.php');
-
-   global $username, $popuser, $domain;
+/**
+ * smtp.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This contains all the functions needed to send messages through
+ * an smtp server or sendmail.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once and global lines below.             ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../functions/addressbook.php');
+require_once('../functions/plugin.php');
+
+global $username, $popuser, $domain;
 
    // This should most probably go to some initialization...
    if (ereg("^([^@%/]+)[@%/](.+)$", $username, $usernamedata)) {

+ 33 - 17
functions/strings.php

@@ -1,22 +1,38 @@
 <?php
 
-   /**
-    *   strings.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This code provides various string manipulation functions that are
-    *   used by the rest of the Squirrelmail code.
-    *
-    *   $Id$
-    */
-
-   /**
-    * SquirrelMail version number -- DO NOT CHANGE
-    */
-   global $version;
-   $version = '1.2.0 [cvs]';
+/**
+ * strings.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This code provides various string manipulation functions that are
+ * used by the rest of the Squirrelmail code.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the comment and $version stuff below.                ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+/**
+ * SquirrelMail version number -- DO NOT CHANGE
+ */
+global $version;
+$version = '1.2.0 [cvs]';
 
    /**
     * Count the number of occurances of $needle are in $haystack.

+ 33 - 19
functions/tree.php

@@ -1,26 +1,40 @@
 <?php
 
-   /**
-    *   tree.php
-    *
-    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *   Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *   This code provides various string manipulation functions that are
-    *   used by the rest of the Squirrelmail code.
-    *
-    *   $Id$
-    */
+/**
+ * tree.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This code provides various string manipulation functions that are
+ * used by the rest of the Squirrelmail code.
+ *
+ * $Id$
+ */
 
-   require_once('../functions/imap.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below.                              ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
 
-    /**
-    * findParentForChild
-    *
-    * Recursive function to find the correct parent for a new node
-    *
-    * @copyright    1999-2001 The Squirrelmail Development Team
-    */
+require_once('../functions/imap.php');
+
+/**
+ * findParentForChild
+ *
+ * Recursive function to find the correct parent for a new node
+ */
 
    function findParentForChild($value, $treeIndexToStart, $tree) {
       // is $value in $tree[$treeIndexToStart]['value']

+ 32 - 16
functions/url_parser.php

@@ -1,22 +1,38 @@
 <?php
 
-   /**
-    *  url_parser.php
-    *
-    *  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    *  Licensed under the GNU GPL. For full terms see the file COPYING.
-    *
-    *  This code provides various string manipulation functions that are
-    *  used by the rest of the Squirrelmail code.
-    *
-    *  $Id$
-    */
+/**
+ * url_parser.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This code provides various string manipulation functions that are
+ * used by the rest of the Squirrelmail code.
+ *
+ * $Id$
+ */
 
-   function replaceBlock (&$in, $replace, $start, $end) {
-      $begin = substr($in,0,$start);
-      $end   = substr($in,$end,strlen($in)-$end);
-      $in    = $begin.$replace.$end;
-   }
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first line of the function definition below.     ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+function replaceBlock (&$in, $replace, $start, $end) {
+    $begin = substr($in,0,$start);
+    $end   = substr($in,$end,strlen($in)-$end);
+    $in    = $begin.$replace.$end;
+}
 
    // Having this defined in just one spot could help when changes need
    // to be made to the pattern

+ 16 - 15
index.php

@@ -1,19 +1,20 @@
 <?php
 
-   /**
-    **  index.php -- Displays the main frameset
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Redirects to the login page.
-    **
-    **  $Id$
-    **/
+/**
+ * index.php -- Displays the main frameset
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Redirects to the login page.
+ *
+ * $Id$
+ */
 
-   require_once('./functions/strings.php');
+require_once('./functions/strings.php');
 
-   $location = get_location();
-   header("Location: $location/src/login.php\n\n");
-   exit();
-?>
+$location = get_location();
+header("Location: $location/src/login.php\n\n");
+exit();
+
+?>

+ 27 - 26
src/addrbook_popup.php

@@ -1,34 +1,35 @@
 <?php
 
-   /**
-    **  addrbook_popup.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Frameset for the JavaScript version of the address book.
-    **
-    **  $Id$
-    **/
+/**
+ * addrbook_popup.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Frameset for the JavaScript version of the address book.
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/addressbook.php');
+require_once('../src/validate.php');
+require_once('../functions/addressbook.php');
    
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
 
 <HTML>
-<HEAD>
-<TITLE><?php 
-   echo "$org_title: " . _("Address Book"); 
-?></TITLE>
-</HEAD>
-
-<FRAMESET ROWS="60,*" BORDER=0>
- <FRAME NAME="abookmain" MARGINWIDTH=0 SCROLLING=NO
-        SRC="addrbook_search.php?show=form" BORDER=0>
- <FRAME NAME="abookres" MARGINWIDTH=0 SRC="addrbook_search.php?show=blank"
-        BORDER=0>
-</FRAMESET>
-
-</HTML>
+    <HEAD>
+        <TITLE><?php echo "$org_title: " . _("Address Book"); ?></TITLE>
+    </HEAD>
+    <FRAMESET ROWS="60,*" BORDER=0>
+        <FRAME NAME="abookmain"
+               MARGINWIDTH="0"
+               SCROLLING="NO"
+               BORDER="0"
+               SRC="addrbook_search.php?show=form">
+        <FRAME NAME="abookres"
+               MARGINWIDTH="0"
+               BORDER="0"
+              SRC="addrbook_search.php?show=blank">
+    </FRAMESET>
+</HTML>

+ 33 - 17
src/addrbook_search.php

@@ -1,21 +1,37 @@
 <?php
 
-   /**
-    **  addrbook_search.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Handle addressbook searching in the popup window.
-    **
-    **  NOTE: A lot of this code is similar to the code in
-    **        addrbook_search_html.html -- If you change one,
-    **        change the other one too!
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
+/**
+ * addrbook_search.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Handle addressbook searching in the popup window.
+ *
+ * NOTE: A lot of this code is similar to the code in
+ *       addrbook_search_html.html -- If you change one,
+ *       change the other one too!
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
 
    // Function to include JavaScript code
    function insert_javascript() {
@@ -242,4 +258,4 @@ function bcc_address($addr) {
    
    echo "</BODY></HTML>\n";
    
-?>
+?>

+ 39 - 23
src/addrbook_search_html.php

@@ -1,28 +1,44 @@
 <?php
 
-   /**
-    **  addrbook_search_html.php
-    **
-    **  Copyright (c) 1999-2000 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Handle addressbook searching with pure html.
-    **
-    **  This file is included from compose.php
-    **
-    **  NOTE: A lot of this code is similar to the code in
-    **        addrbook_search.html -- If you change one, change
-    **        the other one too!
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/date.php');
-   require_once('../functions/smtp.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/addressbook.php');
-   require_once('../functions/plugin.php');
+/**
+ * addrbook_search_html.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Handle addressbook searching with pure html.
+ *
+ * This file is included from compose.php
+ *
+ * NOTE: A lot of this code is similar to the code in
+ *       addrbook_search.html -- If you change one, change
+ *       the other one too!
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/date.php');
+require_once('../functions/smtp.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/addressbook.php');
+require_once('../functions/plugin.php');
 
    // Insert hidden data
    function addr_insert_hidden() {

+ 32 - 16
src/addressbook.php

@@ -1,20 +1,36 @@
 <?php
 
-   /**
-    **  addressbook.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Manage personal address book.
-    **
-    **  $Id$
-    **/
-
-    require_once('../src/validate.php');
-    require_once('../functions/array.php');
-    require_once('../functions/display_messages.php');
-    require_once('../functions/addressbook.php');
+/**
+ * addressbook.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Manage personal address book.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/array.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/addressbook.php');
 
     // Sort array by the key "name"
     function alistcmp($a,$b) {
@@ -372,4 +388,4 @@
     do_hook('addressbook_bottom');
 ?>
 
-</BODY></HTML>
+</BODY></HTML>

+ 40 - 24
src/compose.php

@@ -1,29 +1,45 @@
 <?php
 
-   /**
-    **  compose.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This code sends a mail.
-    **
-    **  There are 4 modes of operation:
-    **     - Start new mail
-    **     - Add an attachment
-    **     - Send mail
-    **     - Save As Draft
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/date.php');
-   require_once('../functions/mime.php');
-   require_once('../functions/smtp.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/plugin.php');
+/**
+ * compose.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This code sends a mail.
+ *
+ * There are 4 modes of operation:
+ *    - Start new mail
+ *    - Add an attachment
+ *    - Send mail
+ *    - Save As Draft
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/date.php');
+require_once('../functions/mime.php');
+require_once('../functions/smtp.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/plugin.php');
 
    if (!isset($attachments))
    {

+ 30 - 14
src/delete_message.php

@@ -1,19 +1,35 @@
 <?php
 
-   /**
-    **  delete_message.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Deletes a meesage from the IMAP server 
-    **
-    **  $Id$
-    **/
+/**
+ * delete_message.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Deletes a meesage from the IMAP server 
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/imap.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/imap.php');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
@@ -30,4 +46,4 @@
       header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=".urlencode($mailbox));
 
    sqimap_logout($imapConnection);
-?>
+?>

+ 35 - 19
src/download.php

@@ -1,23 +1,39 @@
 <?php
 
-   /**
-    **  download.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Handles attachment downloads to the users computer.
-    **  Also allows displaying of attachments when possible.
-    **
-    **  $Id$
-    **/
-
-   define('download_php', true);  // Used for preferences
-
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/mime.php');
-   require_once('../functions/date.php');
+/**
+ * download.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Handles attachment downloads to the users computer.
+ * Also allows displaying of attachments when possible.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+define('download_php', true);  // Used for preferences
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/mime.php');
+require_once('../functions/date.php');
 
    header("Pragma: ");
    header("Cache-Control: cache");
@@ -224,4 +240,4 @@
 	  }
       }
    }
-?>
+?>

+ 26 - 11
src/draft_actions.php

@@ -1,16 +1,31 @@
 <?php
 
-   /**
-    **  draft_actions.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **
-    **  $Id$
-    **/
-
-    require_once ('../src/validate.php');
+/**
+ * draft_actions.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once ('../src/validate.php');
 
    /* Print all the needed RFC822 headers */
    function write822HeaderForDraft ($fp, $t, $c, $b, $subject, $more_headers) {

+ 33 - 17
src/empty_trash.php

@@ -1,22 +1,38 @@
 <?php
 
-   /**
-    **  empty_trash.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Handles deleting messages from the trash folder without
-    **  deleting subfolders.
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/array.php');
-   require_once('../functions/tree.php');
+/**
+ * empty_trash.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Handles deleting messages from the trash folder without
+ * deleting subfolders.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/imap.php');
+require_once('../functions/array.php');
+require_once('../functions/tree.php');
 
    $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 

+ 34 - 18
src/folders.php

@@ -1,22 +1,38 @@
 <?php
 
-   /**
-    **  folders.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Handles all interaction between the user and the other folder
-    **  scripts which do most of the work. Also handles the Special
-    **  Folders.
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/array.php');
-   require_once('../functions/plugin.php');
+/**
+ * folders.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Handles all interaction between the user and the other folder
+ * scripts which do most of the work. Also handles the Special
+ * Folders.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/array.php');
+require_once('../functions/plugin.php');
 
    displayPageHeader($color, 'None');
 
@@ -270,4 +286,4 @@
    sqimap_logout($imapConnection);
 ?>
 
-</body></html>
+</body></html>

+ 31 - 15
src/folders_create.php

@@ -1,20 +1,36 @@
 <?php
 
-   /**
-    **  folders_create.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Creates folders on the IMAP server.
-    **  Called from folders.php
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/display_messages.php');
+/**
+ * folders_create.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Creates folders on the IMAP server.
+ * Called from folders.php
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/display_messages.php');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
    global $delimiter;

+ 31 - 15
src/folders_delete.php

@@ -1,21 +1,37 @@
 <?php
 
-   /**
-    **  folders_delete.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Deltes folders from the IMAP server. 
-    **  Called from the folders.php
-    **
-    **  $Id$
-    **/
+/**
+ * folders_delete.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Deltes folders from the IMAP server. 
+ * Called from the folders.php
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/array.php');
-   require_once('../functions/tree.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/array.php');
+require_once('../functions/tree.php');
 
    /*
    *  Incoming values:

+ 29 - 13
src/folders_rename_do.php

@@ -1,19 +1,35 @@
 <?php
 
-   /**
-    **  folders_rename_do.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Does the actual renaming of files on the IMAP server. 
-    **  Called from the folders.php
-    **
-    **  $Id$
-    **/
+/**
+ * folders_rename_do.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Does the actual renaming of files on the IMAP server. 
+ * Called from the folders.php
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
 
    if($old_name == $new_name) {
       $location = get_location();

+ 29 - 13
src/folders_rename_getname.php

@@ -1,19 +1,35 @@
 <?php
 
-   /**
-    **  folders_rename_getname.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Gets folder names and enables renaming
-    **  Called from folders.php
-    **
-    **  $Id$
-    **/
+/**
+ * folders_rename_getname.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Gets folder names and enables renaming
+ * Called from folders.php
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 

+ 30 - 14
src/folders_subscribe.php

@@ -1,20 +1,36 @@
 <?php
 
-   /**
-    **  folders_subscribe.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Subscribe and unsubcribe form folders. 
-    **  Called from folders.php
-    **
-    **  $Id$
-    **/
+/**
+ * folders_subscribe.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Subscribe and unsubcribe form folders. 
+ * Called from folders.php
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/display_messages.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/display_messages.php');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 

+ 32 - 16
src/help.php

@@ -1,20 +1,36 @@
 <?php
 
-   /**
-    **  help.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Displays help for the user
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/array.php');
+/**
+ * help.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Displays help for the user
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/imap.php');
+require_once('../functions/array.php');
 
 
    displayPageHeader($color, 'None' );
@@ -192,4 +208,4 @@
 ?>
 <tr><td bgcolor="<?php echo $color[0] ?>">&nbsp;</td></tr></table>
 <td></tr></table>
-</body></html>
+</body></html>

+ 30 - 15
src/image.php

@@ -1,21 +1,36 @@
 <?php
 
-    /**
-    ** image.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This file shows an attached image
-    **
-    ** $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/date.php');
-   require_once('../functions/page_header.php');
-   require_once('../src/load_prefs.php');
+/**
+ * image.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This file shows an attached image
+ *
+ * $Id$
+ */
 
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/date.php');
+require_once('../functions/page_header.php');
+require_once('../src/load_prefs.php');
 
    displayPageHeader($color, 'None');
 

+ 13 - 13
src/index.php

@@ -1,18 +1,18 @@
 <?php
 
-   /**
-    **  index.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This file simply takes any attempt to view index of files
-    **  and sends those people to the login screen. At this
-    **  point no attempt is made to see if the person is logged
-    **  or not.
-    **/
+/**
+ *  index.php
+ *
+ *  Copyright (c) 1999-2001 The Squirrelmail Development Team
+ *  Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ *  This file simply takes any attempt to view index of files
+ *  and sends those people to the login screen. At this
+ *  point no attempt is made to see if the person is logged
+ *  or not.
+ */
 
-    header("Location:../index.php");
+header("Location:../index.php");
 
-    /** pretty impressive huh? **/
+/* pretty impressive huh? **/
 ?>

+ 34 - 18
src/left_main.php

@@ -1,22 +1,38 @@
 <?php
 
-   /**
-    **  left_main.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This is the code for the left bar.  The left bar shows the folders
-    **  available, and has cookie information.
-    **
-    **  $Id$
-    */
-
-    require_once('../src/validate.php');
-    require_once('../functions/array.php');
-    require_once('../functions/imap.php');
-    require_once('../functions/plugin.php');
-    require_once('../functions/page_header.php');
+/**
+ * left_main.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This is the code for the left bar. The left bar shows the folders
+ * available, and has cookie information.
+ *
+ * $Id$
+ /
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/array.php');
+require_once('../functions/imap.php');
+require_once('../functions/plugin.php');
+require_once('../functions/page_header.php');
 
     /* These constants are used for folder stuff. */
     define('SM_BOX_UNCOLLAPSED', 0);
@@ -343,4 +359,4 @@
 
     echo "</BODY></HTML>\n";
 
-?>
+?>

+ 29 - 19
src/load_prefs.php

@@ -1,24 +1,34 @@
 <?php
 
-    /**
-     **  load_prefs.php
-     **
-     **  Copyright (c) 1999-2001 The SquirrelMail Development Team
-     **  Licensed under the GNU GPL. For full terms see the file COPYING.
-     **
-     **  Loads preferences from the $username.pref file used by almost
-     **  every other script in the source directory and alswhere.
-     **
-     **  $Id$
-     **/
-
-    require_once('../src/validate.php');
-
-    /**************************************************************/
-    /* Following code should be removed in the next foo_once step */
-    if (defined('load_prefs_php')) { return; }
-    define('load_prefs_php', true);
-    /**************************************************************/
+/**
+ * load_prefs.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Loads preferences from the $username.pref file used by almost
+ * every other script in the source directory and alswhere.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
 
     global $theme, $chosen_theme, $color;
     if (! isset($theme)) { $theme = array(); }

+ 30 - 14
src/login.php

@@ -1,19 +1,35 @@
 <?php
 
-    /**
-     **  login.php -- simple login screen
-     **
-     **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-     **  Licensed under the GNU GPL. For full terms see the file COPYING.
-     **
-     **  This a simple login screen. Some housekeeping is done to clean
-     **  cookies and find language.
-     **
-     **  $Id$
-     **/
-
-    $rcptaddress = '';
-    if (isset($emailaddress)) {
+/**
+ * login.php -- simple login screen
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This a simple login screen. Some housekeeping is done to clean
+ * cookies and find language.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the first two lines below look.                      ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+$rcptaddress = '';
+if (isset($emailaddress)) {
         if (stristr($emailaddress, 'mailto:')) {
             $rcptaddress = substr($emailaddress, 7);
         } else {

+ 29 - 13
src/move_messages.php

@@ -1,19 +1,35 @@
 <?php
 
-   /**
-    **  move_messages.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Enables message moving between folders on the IMAP server.
-    **
-    **  $Id$
-    **/
+/**
+ * move_messages.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Enables message moving between folders on the IMAP server.
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/imap.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/imap.php');
 
    function putSelectedMessagesIntoString($msg) {
       $j = 0;

+ 12 - 12
src/options.php

@@ -1,16 +1,16 @@
 <?php
 
-   /**
-    **  options.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Displays the options page. Pulls from proper user preference files
-    **  and config.php. Displays preferences as selected and other options.
-    **
-    **  $Id$
-    */
+/**
+ * options.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Displays the options page. Pulls from proper user preference files
+ * and config.php. Displays preferences as selected and other options.
+ *
+ * $Id$
+ */
 
 require_once('../src/validate.php');
 require_once('../functions/display_messages.php');
@@ -453,4 +453,4 @@ if ($optpage == SMOPT_PAGE_MAIN) {
              "</TABLE>\n";
     }
 
-?>
+?>

+ 10 - 10
src/options_display.php

@@ -1,15 +1,15 @@
 <?php
 
-   /**
-    **  options_display.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Displays all optinos about display preferences
-    **
-    **  $Id$
-    */
+/**
+ * options_display.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Displays all optinos about display preferences
+ *
+ * $Id$
+ */
 
 /* Define the group constants for the display options page. */
 define('SMOPT_GRP_GENERAL', 0);

+ 10 - 10
src/options_folder.php

@@ -1,15 +1,15 @@
 <?php
 
-   /**
-    **  options_folder.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Displays all options relating to folders
-    **
-    **  $Id$
-    **/
+/**
+ * options_folder.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Displays all options relating to folders
+ *
+ * $Id$
+ */
 
 require_once('../functions/imap.php');
 

+ 30 - 14
src/options_identities.php

@@ -1,18 +1,34 @@
 <?php
 
-   /**
-    **  options_identities.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Display Identities Options
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/display_messages.php');
+/**
+ * options_identities.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Display Identities Options
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/display_messages.php');
 
    if (isset($return)) {
       SaveUpdateFunction();
@@ -311,4 +327,4 @@ function ShowTableInfo($full_name, $email_address, $reply_to, $post) {
     echo '</td></tr>'.
          '<tr><td colspan="2">&nbsp;</td></tr>';
 }
-?>
+?>

+ 33 - 17
src/options_order.php

@@ -1,21 +1,37 @@
 <?php
 
-   /**
-    **  options_order.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Displays message highlighting options
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once('../functions/display_messages.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/array.php');
-   require_once('../functions/plugin.php');
+/**
+ * options_order.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Displays message highlighting options
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/display_messages.php');
+require_once('../functions/imap.php');
+require_once('../functions/array.php');
+require_once('../functions/plugin.php');
 
 
    if (! isset($action)) { $action = ''; }
@@ -141,4 +157,4 @@
 
 </td></tr>
 </table>
-</body></html>
+</body></html>

+ 10 - 10
src/options_personal.php

@@ -1,15 +1,15 @@
 <?php
 
-   /**
-    **  options_personal.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Displays all options relating to personal information
-    **
-    **  $Id$
-    **/
+/**
+ * options_personal.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Displays all options relating to personal information
+ *
+ * $Id$
+ */
 
 require_once('../functions/imap.php');
 require_once('../functions/array.php');

+ 36 - 21
src/printer_friendly_bottom.php

@@ -1,26 +1,41 @@
 <?php
 
-  /**
-   **  printer_friendly_bottom.php
-   **
-   **  Copyright (c) 1999-2001 The SquirrelMail development team
-   **  Licensed under the GNU GPL. For full terms see the file COPYING.
-   **
-   **  with javascript on, it is the bottom frame of printer_friendly_main.php
-   **  else, it is alone in a new window
-   **
-   **  - this is the page that does all the work, really.
-   **
-   **  $Id$
-   **/
-
-    require_once('../src/validate.php');
-    require_once('../functions/strings.php');
-    require_once('../config/config.php');
-    require_once('../src/load_prefs.php');
-    require_once('../functions/imap.php');
-    require_once('../functions/page_header.php');
-
+/**
+ * printer_friendly_bottom.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * with javascript on, it is the bottom frame of printer_friendly_main.php
+ * else, it is alone in a new window
+ *
+ * - this is the page that does all the work, really.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/strings.php');
+require_once('../config/config.php');
+require_once('../src/load_prefs.php');
+require_once('../functions/imap.php');
+require_once('../functions/page_header.php');
 
     $pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay');
 

+ 26 - 10
src/printer_friendly_main.php

@@ -1,16 +1,32 @@
 <?php
 
-  /**
-   **  printer_friendly_main.php
-   **
-   **  Copyright (c) 1999-2001 The SquirrelMail development team
-   **  Licensed under the GNU GPL. For full terms see the file COPYING.
-   **
-   **  $Id$
-   **/
+/**
+ * printer_friendly_main.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * $Id$
+ */
 
-    require_once('../src/validate.php');
-    require_once('../functions/page_header.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/page_header.php');
 
     displayHtmlHeader( _("Printer Friendly"), '', FALSE );
 

+ 33 - 17
src/printer_friendly_top.php

@@ -1,22 +1,38 @@
 <?php
 
-  /**
-   **  printer_friendly_top.php
-   **
-   **  Copyright (c) 1999-2001 The SquirrelMail development team
-   **  Licensed under the GNU GPL. For full terms see the file COPYING.
-   **
-   **  top frame of printer_friendly_main.php
-   **  displays some javascript buttons for printing & closing
-   **
-   **  $Id$
-   **/
+/**
+ * printer_friendly_top.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * top frame of printer_friendly_main.php
+ * displays some javascript buttons for printing & closing
+ *
+ * $Id$
+ */
 
-    require_once('../src/validate.php');
-    require_once('../functions/strings.php');
-    require_once('../config/config.php');
-    require_once('../src/load_prefs.php');
-    require_once('../functions/page_header.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/strings.php');
+require_once('../config/config.php');
+require_once('../src/load_prefs.php');
+require_once('../functions/page_header.php');
 
     displayHtmlHeader( _("Printer Friendly"),
                  "<script language=\"javascript\">\n".
@@ -41,4 +57,4 @@
          '</body>'.
          "</html>\n";
 
-?>
+?>

+ 33 - 17
src/read_body.php

@@ -1,22 +1,38 @@
 <?php
 
-   /**
-    **  read_body.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This file is used for reading the msgs array and displaying
-    **  the resulting emails in the right frame.
-    **
-    **  $Id$
-    */
-
-    require_once('../src/validate.php');
-    require_once('../functions/imap.php');
-    require_once('../functions/mime.php');
-    require_once('../functions/date.php');
-    require_once('../functions/url_parser.php');
+/**
+ * read_body.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This file is used for reading the msgs array and displaying
+ * the resulting emails in the right frame.
+ *
+ * $Id$
+ /
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/mime.php');
+require_once('../functions/date.php');
+require_once('../functions/url_parser.php');
    
     $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
     sqimap_mailbox_select($imapConnection, $mailbox);

+ 35 - 19
src/redirect.php

@@ -1,24 +1,40 @@
 <?php
 
-    /**
-     **  redirect.php
-     **  Derived from webmail.php by Ralf Kraudelt <kraude@wiwi.uni-rostock.de>
-     **
-     **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-     **  Licensed under the GNU GPL. For full terms see the file COPYING.
-     **
-     **  Prevents users from reposting their form data after a successful logout.
-     **
-     **  $Id$
-     **/
-
-    require_once('../functions/i18n.php');
-    require_once('../functions/strings.php');
-    require_once('../config/config.php');
-    require_once('../functions/prefs.php');
-    require_once('../functions/imap.php');
-    require_once('../functions/plugin.php');
-    require_once('../functions/constants.php');
+/**
+ * redirect.php
+ * Derived from webmail.php by Ralf Kraudelt <kraude@wiwi.uni-rostock.de>
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Prevents users from reposting their form data after a successful logout.
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../functions/i18n.php');
+require_once('../functions/strings.php');
+require_once('../config/config.php');
+require_once('../functions/prefs.php');
+require_once('../functions/imap.php');
+require_once('../functions/plugin.php');
+require_once('../functions/constants.php');
 
     function attachment_common_parse($str, $debug) {
         global $attachment_common_types, $attachment_common_types_parsed;

+ 35 - 19
src/retrievalerror.php

@@ -1,24 +1,40 @@
 <?php
 
-   /**
-    **  retrievalerror.php
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Submits a message which Squirrelmail couldn't handle
-    **  because of malformedness of the message
-    **  sends it to retrievalerror@squirrelmail.org
-    **  Of course, this only happens when the end user has chosen to do so
-    **
-    **  $Id$
-    **/
-
-   require_once('../src/validate.php');
-   require_once("../functions/imap.php");
-   require_once("../functions/smtp.php");
-   require_once("../functions/page_header.php");
-   require_once("../src/load_prefs.php");
+/**
+ * retrievalerror.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Submits a message which Squirrelmail couldn't handle
+ * because of malformedness of the message
+ * sends it to retrievalerror@squirrelmail.org
+ * Of course, this only happens when the end user has chosen to do so
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once("../functions/imap.php");
+require_once("../functions/smtp.php");
+require_once("../functions/page_header.php");
+require_once("../src/load_prefs.php");
 
    $destination = "retrievalerror@squirrelmail.org";
 

+ 28 - 13
src/search.php

@@ -1,19 +1,34 @@
 <?php
 
-    /**
-     ** right_main.php
-     **
-     ** Copyright (c) 1999-2001 The Squirrelmail Development Team
-     ** Licensed under the GNU GPL. For full terms see the file COPYING.
-     **
-     ** $Id$
-     **/
+/**
+ * right_main.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * $Id$
+ */
 
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
 
-   require_once('../src/validate.php');
-   require_once('../functions/imap.php');
-   require_once('../functions/imap_search.php');
-   require_once('../functions/array.php');
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
+require_once('../functions/imap_search.php');
+require_once('../functions/array.php');
 
     function s_opt( $val, $sel, $tit ) {
         echo "            <option value=\"$val\"";
@@ -88,4 +103,4 @@
    do_hook("search_bottom");
    sqimap_logout ($imapConnection);
 ?>
-</body></html>
+</body></html>

+ 29 - 14
src/signout.php

@@ -1,20 +1,35 @@
 <?php
 
-   /**
-    **  signout.php -- cleans up session and logs the user out
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Cleans up after the user. Resets cookies and terminates
-    **  session.
-    **
-    **  $Id$
-    **/
+/**
+ * signout.php -- cleans up session and logs the user out
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ *  Cleans up after the user. Resets cookies and terminates session.
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/prefs.php');
-   require_once('../functions/plugin.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/prefs.php');
+require_once('../functions/plugin.php');
 
    // Erase any lingering attachments
    if (! isset($attachments)) {

+ 27 - 14
src/validate.php

@@ -1,21 +1,34 @@
 <?php
 
-    /**
-     ** validate.php
-     **
-     ** Copyright (c) 1999-2001 The SquirrelMail Development Team
-     ** Licensed under the GNU GPL. For full terms see the file COPYING.
-     **
-     ** $Id$
-     **/
+/**
+ * validate.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * $Id$
+ */
 
-    if (defined ('validate_php')) { return; }
-    define ('validate_php', true);
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
 
-    session_start();
-    require_once('../functions/i18n.php');
-    require_once('../functions/auth.php');
-    require_once('../functions/strings.php');
+session_start();
+require_once('../functions/i18n.php');
+require_once('../functions/auth.php');
+require_once('../functions/strings.php');
 
     is_logged_in();
 

+ 31 - 15
src/vcard.php

@@ -1,21 +1,37 @@
 <?php
 
-   /**
-    ** vcard.php
-    **
-    ** Copyright (c) 1999-2001 The SquirrelMail Development Team
-    ** Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This file shows an attched vcard
-    **
-    ** $Id$
-    **/
+/**
+ * vcard.php
+ *
+ * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This file shows an attched vcard
+ *
+ * $Id$
+ */
 
-   require_once('../src/validate.php');
-   require_once('../functions/date.php');
-   require_once('../functions/page_header.php');
-   require_once('../functions/mime.php');
-   require_once('../src/load_prefs.php');
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/date.php');
+require_once('../functions/page_header.php');
+require_once('../functions/mime.php');
+require_once('../src/load_prefs.php');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
    sqimap_mailbox_select($imapConnection, $mailbox);