print "1. Organization Name : $WHT$org_name$NRM\n";
print "2. Organization Logo : $WHT$org_logo$NRM\n";
print "3. Organization Title : $WHT$org_title$NRM\n";
+ print "4. Signout Page : $WHT$signout_page$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ($menu == 2) {
if ($command == 1) { $org_name = command1 (); }
elsif ($command == 2) { $org_logo = command2 (); }
elsif ($command == 3) { $org_title = command3 (); }
+ elsif ($command == 4) { $signout_page = command4 (); }
} elsif ($menu == 2) {
if ($command == 1) { $domain = command11 (); }
elsif ($command == 2) { $imapServerAddress = command12 (); }
return $new_org_title;
}
+# signout_page
+sub command4 {
+ print "When users click the Sign Out button they will be logged out and\n";
+ print "then sent to signout_page. If signout_page is left empty,\n";
+ print "(hit space and then return) they will be taken, as normal,\n";
+ print "to the default and rather sparse SquirrelMail signout page.\n";
+ print "\n";
+ print "[$WHT$signout_page$NRM]: $WHT";
+ $new_signout_page = <STDIN>;
+ if ($new_signout_page eq "\n") {
+ $new_signout_page = $signout_page;
+ } else {
+ $new_signout_page =~ s/[\r|\n]//g;
+ $new_signout_page =~ s/^\s+$//g;
+ }
+ return $new_signout_page;
+}
+
####################################################################################
# domain
print FILE "\t\$org_name = \"$org_name\";\n";
print FILE "\t\$org_logo = \"$org_logo\";\n";
print FILE "\t\$org_title = \"$org_title\";\n";
+ print FILE "\t\$signout_page = \"$signout_page\";\n";
print FILE "\n";
} else {
$body = "";
}
-
+
if ($message->header->type1 == "html")
$body = strip_tags($body);
}
sqWordWrap($body_ary[$i], $editor_size - 1);
$body .= $body_ary[$i] . "\n";
- unset($body_ary[$i]);
+ unset($body_ary[$i]);
}
if ($forward_id)
{
if (!$message) {
sqimap_mailbox_select($imapConnection, $mailbox);
$message = sqimap_get_message($imapConnection, $forward_id,
- $mailbox);
+ $mailbox);
}
if (count($message->entities) == 0) {
$filename = "untitled-".$message->header->entity_id;
$localfilename = GenerateRandomString(32, '', 7);
- while (file_exists($attachment_dir . $localfilename))
- $localfilename = GenerateRandomString(32, '', 7);
+ while (file_exists($attachment_dir . $localfilename))
+ $localfilename = GenerateRandomString(32, '', 7);
$newAttachment['localfilename'] = $localfilename;
- $newAttachment['remotefilename'] = $filename;
- $newAttachment['type'] = strtolower($message->header->type0 .
- '/' . $message->header->type1);
+ $newAttachment['remotefilename'] = $filename;
+ $newAttachment['type'] = strtolower($message->header->type0 .
+ '/' . $message->header->type1);
// Write Attachment to file
$fp = fopen ($attachment_dir.$localfilename, 'w');
fputs ($fp, decodeBody(mime_fetch_body($imapConnection,
- $forward_id, $message->header->entity_id),
- $message->header->encoding));
+ $forward_id, $message->header->entity_id),
+ $message->header->encoding));
fclose ($fp);
$attachments[] = $newAttachment;
echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\"";
do_hook("compose_form");
- echo ">\n";
+ echo ">\n";
if ($reply_id) {
echo "<input type=hidden name=reply_id value=$reply_id>\n";
}
echo "<tr><td bgcolor=\"$color[0]\" align=right>\n";
echo " ";
echo "</td><td align=left bgcolor=\"$color[0]\">";
- foreach ($attachments as $key => $info) {
+ foreach ($attachments as $key => $info) {
echo "<input type=\"checkbox\" name=\"delete[]\" value=\"$key\">\n";
- echo $info['remotefilename'] . " - " . $info['type'] . " (";
- echo show_readable_size(filesize($attachment_dir .
- $info['localfilename'])) . ")<br>\n";
+ echo $info['remotefilename'] . " - " . $info['type'] . " (";
+ echo show_readable_size(filesize($attachment_dir .
+ $info['localfilename'])) . ")<br>\n";
}
echo "<input type=\"submit\" name=\"do_delete\" value=\""._("Delete selected attachments")."\">\n";
//
global $CHARSET, $SOURCE_CHARSET, $send_to, $send_to_cc, $send_to_bcc, $subject, $body;
$charset_ary = array("koi8-r" => "k",
- "windows-1251" => "w",
- "ibm866" => "a",
- "ISO-8859-5" => "i");
+ "windows-1251" => "w",
+ "ibm866" => "a",
+ "ISO-8859-5" => "i");
$body = convert_cyr_string($body, $charset_ary[$CHARSET], $charset_ary[$SOURCE_CHARSET]);
$send_to = convert_cyr_string($send_to, $charset_ary[$CHARSET], $charset_ary[$SOURCE_CHARSET]);
$send_to_cc = convert_cyr_string($send_to_cc, $charset_ary[$CHARSET], $charset_ary[$SOURCE_CHARSET]);
if (! isset($reply_id))
$reply_id = 0;
// Set $default_charset to correspond with the user's selection
- // of language interface.
- set_my_charset();
+ // of language interface.
+ set_my_charset();
+ do_hook("compose_send");
+
if (sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id) == 0) {showInputForm(); exit();}
-// header ("Location: right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=1");
} else {
//$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
displayPageHeader($color, $mailbox);
{
unlink ($attachment_dir.$attachments[$index]['localfilename']);
unset ($attachments[$index]);
- }
+ }
}
showInputForm();
- function ClearAttachments()
- {
+ function ClearAttachments() {
global $attachments, $attachment_dir;
- foreach ($attachments as $info)
- {
- if (file_exists($attachment_dir . $info['localfilename']))
- {
+ foreach ($attachments as $info) {
+ if (file_exists($attachment_dir . $info['localfilename'])) {
unlink($attachment_dir . $info['localfilename']);
- }
+ }
}
$attachments = array();