Took out cvs confusion
authorlbergman <lbergman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 30 Jan 2001 19:16:25 +0000 (19:16 +0000)
committerlbergman <lbergman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 30 Jan 2001 19:16:25 +0000 (19:16 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@988 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/addrbook_popup.php
src/addrbook_search.php
src/addrbook_search_html.php
src/addressbook.php
src/webmail.php

index caa69bd501c5bce68678d456bb2c16e66788bfec..6ba634aa47eac220574d24943cde6564a9791650 100644 (file)
    session_start();
 
    if (!isset($i18n_php))
-      include("../functions/i18n.php");
+      include('../functions/i18n.php');
    if (!isset($config_php))
-      include("../config/config.php");
+      include('../config/config.php');
    if (!isset($page_header_php))
-      include("../functions/page_header.php");
+      include('../functions/page_header.php');
    if (!isset($auth_php))
-      include("../functions/auth.php");
+      include('../functions/auth.php');
    if (!isset($addressbook_php))
-      include("../functions/addressbook.php");
+      include('../functions/addressbook.php');
 
    is_logged_in();
 
-   include("../src/load_prefs.php");
+   include('../src/load_prefs.php');
    
-   set_up_language(getPref($data_dir, $username, "language"));
+   set_up_language(getPref($data_dir, $username, 'language'));
    
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
index ed05ba998a7494d190ddfaaa12cf39737ab4326b..cb2767efb706a817aab4919aea6ab6ccf7add4da 100644 (file)
@@ -91,7 +91,7 @@ function bcc_address($addr) {
       insert_javascript();
 
       $line = 0;
-      print "<TABLE BORDER=0 WIDTH=\"98%\" ALIGN=center>";
+      print '<TABLE BORDER="0" WIDTH="98%" ALIGN=center>';
       printf("<TR BGCOLOR=\"$color[9]\"><TH ALIGN=left>&nbsp;".
             "<TH ALIGN=left>&nbsp;%s<TH ALIGN=left>&nbsp;%s".
             "<TH ALIGN=left>&nbsp;%s",
@@ -121,7 +121,7 @@ function bcc_address($addr) {
         print "</TR>\n";
         $line++;
       }
-      print "</TABLE>";
+      print '</TABLE>';
    }
 
    /* ================= End of functions ================= */
@@ -129,42 +129,42 @@ function bcc_address($addr) {
    session_start();
    
    if (!isset($i18n_php))
-      include("../functions/i18n.php");
+      include('../functions/i18n.php');
 
    if(!isset($logged_in) || !isset($username) || !isset($key)) {
-      include ("../themes/default_theme.php");
-      include ("../functions/display_messages.php");
+      include ('../themes/default_theme.php');
+      include ('../functions/display_messages.php');
       printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
               $color[8], $color[4], $color[7], $color[7], $color[7]);
       plain_error_message(_("You need a valid user and password to access this page!")
-                          . "<br><a href=\"../src/login.php\">"
+                          . '<br><a href="../src/login.php">'
                           . _("Click here to log back in.") . "</a>.", $color);
-      echo "</body></html>";
+      echo '</body></html>';
       exit;
    }
    if (!isset($config_php))
-      include("../config/config.php");
+      include('../config/config.php');
    if (!isset($array_php))
-      include("../functions/array.php");
+      include('../functions/array.php');
    if (!isset($auth_php))
-      include("../functions/auth.php");
+      include('../functions/auth.php');
    if (!isset($strings_php))
-      include("../functions/strings.php");
+      include('../functions/strings.php');
    if (!isset($page_header_php))
-      include("../functions/page_header.php");
+      include('../functions/page_header.php');
    if (!isset($addressbook_php))
-      include("../functions/addressbook.php");
+      include('../functions/addressbook.php');
 
    is_logged_in();
-   include("../src/load_prefs.php");
+   include('../src/load_prefs.php');
 
    displayHtmlHeader();
 
    // Choose correct colors for top and bottom frame
-   if($show == "form") {
+   if($show == 'form') {
       echo "<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" ";
       echo "LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\" ";
-      echo "OnLoad=\"document.sform.query.focus();\">";  
+      echo 'OnLoad="document.sform.query.focus();">';  
    } else {
       echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" ";
       echo "LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
@@ -181,11 +181,11 @@ function bcc_address($addr) {
    $abook = addressbook_init();
 
    // Create search form 
-   if($show == "form") {
+   if($show == 'form') {
       printf("<FORM NAME=sform TARGET=abookres ACTION=\"%s\" METHOD=\"POST\">\n",
             $PHP_SELF);
-      printf("<TABLE BORDER=0 WIDTH=\"100%%\" HEIGHT=\"100%%\">");
-      printf("<TR><TD NOWRAP VALIGN=middle>\n");
+      print('<TABLE BORDER="0" WIDTH="100%" HEIGHT="100%">');
+      print("<TR><TD NOWRAP VALIGN=middle>\n");
       printf("  <STRONG>%s</STRONG>\n", _("Search for"));
       printf("  <INPUT TYPE=text NAME=query VALUE=\"%s\" SIZE=26>\n",
             htmlspecialchars($query));
@@ -199,26 +199,26 @@ function bcc_address($addr) {
         $ret = $abook->get_backend_list();
         while(list($undef,$v) = each($ret)) 
            printf("<OPTION VALUE=%d>%s\n", $v->bnum, $v->sname);
-        printf("</SELECT>\n");
+        print "</SELECT>\n";
       } else {
-        printf("<INPUT TYPE=hidden NAME=backend VALUE=-1>\n");
+        print "<INPUT TYPE=hidden NAME=backend VALUE=-1>\n";
       }
 
       printf("<INPUT TYPE=submit VALUE=\"%s\">",
             _("Search"));
       printf("&nbsp;|&nbsp;<INPUT TYPE=submit VALUE=\"%s\" NAME=listall>\n",
              _("List all"));
-      printf("</TD><TD ALIGN=right>\n");
+      print "</TD><TD ALIGN=right>\n";
       printf("<INPUT TYPE=button VALUE=\"%s\" onclick=\"parent.close();\">\n",
              _("Close window"));
-      printf("</TD></TR></TABLE></FORM>\n");
+      print "</TD></TR></TABLE></FORM>\n";
    } else
 
    // Show personal addressbook
-   if($show == "blank" || !empty($listall)) {
+   if($show == 'blank' || !empty($listall)) {
 
-      if($backend != -1 || $show == "blank") {
-        if($show == "blank"
+      if($backend != -1 || $show == 'blank') {
+        if($show == 'blank'
            $backend = $abook->localbackend;
 
         //printf("<H3 ALIGN=center>%s</H3>\n", $abook->backends[$backend]->sname);
index d7407d8b6aea5b1a4a5d2c7261a3b1d764a070ef..7dcc067ca88b3f564a0774e87bea82173b2e3678 100644 (file)
    session_start();
 
    if (!isset($config_php))
-      include("../config/config.php");
+      include('../config/config.php');
    if (!isset($strings_php))
-      include("../functions/strings.php");
+      include('../functions/strings.php');
    if (!isset($auth_php))
-      include("../functions/auth.php");
+      include('../functions/auth.php');
    if (!isset($page_header_php))
-      include("../functions/page_header.php");
+      include('../functions/page_header.php');
    if (!isset($date_php))
-      include("../functions/date.php");
+      include('../functions/date.php');
    if (!isset($smtp_php))
-      include("../functions/smtp.php");
+      include('../functions/smtp.php');
    if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
+      include('../functions/display_messages.php');
    if (!isset($addressbook_php))
-      include("../functions/addressbook.php");
+      include('../functions/addressbook.php');
    if (!isset($plugin_php))
-      include("../functions/plugin.php");
+      include('../functions/plugin.php');
 
-   include("../src/load_prefs.php");
+   include('../src/load_prefs.php');
 
    // Insert hidden data
    function addr_insert_hidden() {
       global $body, $subject, $send_to, $send_to_cc, $send_to_bcc;
       
-      echo "<input type=hidden value=\"";
+      echo '<input type=hidden value="';
       if (substr($body, 0, 1) == "\r")
           echo "\n";
-      echo htmlspecialchars($body) . "\" name=body>\n";
-      echo "<input type=hidden value=\"" . htmlspecialchars($subject)
-          . "\" name=subject>\n";
-      echo "<input type=hidden value=\"" . htmlspecialchars($send_to)
-          . "\" name=send_to>\n";
+      echo htmlspecialchars($body) . '" name=body>\n"';
+      echo '<input type=hidden value="' . htmlspecialchars($subject)
+          . '" name=subject>\n"';
+      echo '<input type=hidden value="' . htmlspecialchars($send_to)
+          . '" name=send_to>\n"';
       echo "<input type=hidden value=\"" . htmlspecialchars($send_to_cc)
-          . "\" name=send_to_cc>\n";
+          . '" name=send_to_cc>\n"';
       echo "<input type=hidden value=\"" . htmlspecialchars($send_to_bcc)
-          . "\" name=send_to_bcc>\n";
+          . '" name=send_to_bcc>\n"';
       echo "<input type=hidden value=\"true\" name=from_htmladdr_search>\n";
    }
 
              'NAME="addr_search_done" VALUE="%s"></TD></TR>',
              4 + ($includesource ? 1 : 0), 
              _("Use Addresses"));
-      print "</TABLE>";
+      print '</TABLE>';
       print '<INPUT TYPE=hidden VALUE=1 NAME="html_addr_search_done">';
-      print "</FORM>";
+      print '</FORM>';
    }
 
    // --- End functions ---
 
-   displayPageHeader($color, "None");
+   displayPageHeader($color, 'None');
 
    // Initialize addressbook
    $abook = addressbook_init();
    // Search form
    print "<CENTER>\n";
    print "<TABLE BORDER=0>\n";
-   printf("<TR><TD NOWRAP VALIGN=middle>\n");
+   print "<TR><TD NOWRAP VALIGN=middle>\n";
    printf('<FORM METHOD=post NAME=f ACTION="%s?html_addr_search=true">'."\n", $PHP_SELF);
    print "<CENTER>\n";
    printf("  <nobr><STRONG>%s</STRONG>\n", _("Search for"));
                 $v->bnum, 
                 ($backend == $v->bnum) ? "SELECTED" : "",
                 $v->sname);
-      printf("</SELECT>\n");
+      print "</SELECT>\n";
    } else {
-      printf("<INPUT TYPE=hidden NAME=backend VALUE=-1>\n");
+      print "<INPUT TYPE=hidden NAME=backend VALUE=-1>\n";
    }
    printf("<INPUT TYPE=submit VALUE=\"%s\">",
           _("Search"));
    printf("&nbsp;|&nbsp;<INPUT TYPE=submit VALUE=\"%s\" NAME=listall>\n",
           _("List all"));
-   print "</FORM></center>";
+   print '</FORM></center>';
 
-   printf("</TD></TR></TABLE>\n");
+   print "</TD></TR></TABLE>\n";
    addr_insert_hidden();
    print "</CENTER>";
-   do_hook("addrbook_html_search_below");
+   do_hook('addrbook_html_search_below');
    // End search form
 
    // Show personal addressbook
       printf('<center><FORM METHOD=post NAME=k ACTION="compose.php">'."\n", $PHP_SELF);
       addr_insert_hidden();
       printf("<INPUT TYPE=submit VALUE=\"%s\" NAME=return>\n", _("Return"));
-      printf('</form>');
-      printf("</center></nobr>");
+      print '</form>';
+      print '</center></nobr>';
    }   
 
 ?>
index f8a0e49a522b05356e4ff2a1ed22345c1267e04a..2ad610ea4bcbe5e95fd65487305680e6fa96a158 100644 (file)
    session_start();
 
    if (!isset($strings_php))
-      include("../functions/strings.php");
+      include('../functions/strings.php');
    if (!isset($config_php))
-      include("../config/config.php");
+      include('../config/config.php');
    if (!isset($array_php))
-      include("../functions/array.php");
+      include('../functions/array.php');
    if (!isset($auth_php))
-      include("../functions/auth.php");
+      include('../functions/auth.php');
    if (!isset($page_header_php))
-      include("../functions/page_header.php");
+      include('../functions/page_header.php');
    if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
+      include('../functions/display_messages.php');
    if (!isset($addressbook_php))
-      include("../functions/addressbook.php");
+      include('../functions/addressbook.php');
 
    is_logged_in();
 
    // Sort array by the key "name"
    function alistcmp($a,$b) {   
-      if($a["backend"] > $b["backend"]) 
+      if($a['backend'] > $b['backend']) 
         return 1;
-      else if($a["backend"] < $b["backend"]) 
+      else if($a['backend'] < $b['backend']) 
         return -1;
       
-      return (strtolower($a["name"]) > strtolower($b["name"])) ? 1 : -1;
+      return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1;
    }
 
    // Output form to add and modify address data
@@ -49,8 +49,8 @@
             "<INPUT NAME=\"%s[nickname]\" SIZE=15 VALUE=\"%s\">".
             "&nbsp;<SMALL>%s</SMALL></TD></TR>\n",
             $color[4], $name, 
-            (isset($values["nickname"]))?
-                htmlspecialchars($values["nickname"]):"",
+            (isset($values['nickname']))?
+                htmlspecialchars($values['nickname']):"",
             _("Must be unique"));
       printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
             _("E-mail address"));
@@ -89,7 +89,7 @@
    }
 
 
-   include("../src/load_prefs.php");
+   include('../src/load_prefs.php');
 
    // Open addressbook, with error messages on but without LDAP (the
    // second "true"). Don't need LDAP here anyway
       exit();
    }
 
-   displayPageHeader($color, "None");
+   displayPageHeader($color, 'None');
 
 
    $defdata   = array();
-   $formerror = "";
+   $formerror = '';
    $abortform = false;
    $showaddrlist = true;
    $defselected  = array();
 
 
    // Handle user's actions
-   if($REQUEST_METHOD == "POST") {
+   if($REQUEST_METHOD == 'POST') {
 
       // ***********************************************
       // Add new address
       // ***********************************************
-      if(!empty($addaddr["nickname"])) {
+      if(!empty($addaddr['nickname'])) {
         
         $r = $abook->add($addaddr, $abook->localbackend);
 
         if(!$r) {
            // Remove backend name from error string
            $errstr = $abook->error;
-           $errstr = ereg_replace("^\[.*\] *", "", $errstr);
+           $errstr = ereg_replace('^\[.*\] *', '', $errstr);
 
            $formerror = $errstr;
            $showaddrlist = false;
         $delfailed = false;
 
         for($i = 0 ; (($i < sizeof($sel)) && !$delfailed) ; $i++) {
-           list($sbackend, $snick) = split(":", $sel[$i]);
+           list($sbackend, $snick) = split(':', $sel[$i]);
 
            // When we get to a new backend, process addresses in
            // previous one.
               $olddata = $abook->lookup($enick, $ebackend);
 
               // Display the "new address" form
-              printf("<FORM ACTION=\"%s\" METHOD=\"POST\">\n", $PHP_SELF);
+              print "<FORM ACTION=\"$PHP_SELF\" METHOD=\"POST\">\n";
               print "<TABLE WIDTH=100% COLS=1 ALIGN=CENTER>\n";
               print "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>\n<STRONG>";
               print _("Update address");
               printf("<INPUT TYPE=hidden NAME=backend VALUE=\"%s\">\n",
                      htmlspecialchars($olddata["backend"]));
               print "<INPUT TYPE=hidden NAME=doedit VALUE=1>\n";
-              print "</FORM>";
+              print '</FORM>';
            }
         }
 
               printf("<INPUT TYPE=hidden NAME=backend VALUE=\"%s\">\n",
                      htmlspecialchars($backend));
               print "<INPUT TYPE=hidden NAME=doedit VALUE=1>\n";
-              print "</FORM>";        
+              print '</FORM>';        
 
               $abortform = true;
            }
         // New table header for each backend
         if($prevbackend != $row["backend"]) {
            if($prevbackend >= 0) {
-              print "<TR><TD COLSPAN=5 ALIGN=center>";
+              print '<TR><TD COLSPAN="5" ALIGN=center>';
               print "&nbsp;<BR></TD></TR></TABLE>\n";
            }
 
            print "<STRONG>\n</TD></TR>\n";
            print "</TABLE>\n";
 
-           print '<TABLE COLS=5 BORDER=0 CELLPADDING=1 CELLSPACING=0 WIDTH="90%" ALIGN=center>';
+           print '<TABLE COLS="5" BORDER="0" CELLPADDING="1" CELLSPACING="0" WIDTH="90%" ALIGN="center">';
            printf('<TR BGCOLOR="%s"><TH ALIGN=left WIDTH="%s">&nbsp;'.
                   '<TH ALIGN=left WIDTH="%s">%s<TH ALIGN=left WIDTH="%s">%s'.
                   '<TH ALIGN=left WIDTH="%s">%s<TH ALIGN=left WIDTH="%s">%s'.
            $headerprinted = true;
         } // End of header
 
-        $prevbackend = $row["backend"];
+        $prevbackend = $row['backend'];
 
         // Check if this user is selected
-        if(in_array($row["backend"].":".$row["nickname"], $defselected)) 
-           $selected = "CHECKED";
+        if(in_array($row['backend'].':'.$row['nickname'], $defselected)) 
+           $selected = 'CHECKED';
         else
-           $selected = "";
+           $selected = '';
       
         // Print one row
         printf("<TR%s>",
    printf(_("Add to %s"), $abook->localbackendname);
    print "<STRONG>\n</TD></TR>\n";
    print "</TABLE>\n";
-   address_form("addaddr", _("Add address"), $defdata);
-   print "</FORM>";
+   address_form('addaddr', _("Add address"), $defdata);
+   print '</FORM>';
 
    // Add hook for anything that wants on the bottom
    do_hook("addressbook_bottom");
index c239a898862edb6a40bafe0080df1ca91ee6bfb6..8ca5aa8e787608eb9c9ad0ca330dbc0cb729b7ea 100644 (file)
    session_start();
 
    if (!isset($i18n_php))
-      include ("../functions/i18n.php");
+      include ('../functions/i18n.php');
 
    if(!isset($username)) {
       set_up_language($squirrelmail_language);
-         include ("../themes/default_theme.php");
-         include ("../functions/display_messages.php");
+         include ('../themes/default_theme.php');
+         include ('../functions/display_messages.php');
          printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
                          $color[8], $color[4], $color[7], $color[7], $color[7]);
          plain_error_message(_("You need a valid user and password to access this page!") 
                              . "<br><a href=\"../src/login.php\">" 
                                                  . _("Click here to log back in.") . "</a>.", $color);
-         echo "</body></html>";
+         echo '</body></html>';
       exit;
    }
 
    if (!isset($strings_php))
-      include ("../functions/strings.php");
-   include ("../config/config.php");
-   include ("../functions/prefs.php");
-   include ("../functions/imap.php");
+      include ('../functions/strings.php');
+   include ('../config/config.php');
+   include ('../functions/prefs.php');
+   include ('../functions/imap.php');
    if (!isset($plugin_php))
-      include ("../functions/plugin.php");
+      include ('../functions/plugin.php');
    if (!isset($auth_php))
-      include ("../functions/auth.php");
+      include ('../functions/auth.php');
 
-
-   include ("../src/load_prefs.php");
+   include ('../src/load_prefs.php');
 
    // We'll need this to later have a noframes version
-   set_up_language(getPref($data_dir, $username, "language"));
+   set_up_language(getPref($data_dir, $username, 'language'));
 
    echo "<html><head>\n";
-   echo "<TITLE>";
-   echo "$org_title";
-   echo "</TITLE>";
+   echo '<TITLE>';
+   echo $org_title;
+   echo '</TITLE>';
    
    $bar_size = $left_size;
    
     This was done to create a pure HTML way of refreshing the folder list since
     we would like to use as little Javascript as possible.
 **/
-   if ($right_frame == "right_main.php") {
+   if ($right_frame == 'right_main.php') {
       $urlMailbox = urlencode($mailbox);
       $right_frame_url = "right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage";
-   } else if ($right_frame == "options.php") {
-      $right_frame_url = "options.php";
-   } else if ($right_frame == "folders.php") {
-      $right_frame_url = "folders.php";
+   } else if ($right_frame == 'options.php') {
+      $right_frame_url = 'options.php';
+   } else if ($right_frame == 'folders.php') {
+      $right_frame_url = 'folders.php';
    } else {
       if (!isset($just_logged_in)) $just_logged_in = 0;
       $right_frame_url = "right_main.php?just_logged_in=$just_logged_in";
    if ($location_of_bar == 'right')
    {
       echo "<FRAME SRC=\"$right_frame_url\" NAME=\"right\">";
-      echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
+      echo '<FRAME SRC="left_main.php" NAME="left">';
    }
    else
    {
-      echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
+      echo '<FRAME SRC="left_main.php" NAME="left">';
       echo "<FRAME SRC=\"$right_frame_url\" NAME=\"right\">";
    }