Removed a lot of the warnings generated when PHP has all warnings enabled.
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 30 Jan 2001 17:22:38 +0000 (17:22 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 30 Jan 2001 17:22:38 +0000 (17:22 +0000)
    This is not done yet, but it is a VERY good start.
Added $Id$ tags to a lot of the files.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@982 7612ce4b-ef26-0410-bec9-ea0150e637f0

53 files changed:
config/conf.pl
functions/abook_database.php
functions/abook_ldap_server.php
functions/abook_local_file.php
functions/addressbook.php
functions/array.php
functions/auth.php
functions/date.php
functions/display_messages.php
functions/imap.php
functions/imap_general.php
functions/imap_mailbox.php
functions/imap_messages.php
functions/imap_search.php
functions/mailbox_display.php
functions/mime.php
functions/page_header.php
functions/plugin.php
functions/prefs.php
functions/smtp.php
functions/strings.php
functions/tree.php
functions/url_parser.php
src/addrbook_popup.php
src/addrbook_search.php
src/addrbook_search_html.php
src/addressbook.php
src/compose.php
src/delete_message.php
src/download.php
src/empty_trash.php
src/folders.php
src/folders_create.php
src/folders_delete.php
src/folders_rename_do.php
src/folders_rename_getname.php
src/folders_subscribe.php
src/help.php
src/left_main.php
src/load_prefs.php
src/move_messages.php
src/options.php
src/options_display.php
src/options_folder.php
src/options_highlight.php
src/options_order.php
src/options_personal.php
src/read_body.php
src/redirect.php
src/right_main.php
src/search.php
src/signout.php
src/webmail.php

index b454fb44059b98e1d399abc6fdeb6974a69d0bcc..1f3b0ff89f854d258c998a9cf8943ff825ff589c 100755 (executable)
@@ -3,6 +3,8 @@
 # Luke Ehresman (luke@squirrelmail.org)
 #
 # A simple configure script to configure squirrelmail
+#
+# $Id$
 ############################################################              
 $conf_pl_version = "x62";
 
index e885ffa404889661230e5f5fbbf2e0a85fa4d994..85a0e9e105aee5ae50cb191a5287c77f47a45a35 100644 (file)
@@ -23,6 +23,8 @@
     **
     **  NOTE. This class should not be used directly. Use the
     **        "AddressBook" class instead.
+    **
+    ** $Id$
     **/
    
    require_once("DB.php");
index 1b9562b9c2509442caec5f91d7672db9ac92304c..4863b7bb65cb771fbd1c7308a93f9c9b95042cd4 100644 (file)
@@ -20,6 +20,8 @@
    **
    **  NOTE. This class should not be used directly. Use the
    **        "AddressBook" class instead.
+   **
+   ** $Id$
    **/
 
    class abook_ldap_server extends addressbook_backend {
index 91c3e8df80a6d8cc1e6b0d9efaf2e8471e7e88d0..ccf57b4a21574761ad169f7d310c92177685855b 100644 (file)
@@ -14,6 +14,8 @@
    **
    **  NOTE. This class should not be used directly. Use the
    **        "AddressBook" class instead.
+   **
+   ** $Id$
    **/
 
    class abook_local_file extends addressbook_backend {
index 8779c99e84564d5c4af0d26452c2b8d4e2c4a9d3..baaff51b376f8e3d89117eb8075b804e6ac3e3c7 100644 (file)
@@ -5,6 +5,7 @@
    **
    **  Functions and classes for the addressbook system.
    **
+   **  $Id$
    **/
     
    $addressbook_php = true;
index 9e83a19532ba2c4b34bf017a41914341d158e685..b59f21c960e76612ae1fa8cb32c3881319c32bb2 100644 (file)
@@ -5,6 +5,7 @@
     **  This contains functions that work with array manipulation.  They
     **  will help sort, and do other types of things with arrays
     **
+    **  $Id$
     **/
 
    $array_php = true;
@@ -19,7 +20,7 @@
       $GLOBALS["col"] = $col;  // Column or Columns as an array
       $GLOBALS["dir"] = $dir;  // Direction, a positive number for ascending a negative for descending
 
-      usort($ary,comp2);
+      usort($ary,'comp2');
       return $ary;
   }
 
index 594567fd577a5147e49bb67ee7e00e4d66accd74..fec8c1b342aa86c06d2c5062a3fae81ebced2191 100644 (file)
@@ -5,6 +5,7 @@
  **
  ** Contains functions used to do authentication.
  **
+ ** $Id$
  **/
 
    $auth_php = true;
index 6cb4b68ccc9b74cc57bf5bff2c0e62247cc1908c..c258fc941f5c283bce789b5d238ac9a0b0737d63 100644 (file)
@@ -7,6 +7,7 @@
     **        <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
     **  (as specified in RFC 822) -- "Tue" is optional
     **
+    **  $Id$
     **/
 
    $date_php = true;
index 242f48f60e48bc027dea35766b3ece35f46c0b2c..e4a02c0ef1a0aa3bb421f1b93cdb3104ea0c871a 100644 (file)
@@ -5,6 +5,7 @@
     **  This contains all messages, including information, error, and just
     **  about any other message you can think of.
     **
+    ** $Id$
     **/
 
     $display_messages_php = true;
index 2fa499f64be3065665220e68e17d9bc2ab11133c..b0a24be7b3ff4fb6e62695f318fd5ef7cebd5ecb 100644 (file)
@@ -1,6 +1,8 @@
 <?php
    /**  This just includes the different sections of the imap functions.
     **  They have been organized into these sections for simplicity sake.
+    **
+    **  $Id$
     **/
 
    $imap_php = true;
index f424e0415fae412df7a202e4012bec22d1769529..2848b158b3c0281724a89dcfa364a6b27f14dc8b 100755 (executable)
@@ -3,6 +3,8 @@
     **  imap.php
     **
     **  This implements all functions that do general imap functions.
+    **
+    **  $Id$
     **/
 
    $imap_general_debug = false;
       global $color, $squirrelmail_language, $imap_general_debug;
 
       $read = fgets($imap_stream, 9096);
+
       if (ereg("^\* [0-9]+ FETCH.*{([0-9]+)}", $read, $regs)) {
          $size = $regs[1];
+      } else {
+         $size = 0;
       }
       
+      $data = Array();
+      
       $continue = true;
       while ($continue) {
          // Continue if needed for this single line
@@ -202,8 +209,11 @@ function sqimap_capability($imap_stream, $capability) {
 
                $c = explode(' ', $read[0]);
                for ($i=2; $i < count($c); $i++) {
-                       list($k, $v) = explode('=', $c[$i]);
-                       $sqimap_capabilities[$k] = ($v)?$v:TRUE;
+                       $cap_list = explode('=', $c[$i]);
+                       if (isset($cap_list[1]))
+                           $sqimap_capabilities[$cap_list[0]] = $cap_list[1];
+                       else
+                           $sqimap_capabilities[$cap_list[0]] = TRUE;
                }
        }
        return $sqimap_capabilities[$capability];
index 33801b2779899f09e7e24da35e9fd68a59672ab8..72666d72e7447db230a6674c6198392f6b24af84 100755 (executable)
@@ -3,6 +3,8 @@
     **  imap_mailbox.php
     **
     **  This impliments all functions that manipulate mailboxes
+    **
+    **  $Id$
     **/
 
    /******************************************************************************
       if ($list_special_folders_first == true) {
 
          // Then list special folders and their subfolders
-         for ($i = 0 ; $i <= count($boxes) ; $i++) {
+         for ($i = 0 ; $i < count($boxes) ; $i++) {
             if ($move_to_trash &&
                eregi("^" . quotemeta($trash_folder) . "(" .
                quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) {
          }
 
          // Put INBOX.* folders ahead of the rest
-         for ($i = 0; $i <= count($boxes); $i++) {
+         for ($i = 0; $i < count($boxes); $i++) {
             if (eregi("^inbox\.", $boxes[$i]["unformatted"]) &&
-                ($boxes[$i]["used"] == false)) {
+                (!isset($boxes[$i]["used"]) || $boxes[$i]["used"] == false)) {
                $boxesnew[] = $boxes[$i];
                $boxes[$i]["used"] = true;
             }
index a28dc43da6ba7af74eedb7da50b0aee947c473d8..add62e7a9aed5ce0e227ba13c47e8fa79792c2fe 100755 (executable)
@@ -2,7 +2,9 @@
    /**
     **  imap_messages.php
     **
-    **  This implements functions that manipulate messages 
+    **  This implements functions that manipulate messages
+    **
+    **  $Id$
     **/
 
    if (!isset($mime_php)) include "../functions/mime.php";
@@ -51,7 +53,8 @@
     **  Returns some general header information -- FROM, DATE, and SUBJECT
     ******************************************************************************/
    class small_header {
-      var $from, $subject, $date, $to, $priority, $message_id;
+      var $from = '', $subject = '', $date = '', $to = '', 
+          $priority = 0, $message_id = 0, $cc = '';
    }
         
    function sqimap_get_small_header ($imap_stream, $id, $sent) {
       $from = _("Unknown Sender");
       $priority = "0";
       $messageid = "<>";
+      $cc = "";
+      $to = "";
+      $date = "";
+      $type[0] = "";
+      $type[1] = "";
 
       $g = 0;
       for ($i = 0; $i < count($read); $i++) {
       $header->size = $size;
       $header->type0 = $type[0];
       $header->type1 = $type[1];
-
+      
       return $header;
    }
 
     ******************************************************************************/
    function sqimap_get_message ($imap_stream, $id, $mailbox) {
       $header = sqimap_get_message_header($imap_stream, $id, $mailbox);
-      $msg = sqimap_get_message_body($imap_stream, &$header);
-      return $msg;
+      return sqimap_get_message_body($imap_stream, &$header);
    }
 
    /******************************************************************************
          /** FROM **/
          else if (strtolower(substr($read[$i], 0, 5)) == "from:") {
             $hdr->from = trim(substr($read[$i], 5, strlen($read[$i]) - 6));
-            if ($hdr->replyto == "")
+            if (! isset($hdr->replyto) || $hdr->replyto == "")
                $hdr->replyto = $hdr->from;
             $i++;
          }
     ******************************************************************************/
    function sqimap_get_message_body ($imap_stream, &$header) {
       $id = $header->id;
-      return decodeMime($imap_stream, $body, &$header);
+      return decodeMime($imap_stream, &$header);
    }
 
 
index d980bd1954bab1278c9e7d701e67fbd7d9a29a6e..7d497ab49360bd033f9f61a4c94e73242cf6dfe9 100644 (file)
@@ -1,6 +1,7 @@
-<?php     
+<?php 
 /******************************************************************
  ** IMAP SEARCH ROUTIES
+ ** $Id$
  *****************************************************************/
    if (!isset($imap_php))
       include("../functions/imap.php");
index a5f83bd1b61da7fc3d46c0190085bba0afc9f07c..d35acce3a5ee9848c1f36efb241f0bc68eeed51b 100644 (file)
@@ -6,6 +6,7 @@
     **  This contains functions that display mailbox information, such as the
     **  table row that has sender, date, subject, etc...
     **
+    **  $Id$
     **/
 
    $mailbox_display_php = true;
 
       echo "<TR>\n";
 
-      if ($msg["FLAG_FLAGGED"] == true) { $flag = "<font color=$color[2]>"; $flag_end = "</font>"; }
-      if ($msg["FLAG_SEEN"] == false) { $bold = "<b>"; $bold_end = "</b>"; }
-      if ($mailbox == $sent_folder) { $italic = "<i>"; $italic_end = "</i>"; }
-      if ($msg["FLAG_DELETED"]) { $fontstr = "<font color=\"$color[9]\">"; $fontstr_end = "</font>"; }
+      if (isset($msg['FLAG_FLAGGED']) && $msg["FLAG_FLAGGED"] == true) 
+      { 
+         $flag = "<font color=$color[2]>"; 
+        $flag_end = "</font>"; 
+      }
+      else
+      {
+         $flag = "";
+        $flag_end = "";
+      }
+      if (isset($msg['FLAG_SEEN']) && $msg["FLAG_SEEN"] == false) 
+      { 
+         $bold = "<b>"; 
+        $bold_end = "</b>"; 
+      }
+      else
+      {
+         $bold = "";
+        $bold_end = "";
+      }
+      if ($mailbox == $sent_folder) 
+      { 
+         $italic = "<i>"; 
+        $italic_end = "</i>"; 
+      }
+      else
+      {
+         $italic = "";
+        $italic_end = "";
+      }
+      if (isset($msg['FLAG_DELETED']) && $msg["FLAG_DELETED"])
+      { 
+         $fontstr = "<font color=\"$color[9]\">"; 
+        $fontstr_end = "</font>"; 
+      }
+      else
+      {
+         $fontstr = "";
+        $fontstr_end = "";
+      }
 
       for ($i=0; $i < count($message_highlight_list); $i++) {
          if (trim($message_highlight_list[$i]["value"]) != "") {
@@ -46,7 +83,7 @@
          }
       }
 
-      if (!$hlt_color)
+      if (!isset($hlt_color))
          $hlt_color = $color[4];
 
       if ($where && $what) {
                break;
             case 4: # subject
                echo "   <td bgcolor=$hlt_color>$bold";
-                          echo "<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\"";
-                          do_hook("subject_link");
-                          echo ">$flag$subject$flag_end</a>$bold_end</td>\n";
+              if (! isset($search_stuff))
+                  $search_stuff = "";
+              echo "<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\"";
+              do_hook("subject_link");
+              echo ">$flag$subject$flag_end</a>$bold_end</td>\n";
                break;
             case 5: # flags
                $stuff = false;
                echo "   <td bgcolor=$hlt_color align=center width=1% nowrap><b><small>\n";
-               if ($msg["FLAG_ANSWERED"] == true) {
+               if (isset($msg['FLAG_ANSWERED']) && 
+                  $msg["FLAG_ANSWERED"] == true) {
                   echo "A\n";
                   $stuff = true;
                }
                   echo "<font color=$color[1]>!</font>\n";
                   $stuff = true;
                }
-               if ($msg["FLAG_DELETED"]) {
+               if (isset($msg['FLAG_DELETED']) && $msg["FLAG_DELETED"]) {
                   echo "<font color=\"$color[1]\">D</font>\n";
                   $stuff = true;
                }
          } else {
             $end = $numMessages;
          }
+        if ($end > $numMessages) $end = $numMessages;
          while ($j < $end) {
             $date[$j] = ereg_replace("  ", " ", $date[$j]);
             $tmpdate = explode(" ", trim($date[$j]));
 
          /* Only ignore messages flagged as deleted if we are using a
           * trash folder or auto_expunge */
-         if (($move_to_trash || $auto_expunge) && $sort != 6)
+         if (((isset($move_to_trash) && $move_to_trash) 
+             || (isset($auto_expunge) && $auto_expunge)) && $sort != 6)
          {
             /** Find and remove the ones that are deleted */
             $i = 0;
             }
             $numMessages = $i;
          } else {
+           if (! isset($messages))
+               $messages = array();
             $msgs = $messages;
          }
       }         
          $More .= "<A HREF=\"right_main.php?use_mailbox_cache=$use&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Next") ."</A>\n";
       }
 
+      if (! isset($msg))
+          $msg = "";
       mail_message_listing_beginning($imapConnection,
          "move_messages.php?msg=$msg&mailbox=$urlMailbox&startMessage=$startMessage",
           $mailbox, $sort, $Message, $More, $startMessage);
          else
             $i = 1;
          reset($msort);
+        $k = 0;
          do {
             $key = key($msort);
             next($msort);
index 4ed4435af077628e1115cbc08e2c889baa7edfa0..e1dd774d6501f9d867285a4e777d7f73033027b3 100644 (file)
@@ -4,6 +4,7 @@
     ** This contains the functions necessary to detect and decode MIME
     ** messages.
     **
+    ** $Id$
     **/
 
    $debug_mime = false;
       /** msg_header contains generic variables for values that **/
       /** could be in a header.                                 **/
       
-      var $type0, $type1, $boundary, $charset, $encoding, $size;
-      var $to, $from, $date, $cc, $bcc, $reply_to, $subject;
-      var $id, $mailbox, $description;
-      var $entity_id, $message_id, $charset;
+      var $type0 = '', $type1 = '', $boundary = '', $charset = '';
+      var $encoding = '', $size = 0, $to = '', $from = '', $date = '';
+      var $cc = '', $bcc = '', $reply_to = '', $subject = '';
+      var $id = 0, $mailbox = '', $description = '';
+      var $entity_id = 0, $message_id = 0;
    }
    
    class message {
       
       $id = $header->id;
       fputs ($imap_stream, "a001 FETCH $id BODYSTRUCTURE\r\n");
+      //
+      // This should use sqimap_read_data instead of reading it itself
+      //
       $read = fgets ($imap_stream, 10000);
       $response = substr($read, 0, 4);
+      $bodystructure = "";
       while ($response != "a001") {
          $bodystructure .= $read;
          $read = fgets ($imap_stream, 10000);
          $response = substr($read, 0, 4);
       }
-   //   $read = strtolower($bodystructure);
       $read = $bodystructure;
 
       if ($debug_mime) echo "<tt>$read</tt><br><br>\n";
             // loop through until we find the matching quote, and return that as a string
             $pos = 1;
             $char = substr($structure, $pos, 1);
+           $text = "";
             while ($char != "\"" && $pos < strlen($structure)) {
                $text .= $char;
                $pos++;
             // comment me
             $end = mime_match_parenthesis (0, $structure);
             $sub = substr($structure, 1, $end-1);
+           if (! isset($properties))
+               $properties = array();
             $properties = mime_get_props($properties, $sub);
             $structure = substr($structure, strlen($sub) + 2);
          } else {
          if ($char == "\"") {
             $pos = 1;
             $char = substr($structure, $pos, 1);
+           $tmp = "";
             while ($char != "\"" && $pos < strlen($structure)) {
                $tmp .= $char;
                $pos++;
             if ($char == "\"") {
                $pos = 1;
                $char = substr($structure, $pos, 1);
+              $value = "";
                while ($char != "\"" && $pos < strlen($structure)) {
                   $value .= $char;
                   $pos++;
             } else if ($char == "(") {
                $end = mime_match_parenthesis (0, $structure);
                $sub = substr($structure, 1, $end-1);
+              if (! isset($props))
+                  $props = array();
                $props = mime_get_props($props, $sub);
                $structure = substr($structure, strlen($sub) + 2);
             }
    /** This is the first function called.  It decides if this is a multipart
        message or if it should be handled as a single entity
     **/
-   function decodeMime ($imap_stream, $body, $header) {
+   function decodeMime ($imap_stream, $header) {
       global $username, $key, $imapServerAddress, $imapPort;
       return mime_structure ($imap_stream, $header);
    }
          if ($message->header->type0 == "text") {
             if ($message->header->type1 == "plain" ||
                 $message->header->type1 == "html") {
-               return $message->header->entity_id; 
+              if (isset($message->header->entity_id))
+                   return $message->header->entity_id;
+              return 0;
             }
          } else {
             for ($i=0; $message->entities[$i]; $i++) {
    
          /** Display the ATTACHMENTS: message if there's more than one part **/
          $body .= "</TD></TR></TABLE>";
-         if ($message->entities) {
+         if (isset($message->entities)) {
             $body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
          }
       } else {
index 3aeae3363c5f490d56f3852274fa689069bd36e5..28852d5dba3440df5a73ab8dd7cca06cbd49b493 100644 (file)
@@ -4,6 +4,7 @@
     **
     **  Prints the page header (duh)
     **
+    **  $Id$
     **/
 
    session_start();
index e4727f85fec41ed5b2225cacf2611e4f133a2321..35dc67763d6fadb4d69229fd9904738aa7ba3168 100644 (file)
@@ -12,6 +12,7 @@
  **
  ** Documentation on how to write plugins might show up some time.
  **
+ ** $Id$
  **/
 
 
@@ -31,7 +32,8 @@
    function do_hook ($name) {
       global $squirrelmail_plugin_hooks;
       $Data = func_get_args();
-      if (is_array($squirrelmail_plugin_hooks[$name])) {
+      if (isset($squirrelmail_plugin_hooks[$name]) && 
+          is_array($squirrelmail_plugin_hooks[$name])) {
          foreach ($squirrelmail_plugin_hooks[$name] as $id => $function) {
             // Add something to set correct gettext domain for plugin
             if (function_exists($function)) {
@@ -46,7 +48,7 @@
   }
 
    // On startup, register all plugins configured for use
-   if (is_array($plugins))
+   if (isset($plugins) && is_array($plugins))
       foreach ($plugins as $id => $name)
          use_plugin($name);
 
index a8c651246f4ffc2e3e7ebb677cef4a769b81a85f..dc4599263eb104feb89beda44fb3093c93e244f1 100644 (file)
@@ -3,6 +3,8 @@
     **  prefs.php
     **
     **  This contains functions for manipulating user preferences
+    **
+    **  $Id$
     **/
 
    $prefs_php = true;
index dae83a2a6f22fdf9516ebcec33721d531cd80ae9..b2bfef6e73e542856d1225f7f40692c828fb3498 100644 (file)
@@ -3,6 +3,8 @@
     **
     ** This contains all the functions needed to send messages through
     ** an smtp server or sendmail.
+    **
+    ** $Id$
     **/
 
    $smtp_php = true;
index 266214ae93ece695f7a75f8d42fe52622b63345a..9d514b29514c8f615587e3bf2eb1489cc9e727b2 100644 (file)
    // stored in a cookie.
    function OneTimePadEncrypt ($string, $epad) {
       $pad = base64_decode($epad);
+      $encrypted = "";
       for ($i = 0; $i < strlen ($string); $i++) {
         $encrypted .= chr (ord($string[$i]) ^ ord($pad[$i]));
       }
    function OneTimePadDecrypt ($string, $epad) {
       $pad = base64_decode($epad);
       $encrypted = base64_decode ($string);
-      
+      $decrypted = "";
       for ($i = 0; $i < strlen ($encrypted); $i++) {
         $decrypted .= chr (ord($encrypted[$i]) ^ ord($pad[$i]));
       }
       // getrusage
       if (function_exists("getrusage")) {
          $dat = getrusage();
-        sq_mt_seed(md5($dat["ru_nswap"] . $dat["ru_majflt"] . 
-           $dat["ru_utime.tv_sec"] . $dat["ru_utime.tv_usec"]));
+        $Str = "";
+        foreach ($dat as $k => $v)
+        {
+            $Str .= "$k = $v\n";
+        }
+        sq_mt_seed(md5($Str));
       }
       
       // Apache-specific
    
    function OneTimePadCreate ($length=100) {
       sq_mt_randomize();
-      
+
+      $pad = "";
       for ($i = 0; $i < $length; $i++) {
         $pad .= chr(mt_rand(0,255));
       }
index 83e2a933438c0612c92fe10972cef3c8971f0b0d..933897f84b119b6439ef11556da04da06a6917fd 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+   /* $Id$ */
+
    $tree_php = true;
 
    if (!isset($imap_php))
index 53c18a24011fd6698164c48a4d9c8eb0879cf23f..ad2fa4839e6c3b86d6838d8e151b6e69b65ad5a2 100644 (file)
@@ -1,5 +1,6 @@
 <?php
    /* URL Passing code to allow links from with in emails */
+   /* $Id$ */
 
    $url_parser_php = true;
 
index e629cea0b14e1bb364ab70e0211447058ef92a55..caa69bd501c5bce68678d456bb2c16e66788bfec 100644 (file)
@@ -7,6 +7,7 @@
     **
     **  Frameset for the JavaScript version of the address book.
     **
+    **  $Id$
     **/
 
    session_start();
index 55dc5cae61b509b4a694783bcdee8e52f06bf408..ed05ba998a7494d190ddfaaa12cf39737ab4326b 100644 (file)
@@ -10,6 +10,8 @@
     **  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$
     **/
 
    // Function to include JavaScript code
index 495f218e53f8477c1d71c6809b75128db1d87a14..3a89f08980fb62685e882cbf8b512da58424ec8d 100644 (file)
@@ -12,6 +12,8 @@
     **  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$
     **/
 
    session_start();
    print "<CENTER>\n";
    printf("  <nobr><STRONG>%s</STRONG>\n", _("Search for"));
    addr_insert_hidden();
+   if (! isset($addrquery))
+       $addrquery = "";
    printf("  <INPUT TYPE=text NAME=addrquery VALUE=\"%s\" SIZE=26>\n",
           htmlspecialchars($addrquery));
 
    // Show personal addressbook
    if(!isset($addrquery) || !empty($listall)) {
 
-      if($backend != -1 || !isset($addrquery)) {
+      if((isset($backend) && $backend != -1) || !isset($addrquery)) {
          if(!isset($addrquery)) 
             $backend = $abook->localbackend;
 
index c1d584b74e439a199ab77d6316f4fb33c39c0273..f8a0e49a522b05356e4ff2a1ed22345c1267e04a 100644 (file)
@@ -7,18 +7,19 @@
     **
     **  Manage personal address book.
     **
+    **  $Id$
     **/
 
    session_start();
 
+   if (!isset($strings_php))
+      include("../functions/strings.php");
    if (!isset($config_php))
       include("../config/config.php");
    if (!isset($array_php))
       include("../functions/array.php");
    if (!isset($auth_php))
       include("../functions/auth.php");
-   if (!isset($strings_php))
-      include("../functions/strings.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($display_messages_php))
       printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
             "<INPUT NAME=\"%s[nickname]\" SIZE=15 VALUE=\"%s\">".
             "&nbsp;<SMALL>%s</SMALL></TD></TR>\n",
-            $color[4], $name, htmlspecialchars($values["nickname"]), 
+            $color[4], $name, 
+            (isset($values["nickname"]))?
+                htmlspecialchars($values["nickname"]):"",
             _("Must be unique"));
       printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
             _("E-mail address"));
       printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
             "<INPUT NAME=\"%s[email]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
-            $color[4], $name, htmlspecialchars($values["email"]));
+            $color[4], $name, 
+            (isset($values["email"]))?
+                htmlspecialchars($values["email"]):"");
       printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
             _("First name"));
       printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
             "<INPUT NAME=\"%s[firstname]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
-            $color[4], $name, htmlspecialchars($values["firstname"]));
+            $color[4], $name, 
+            (isset($values["firstname"]))?
+                htmlspecialchars($values["firstname"]):"");
       printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
             _("Last name"));
       printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
             "<INPUT NAME=\"%s[lastname]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
-            $color[4], $name, htmlspecialchars($values["lastname"]));
+            $color[4], $name, 
+            (isset($values["lastname"]))?
+                htmlspecialchars($values["lastname"]):"");
       printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
             _("Additional info"));
       printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
             "<INPUT NAME=\"%s[label]\" SIZE=45 VALUE=\"%s\"></TD></TR>\n",
-            $color[4], $name, htmlspecialchars($values["label"]));
+            $color[4], $name, 
+            (isset($values["label"]))?
+                htmlspecialchars($values["label"]):"");
 
       printf("<TR><TD COLSPAN=2 BGCOLOR=\"%s\" ALIGN=center>\n".
             "<INPUT TYPE=submit NAME=\"%s[SUBMIT]\" VALUE=\"%s\"></TD></TR>\n",
index 4655e3818059d05e84b83b087d3106b9ce4ed7cb..841d0c007e007c7ed3f0c5cc3b0e2832e971b92d 100644 (file)
     **  - Start new mail
     **  - Add an attachment
     **  - Send mail
+    **
+    ** $Id$
     **/
 
    session_start();
 
-   if (!isset($config_php))
-      include("../config/config.php");
    if (!isset($strings_php))
       include("../functions/strings.php");
+   if (!isset($config_php))
+      include("../config/config.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($imap_php))
@@ -53,7 +55,7 @@
          $id = $reply_id;
 
 
-      if ($id) {
+      if (isset($id)) {
          sqimap_mailbox_select($imapConnection, $mailbox);
          $message = sqimap_get_message($imapConnection, $id, $mailbox);
          $orig_header = $message->header;
       $mailbox = "INBOX";
 
    if(isset($send)) {
-      if ($HTTP_POST_FILES['attachfile']['tmp_name'] &&
+      if (isset($HTTP_POST_FILES['attachfile']) &&
+          $HTTP_POST_FILES['attachfile']['tmp_name'] &&
           $HTTP_POST_FILES['attachfile']['tmp_name'] != 'none')
           $AttachFailure = saveAttachedFiles();
-      if (checkInput(false) && ! $AttachFailure) {
+      if (checkInput(false) && ! isset($AttachFailure)) {
          $urlMailbox = urlencode ($mailbox);
+        if (! isset($reply_id))
+            $reply_id = 0;
          sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id);
          header ("Location: right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=1");
       } else {
          showInputForm();
          //sqimap_logout($imapConnection);
       }
-   } else if ($html_addr_search_done) {
+   } else if (isset($html_addr_search_done)) {
       is_logged_in();
       displayPageHeader($color, $mailbox);
 
       }
       
       showInputForm();
-   } else if ($html_addr_search) {
+   } else if (isset($html_addr_search)) {
       // I am using an include so as to elminiate an extra unnecessary click.  If you
       // can think of a better way, please implement it.
       include ("./addrbook_search_html.php");
       }
 
       showInputForm();
-       } else if ($smtpErrors) {
+       } else if (isset($smtpErrors)) {
       $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
       displayPageHeader($color, $mailbox);
 
 
       $newmail = true;
                
-      if ($forward_id && $ent_num)  getAttachments(0);
+      if (isset($forward_id) && isset($ent_num))  getAttachments(0);
               
       newMail();
       showInputForm();
index 4be7772f584af44e4b6b72665460367dcbe06050..966578e0f9ee123c7e9a417664b8f13ffa213089 100644 (file)
@@ -6,15 +6,16 @@
     **  Licensed under the GNU GPL. For full terms see the file COPYING.
     **
     **  Deletes a meesage from the IMAP server 
-    **  
+    **
+    **  $Id$
     **/
 
    session_start();
 
-   if (!isset($config_php))
-      include("../config/config.php");
    if (!isset($strings_php))
       include("../functions/strings.php");
+   if (!isset($config_php))
+      include("../config/config.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($display_message_php))
index 03505fb3c7c28a35c9d7450e771c8a85fdbcb1f9..d24b9048d5474f4610d7e7178e5994d2679da114 100644 (file)
@@ -7,6 +7,8 @@
     **
     **  Handles attachment downloads to the users computer.
     **  Also allows displaying of attachments when possible.
+    **
+    **  $Id$
     **/
 
    if (!isset($config_php))
index 2cec2decf31cb58df8ec16a67b28021fff9ca206..42023fe056a185d23940ee8f9b8c8dbee63ada63 100644 (file)
@@ -7,6 +7,8 @@
     **
     **  Handles deleting messages from the trash folder without
     **  deleting subfolders.
+    **
+    **  $Id$
     **/
 
    session_start();
index 9699514de2e1644aea9de7ee01d18c43a531899f..69898a58988eb9ca0d9ac8696f9204ab822c4be6 100644 (file)
@@ -8,14 +8,16 @@
     **  Handles all interaction between the user and the other folder
     **  scripts which do most of the work. Also handles the Special
     **  Folders.
+    **
+    **  $Id$
     **/
 
    session_start();
 
-   if (!isset($config_php))
-      include("../config/config.php");
    if (!isset($strings_php))
       include("../functions/strings.php");
+   if (!isset($config_php))
+      include("../config/config.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($imap_php))
@@ -36,7 +38,9 @@
    echo "   </b></TD></TR>\n";
    echo "</TABLE>\n";
 
-   if ($success || $sent_create == "true" || $trash_create == "true") {
+   if ((isset($success) && $success) || 
+       (isset($sent_create) && $sent_create == "true") || 
+       (isset($trash_create) && $trash_create == "true")) {
       echo "<table width=100% align=center cellpadding=3 cellspacing=0 border=0>\n";
       echo "   <tr><td><center>\n";
       if ($success == "subscribe") {
index 96db1f155ffc1c4f7ef357a0dcf50537a5ef7cbf..3bbe0e6667d35a7a6187177d8a0043c9d0c1bdcf 100644 (file)
@@ -7,6 +7,8 @@
     **
     **  Creates folders on the IMAP server. 
     **  Called from folders.php
+    **
+    **  $Id$
     **/
 
    session_start();
index d13b2d7307fb148b63048632f9f229e4e8c7147a..a05780ceb323dc1c02982d4900c7f05f8c463acd 100644 (file)
@@ -7,6 +7,8 @@
     **
     **  Deltes folders from the IMAP server. 
     **  Called from the folders.php
+    **
+    **  $Id$
     **/
 
    session_start();
index 78c2a1127b59c6d6a5d8e323d93a97b5e723b123..9a35573808516f8d809c1b59e74a18476696bc62 100644 (file)
@@ -7,6 +7,8 @@
     **
     **  Does the actual renaming of files on the IMAP server. 
     **  Called from the folders.php
+    **
+    **  $Id$
     **/
 
    session_start();
index a138955089f29ed4d8d303f3b7fc9ec3d774ba9a..e92f653eb381cd0027fff66abe25661aad27a868 100644 (file)
@@ -7,6 +7,8 @@
     **
     **  Gets folder names and enables renaming
     **  Called from folders.php
+    **
+    **  $Id$
     **/
 
    session_start();
index ef8c984778b576208515ae11c2038cf74b65007f..a8993933e953f0f4916ef7557febee9f65437d97 100644 (file)
@@ -7,6 +7,8 @@
     **
     **  Subscribe and unsubcribe form folders. 
     **  Called from folders.php
+    **
+    **  $Id$
     **/
 
    session_start();
index 82af1cc4b1553ba3f16ef22c5eb40ea883a18b35..09fcb1ad67e342574fcd2eb9416b3c13b9a46e81 100644 (file)
@@ -7,6 +7,7 @@
     **
     **  Displays help for the user
     **
+    **  $Id$
     **/
 
    session_start();
index 6a0825ebc22aed1c2f3f79e9f166f4ab73550cde..718c0ffa8329389177ef1a686679463a6c2faf68 100644 (file)
@@ -7,6 +7,7 @@
     **  This is the code for the left bar.  The left bar shows the folders
     **  available, and has cookie information.
     **
+    **  $Id$
     **/
 
    session_start();
    }
 
 
+   if (!isset($strings_php))
+      include("../functions/strings.php");
    if (!isset($config_php))
       include("../config/config.php");
    if (!isset($array_php))
       include("../functions/array.php");
-   if (!isset($strings_php))
-      include("../functions/strings.php");
    if (!isset($imap_php))
       include("../functions/imap.php");
    if (!isset($page_header_php))
@@ -76,7 +77,7 @@
          }
       }
       
-      $line .= "<NOBR>";
+      $line = "<NOBR>";
       if ($unseen > 0)
          $line .= "<B>";
 
       if ($unseen > 0)
          $line .= "</B>";
       
-      if ($unseen_found) {
+      if (isset($unseen_found) && $unseen_found) {
          $line .= "&nbsp;<small>$unseen_string</small>";
       }
 
             $line .= replace_spaces($mailbox);
             $line .= "</FONT>";
          } else {
+           if (! isset($boxes[$i]["unseen"])) 
+               $boxes[$i]["unseen"] = 0;
             $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
          }
       } else {
index 2e7f80e48435d59b70e38be4f74ff92e8c78f7cd..01452b1ad68a933ef4521d01e060df36559871da 100644 (file)
@@ -8,6 +8,7 @@
     **  Loads preferences from the $username.pref file used by almost
     **  every other script in the source directory and alswhere.
     **
+    **  $Id$
     **/
 
    if (!isset($config_php))
@@ -59,7 +60,7 @@
       }
    }
 
-    if (!$download_php) session_register("theme_css");
+    if (!isset($download_php)) session_register("theme_css");
 
    $use_javascript_addr_book = getPref($data_dir, $username, "use_javascript_addr_book");
    if ($use_javascript_addr_book == "")
index cd1056e4e5f06f5fe2023747d4320567a4bdcfbd..d23bf5f91dfdfae069eed729d4c00d311ddf1606 100644 (file)
@@ -6,14 +6,16 @@
     **  Licensed under the GNU GPL. For full terms see the file COPYING.
     **
     **  Enables message moving between folders on the IMAP server.
+    **
+    **  $Id$
     **/
 
    session_start();
 
-   if (!isset($config_php))
-      include("../config/config.php");
    if (!isset($strings_php))
       include("../functions/strings.php");
+   if (!isset($config_php))
+      include("../config/config.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($display_messages_php))
@@ -50,7 +52,7 @@
    sqimap_mailbox_select($imapConnection, $mailbox);
 
    // expunge-on-demand if user isn't using move_to_trash or auto_expunge
-   if($expungeButton) {
+   if(isset($expungeButton)) {
      sqimap_mailbox_expunge($imapConnection, $mailbox, true);
      $location = get_location();
      if ($where && $what)
@@ -59,7 +61,7 @@
        header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=". urlencode($mailbox));
    }
    // undelete messages if user isn't using move_to_trash or auto_expunge
-   elseif($undeleteButton) {
+   elseif(isset($undeleteButton)) {
       if (is_array($msg) == 1) {
          // Removes \Deleted flag from selected messages
          $j = 0;
@@ -86,7 +88,7 @@
       }
    }
    // If the delete button was pressed, the moveButton variable will not be set.
-   elseif (!$moveButton) {
+   elseif (!isset($moveButton)) {
       if (is_array($msg) == 1) {
          // Marks the selected messages ad 'Deleted'
          $j = 0;
index 7c684247c8fcfe66411ef8fc5452a5bd2e1fca5d..8b38ad2ba57a669eda76a91b95132f492172fabd 100644 (file)
@@ -8,14 +8,15 @@
     **  Displays the options page. Pulls from proper user preference files
     **  and config.php. Displays preferences as selected and other options.
     **
+    **  $Id$
     **/
 
    session_start();
 
-   if (!isset($config_php))
-      include("../config/config.php");
    if (!isset($strings_php))
       include("../functions/strings.php");
+   if (!isset($config_php))
+      include("../config/config.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($display_messages_php))
@@ -46,7 +47,7 @@
 </td></tr></table>
 
 <?php
-   if ($submit_personal) {
+   if (isset($submit_personal)) {
       # Save personal information
       if (isset($full_name)) setPref($data_dir, $username, "full_name", sqStripSlashes($full_name));
       if (isset($email_address)) setPref($data_dir, $username, "email_address", sqStripSlashes($email_address));
@@ -57,7 +58,7 @@
       do_hook("options_personal_save");
       
       echo "<br><center><b>"._("Successfully saved personal information!")."</b></center><br>";
-   } else if ($submit_display) {  
+   } else if (isset($submit_display)) {  
       # Save display preferences
       setPref($data_dir, $username, "chosen_theme", $chosentheme);
       setPref($data_dir, $username, "show_num", $shownum);
@@ -74,7 +75,7 @@
 
       echo "<br><center><b>"._("Successfully saved display preferences!")."</b><br>";
       echo "<a href=\"../src/webmail.php\" target=_top>" . _("Refresh Page") . "</a></center><br>";
-   } else if ($submit_folder) { 
+   } else if (isset($submit_folder)) { 
       # Save folder preferences
       if ($trash != "none") {
          setPref($data_dir, $username, "move_to_trash", true);
index d8ef0eb5e73e08e3c06c3cd730eed7b06ed16c70..d98b30e8ae59f755e05c512cf352c93b1e74afab 100644 (file)
@@ -7,6 +7,7 @@
     **
     **  Displays all optinos about display preferences
     **
+    **  $Id$
     **/
 
    session_start();
index bacd3effb1d0239293904e984aca605b9f8261b5..10da1f0e5357ceadc3113bcfec06a392f00be3ff 100644 (file)
@@ -7,6 +7,7 @@
     **
     **  Displays all options relating to folders
     **
+    **  $Id$
     **/
 
    session_start();
index 490d24b2d7f9dd31cca39059adff28a656dd9254..6e64eaa0cb053b8613d52a0ee5e3dc9eb0bc9e1b 100644 (file)
@@ -7,6 +7,7 @@
     **
     **  Displays message highlighting options
     **
+    **  $Id$
     **/
 
    session_start();
index 8088d7982cb71c1c72d5f0806971e4db4c8c6f8f..f253b456b4a6b9453e796d7a8c609e25cc6bfef8 100644 (file)
@@ -7,6 +7,7 @@
     **
     **  Displays message highlighting options
     **
+    **  $Id$
     **/
 
    session_start();
index df5adea18f417164f3d1cec07010cefac75e13ac..7db053d03cfe14e58b2bb2a1c0fc571209023bd6 100644 (file)
@@ -7,14 +7,15 @@
     **
     **  Displays all options relating to personal information
     **
+    **  $Id$
     **/
 
    session_start();
 
-   if (!isset($config_php))
-      include("../config/config.php");
    if (!isset($strings_php))
       include("../functions/strings.php");
+   if (!isset($config_php))
+      include("../config/config.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($display_messages_php))
index 609635c538ac00cf7859080089e2f01f582f5a0d..d3302e3b7296158f29bbbf2c9b1f045c897b35b2 100644 (file)
@@ -7,14 +7,16 @@
    **
    **  This file is used for reading the msgs array and displaying
    **  the resulting emails in the right frame.
+   **
+   **  $Id$
    **/
 
    session_start();
 
-   if (!isset($config_php))
-      include("../config/config.php");
    if (!isset($strings_php))
       include("../functions/strings.php");
+   if (!isset($config_php))
+      include("../config/config.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($imap_php))
@@ -32,7 +34,7 @@
    do_hook("html_top");
    displayPageHeader($color, $mailbox);
 
-   if ($view_hdr) {
+   if (isset($view_hdr)) {
       fputs ($imapConnection, "a003 FETCH $passed_id BODY[HEADER]\r\n");
       $read = sqimap_read_data ($imapConnection, "a003", true, $a, $b); 
       
index 8a500d65b54b6b2d107666f49ede11706cb47b32..b99ad2e04d9c877200ee89455ed420be5fafaec2 100644 (file)
@@ -10,6 +10,7 @@
     **  prevents users from reposting their form data after a
     **  successful logout
     **
+    **  $Id$
     **/
 
    if (!isset($strings_php))
index 6f4d2149b6cc0ba549fbb5223c24d56736873871..11d09a535e4a2c9c2545c182f48cbe63a1cc0bb5 100644 (file)
@@ -8,6 +8,7 @@
     **  This is where the mailboxes are listed.  This controls most of what
     **  goes on in SquirrelMail.
     **
+    **  $Id$
     **/
 
    if (!isset($i18n_php))
       exit;
    }
 
+   if (!isset($strings_php))
+      include("../functions/strings.php");
    if (!isset($config_php))
       include("../config/config.php");
    if (!isset($imap_php))
       include("../functions/imap.php");
-   if (!isset($strings_php))
-      include("../functions/strings.php");
    if (!isset($date_php))
       include("../functions/date.php");
    if (!isset($page_header_php))
@@ -89,7 +90,8 @@
 
    do_hook("right_main_after_header");
    
-   if ($just_logged_in == 1 && strlen(trim($motd)) > 0) {
+   if (isset($just_logged_in) && $just_logged_in == 1 && 
+       strlen(trim($motd)) > 0) {
       echo "<center><br>\n";
       echo "<table width=70% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=\"$color[9]\">\n";
       echo "<table width=100% cellpadding=5 cellspacing=1 border=0><tr><td bgcolor=\"$color[4]\">\n";
    // Check to see if we can use cache or not.  Currently the only time when you wont use it is
    //    when a link on the left hand frame is used.  Also check to make sure we actually have the
    //    array in the registered session data.  :)
+   if (! isset($use_mailbox_cache))
+       $use_mailbox_cache = 0;
    if ($use_mailbox_cache && session_is_registered("msgs")) {
       showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
    } else {
index 570c5c7c6801cfaa44722e3d090c925dc5df0a6d..3bdcbdbe5dfb3a789977c230fe406f5ffd965715 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+   /* $Id$ */
+
    session_start();
 
    if(!isset($logged_in)) {
       exit;
    }
 
+   if (!isset($strings_php))
+      include("../functions/strings.php");
    if (!isset($i18n_php))
       include("../functions/i18n.php");
    if (!isset($config_php))
       include("../config/config.php");
-   if (!isset($strings_php))
-      include("../functions/strings.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
    if (!isset($imap_php))
@@ -66,6 +69,8 @@
    echo "         </SELECT></SMALL></TT>";
    echo "       </TD>\n";
    echo "        <TD ALIGN=\"CENTER\" WIDTH=33%>\n";
+   if (!isset($what))
+       $what = "";
    $what_disp = ereg_replace(",", " ", $what);
    $what_disp = str_replace("\\\\", "\\", $what_disp);
    $what_disp = str_replace("\\\"", "\"", $what_disp);
    echo "</FORM>";
    echo "</td></tr></table>";
    do_hook("search_after_form");
-   if ($where && $what) {   
+   if (isset($where) && $where && isset($what) && $what) {   
       sqimap_mailbox_select($imapConnection, $mailbox);
       sqimap_search($imapConnection, $where, $what, $mailbox, $color);
    }
index ebf2fa6e0d69904b00daf908d3a29d10172800a2..c3f1f8bc87775dd947ec40945154c58d39a1d2dd 100644 (file)
@@ -1,6 +1,4 @@
 <?php
-   session_start();
-
    /**
     **  signout.php -- cleans up session and logs the user out
     **
@@ -10,8 +8,11 @@
     **  Cleans up after the user. Resets cookies and terminates
     **  session.
     **
+    **  $Id$
     **/
 
+   session_start();
+
    include ("../src/load_prefs.php");
 
    if (!isset($config_php))
index 704d65499e52edcf25e5cbd1d834e9bd6ac8fb97..c239a898862edb6a40bafe0080df1ca91ee6bfb6 100644 (file)
@@ -10,6 +10,7 @@
     **  shown can be given as parameters. If the user is not logged in
     **  this file will verify username and password.
     **
+    **  $Id$
     **/
 
    session_start();
@@ -30,6 +31,8 @@
       exit;
    }
 
+   if (!isset($strings_php))
+      include ("../functions/strings.php");
    include ("../config/config.php");
    include ("../functions/prefs.php");
    include ("../functions/imap.php");
@@ -37,8 +40,7 @@
       include ("../functions/plugin.php");
    if (!isset($auth_php))
       include ("../functions/auth.php");
-   if (!isset($strings_php))
-      include ("../functions/strings.php");
+
 
    include ("../src/load_prefs.php");