浏览代码

added bcc to html addressbook search (should have been there in first place)

Luke Ehresman 24 年之前
父节点
当前提交
54c74df953
共有 2 个文件被更改,包括 16 次插入10 次删除
  1. 2 1
      src/addrbook_search_html.php
  2. 14 9
      src/compose.php

+ 2 - 1
src/addrbook_search_html.php

@@ -85,11 +85,12 @@
          printf("<tr%s nowrap><td nowrap align=center width=\"5%%\">".
                 "<input type=checkbox name=\"send_to_search[]\" value=\"%s\">&nbsp;To".
                 "<input type=checkbox name=\"send_to_cc_search[]\" value=\"%s\">&nbsp;Cc&nbsp;".
+                "<input type=checkbox name=\"send_to_bcc_search[]\" value=\"%s\">&nbsp;Bcc&nbsp;".
                 "<td nowrap>&nbsp;%s&nbsp;<td nowrap>&nbsp;".
                 "%s".
                 "<td nowrap>&nbsp;%s&nbsp;",
                 ($line % 2) ? " bgcolor=\"$color[0]\"" : "", 
-                htmlspecialchars($row["email"]), htmlspecialchars($row["email"]), 
+                htmlspecialchars($row["email"]), htmlspecialchars($row["email"]), htmlspecialchars($row["email"]), 
                 $row["name"], $row["email"], $row["label"]);
          if($includesource)
             printf("<td nowrap>&nbsp;%s", $row["source"]);

+ 14 - 9
src/compose.php

@@ -41,10 +41,8 @@
    include("../src/load_prefs.php");
 
    if (!isset($attachments))
-   {
        $attachments = array();
-   }
-   
+
    // This function is used when not sending or adding attachments
    function newMail () {
       global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body,
@@ -304,19 +302,20 @@
       }
       
       // This code is for attachments
-      echo "   <tr bgcolor=\"$color[0]\">\n";
-      echo "     <TD VALIGN=TOP ALIGN=RIGHT>"._("Attach:");
-      echo "      </td><td ALIGN=left>\n";
+      echo "   <tr>\n";
+      echo "     <TD BGCOLOR=\"$color[0]\" VALIGN=TOP ALIGN=RIGHT>\n";
+      echo "      <SMALL><BR></SMALL>"._("Attach:");
+      echo "      </td><td ALIGN=left BGCOLOR=\"$color[0]\">\n";
       echo "      <INPUT NAME=\"attachfile\" SIZE=48 TYPE=\"file\">\n";
       echo "      &nbsp;&nbsp;<input type=\"submit\" name=\"attach\"";
       echo " value=\"" . _("Add") ."\">\n";
       echo "     </td>\n";
       echo "   </tr>\n";
       if (count($attachments) > 0) {
-         echo "<tr bgcolor=\"$color[0]\"><td align=right>\n";
+         echo "<tr><td bgcolor=\"$color[0]\" align=right>\n";
          echo "&nbsp;";
-         echo "</td><td align=left>";
-	 foreach ($attachments as $localname => $remotename) {
+         echo "</td><td align=left bgcolor=\"$color[0]\">";
+         while (list($localname, $remotename) = each($attachments)) {
             echo "<input type=\"checkbox\" name=\"delete[]\" value=\"$localname\">\n";
             echo "$remotename <input type=\"hidden\" name=\"attachments[$localname]\" value=\"$remotename\"><br>\n";
          }
@@ -471,6 +470,12 @@
          $send_to_cc .= $send_to_cc_search[$i];   
       }
       
+      for ($i=0; $i < count($send_to_bcc_search); $i++) {
+         if ($send_to_bcc)
+            $send_to_bcc .= ", ";
+         $send_to_bcc .= $send_to_bcc_search[$i];   
+      }
+      
       showInputForm();
    } else if (isset($html_addr_search)) {
       // I am using an include so as to elminiate an extra unnecessary click.  If you