} elsif ($options[0] =~ /^theme\[[0-9]+\]\["NAME"\]/) {
$sub = $options[0];
$sub =~ s/\]\["NAME"\]//;
- $sub = substr ($sub, @sub-1, 1);
+ $sub =~ s/.*\[//;
+ #$sub = substr ($sub, @sub-1, 1);
$theme_name[$sub] = $options[1];
} elsif ($options[0] =~ /^ldap_server\[[0-9]+\]/) {
$sub = $options[0];
echo "<BR><TABLE WIDTH=90% BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">";
echo "<B><CENTER>";
- echo _("Viewing a plain text attachment");
+ echo _("Viewing a text attachment") . " - ";
+ echo "<a href=\"read_body.php?mailbox=$mailbox&passed_id=$id\">". _("View message") . "</a>";
echo "</CENTER></B>";
echo "</TD></TR><TR><TD BGCOLOR=\"$color[4]\">";
$urlmailbox = urlencode($mailbox);
echo $body;
break;
}
-# } else if ($view == "true") {
-# $body = decodeBody ($body, $header->encoding);
-# header("Content-type: $type0/$type1; name=\"$filename\"");
-# header("Content-disposition: attachment; filename=\"$filename\"");
-# echo $body;
} else {
switch ($type0) {
case "text":
break;
default:
$body = decodeBody($body, $header->encoding);
- header("Content-type: applicatin/octet-stream; name=\"$filename\"");
+ header("Content-type: $type0/$type1; name=\"$filename\"");
header("Content-Disposition: attachment; filename=\"$filename\"");
echo $body;
break;