displayPageHeader($color, "None");
//<form method=post action="compose.php?html_addr_search=true">
+
+ $body = stripslashes($body);
+ $send_to = stripslashes($send_to);
+ $send_to_cc = stripslashes($send_to_cc);
+ $send_to_bcc = stripslashes($send_to_bcc);
+ $subject = stripslashes($subject);
+
echo "<center>";
- echo "<form method=post action=\"addrbook_search_html.php\">";
+ echo "<form method=post action=\"compose.php?html_addr_search=true\">";
echo " <input type=text value=\"$query\"name=query>";
echo " <input type=submit value=Submit>";
+ echo " <input type=hidden value=\"$body\" name=body>";
+ echo " <input type=hidden value=\"$subject\" name=subject>";
+ echo " <input type=hidden value=\"$send_to\" name=send_to>";
+ echo " <input type=hidden value=\"$send_to_cc\" name=send_to_cc>";
+ echo " <input type=hidden value=\"$send_to_bcc\" name=send_to_bcc>";
echo "</form>";
echo "</center>";
+ echo "<tt>".nl2br($body)."</tt>";
+
if(!empty($query)) {
$abook = addressbook_init();
$res = $abook->s_search($query);
" %s</tr>\n",
_("Name"), _("E-mail"), _("Info"), _("Source"));
+ ?>
+ <form method=post action"compose.php?html_addr_search_done=true">
+ <?
+ echo " <input type=hidden value=\"$body\" name=body>";
+ echo " <input type=hidden value=\"$subject\" name=subject>";
+ echo " <input type=hidden value=\"$send_to\" name=send_to>";
+ echo " <input type=hidden value=\"$send_to_cc\" name=send_to_cc>";
+ echo " <input type=hidden value=\"$send_to_bcc\" name=send_to_bcc>";
+
while(list($key, $row) = each($res)) {
printf("<tr%s nowrap><td nowrap align=center width=\"5%%\">".
- "<a href=\"compose.php?send_to=%s\">To</A> | ".
- "<a href=\"compose.php?send_to_cc=%s\">Cc</A>".
+ "<input type=checkbox name=send_to_search[] value=\"%s\"> To".
+ "<input type=checkbox name=send_to_cc_search[] value=\"%s\"> Cc ".
"<td nowrap> %s <td nowrap> ".
- "<a href=\"compose.php?send_to=%s\">%s</A> ".
+ "<a href=\"compose.php?send_to_search=%s\">%s</A> ".
"<td nowrap> %s <td nowrap> %s</tr>\n",
($line % 2) ? " bgcolor=\"$color[0]\"" : "", $row["email"],
$row["email"], $row["name"], $row["email"], $row["email"],
$line++;
}
print "</TABLE>";
+ echo "<input type=hidden value=1 name=html_addr_search_done>";
+ echo "<center><input type=submit value=addr_search_done name=\"Use Addresses\"></center>";
+ echo "</form>";
}
?>
echo " <TEXTAREA NAME=body ROWS=20 COLS=\"$editor_size\" WRAP=HARD>".$body."</TEXTAREA><BR>\n";
echo " </TD>\n";
echo " </TR>\n";
- echo " <TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT NAME=send VALUE=\"";
+ echo " <TR><TD COLSPAN=3 ALIGN=CENTER><INPUT TYPE=SUBMIT NAME=send VALUE=\"";
echo _("Send");
echo "\"></TD></TR>\n";
echo " <tr>\n";
echo " <TD WIDTH=50 BGCOLOR=\"$color[0]\" VALIGN=TOP ALIGN=RIGHT>\n";
echo " <SMALL><BR></SMALL>"._("Attach:");
- echo " </td><td width=% ALIGN=left BGCOLOR=\"$color[0]\">\n";
+ echo " </td><td width=% colspan=2 ALIGN=left BGCOLOR=\"$color[0]\">\n";
// echo " <INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\"\n";
// echo " value=\"10000\">\n";
echo " <INPUT NAME=\"attachfile\" TYPE=\"file\">\n";
if (isset($attachments) && count($attachments)>0) {
echo "</tr><tr><td width=50 bgcolor=\"$color[0]\" align=right>\n";
echo " ";
- echo "</td><td width=% align=left bgcolor=\"$color[0]\">";
+ echo "</td><td width=% align=left colspan=2 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";
-
-
-
if(isset($send)) {
if (checkInput(false)) {
sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body);
showInputForm();
}
- } else if ($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");
} else if ($html_addr_search_done) {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
$send_to_bcc = stripslashes($send_to_bcc);
$subject = stripslashes($subject);
+ for ($i=0; $i < count($send_to_search); $i++) {
+ if ($send_to)
+ $send_to .= ", ";
+ $send_to .= $send_to_search[$i];
+ }
+
+ for ($i=0; $i < count($send_to_cc_search); $i++) {
+ if ($send_to_cc)
+ $send_to_cc .= ", ";
+ $send_to_cc .= $send_to_cc_search[$i];
+ }
+
showInputForm();
+ } else if ($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");
} else if (isset($attach)) {
echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);