Just to try it out, I uploaded the 6.0 fix to see what error it would give. I got none. These are the differences I noticed in the 2 versions.
Any suggestions on how to edit 6.8's readmail.php?
Line 21
6.8
Code:
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
6.0
Code:
if (!eregi("modules.php", $PHP_SELF)) {
line 103
6.0
Code:
$message = $d->Result();
6.8
Code:
echo "<tr>
<td align=\"left\" bgcolor=\"$bgcolor2\">"._SUBJECT.":</td>
<td>".htmlspecialchars($subject)."</td>
</tr><tr>
<td align=\"left\" bgcolor=\"$bgcolor2\">"._DATE.":</td>
<td>".htmlspecialchars($d->Headers("Date")) ."</td>
</tr><tr>
<td colspan=2>
<table border=0 width=100% cellspacing=0><tr><td bgcolor=$bgcolor2>
<table border=0 width=100% cellspacing=5 cellpadding=0><tr><td bgcolor=\"$bgcolor2\">
<form action=\"modules.php?name=$module_name&file=inbox\" method=\"post\">
<input type=hidden name=\"id\" value=\"$id\">
<input type=hidden name=\"op\" value=\"delete\">
<input type=hidden name=\"msgid\" value=\"$msgid\">
<input type=submit value=\""._DELETE."\">";
if ($email_send == 1) {
echo "</form>
</td><td bgcolor=\"$bgcolor2\">
<form action=modules.php?name=$module_name&file=compose method=\"post\">
<input type=hidden name=to value=\"".htmlspecialchars($from_address)."\">
<input type=hidden name=subject value=\"".htmlspecialchars($subject)."\">
<input type=hidden name=body value=\"".htmlspecialchars($content)."\">
<input type=hidden name=op value=\"reply\">
<input type=submit value=\""._REPLY."\">
</form>
</td><td bgcolor=\"$bgcolor2\" width=\"100%\">
<form action=\"modules.php?name=$module_name&file=compose\" method=\"post\">
<input type=hidden name=\"to\" value=\"".htmlspecialchars($from_address)."\">
<input type=hidden name=\"subject\" value=\"".htmlspecialchars($subject)."\">
<input type=hidden name=\"body\" value=\"".htmlspecialchars($content)."\">
<input type=hidden name=\"op\" value=\"forward\">
<input type=submit value=\""._FORWARD."\">
</form>";
}
echo "</td></tr></table></tr></td></table></td></tr><tr><td colspan=2 bgcolor=\"$bgcolor2\">";
OpenTable();
$message = $d->Result();
6.0 fix
Code:
$message = $d->Result();
$rtext = "";
for ($j=0;$j<count($message);$j++) {
for ($i=0;$i<count($message[$j]);$i++) {
if (chop($message[$j][$i]["attachments"]) != '') {
$att_txt .= " <a href=\"".$d->attachment_path."/".$message[$j][$i]["attachments"]."\">".$message[$j][$i]["attachments"]."</a>";
}
}
for ($i=0;$i<count($message[$j]);$i++) {
if (eregi("text/html", $message[$j][$i]["body"]["type"])) {
$res = quoted_printable_decode($message[$j][$i]["body"]["body"]);
$res = ereg_replace("(=\n)", "", $res);
$res = eregi_replace("(<body)", "<xbody", $res);
$res = eregi_replace("(<meta)", "<xmeta", $res);
$body_fix = "
";
$body_fix .= $res;
} else {
$body_fix = nl2br(htmlspecialchars($message[$j][$i]["body"]["body"]))."
";
}
$content = $rtext .= strip_tags($message[$j][$i]["body"]["body"]);
}
}
echo "<tr>
<td align=\"left\" bgcolor=\"$bgcolor2\">"._SUBJECT.":</td>
<td>".htmlspecialchars($subject)."</td>
</tr><tr>
<td align=\"left\" bgcolor=\"$bgcolor2\">"._DATE.":</td>
<td>".htmlspecialchars($d->Headers("Date")) ."</td>
</tr><tr>
<td colspan=2>
<table border=0 width=100% cellspacing=0><tr><td bgcolor=$bgcolor2>
<table border=0 width=100% cellspacing=5 cellpadding=0><tr><td bgcolor=\"$bgcolor2\">
<form action=\"modules.php?name=$module_name&file=inbox\" method=\"post\">
<input type=hidden name=\"id\" value=\"$id\">
<input type=hidden name=\"op\" value=\"delete\">
<input type=hidden name=\"msgid\" value=\"$msgid\">
<input type=submit value=\""._DELETE."\">";
if ($email_send == 1) {
echo "</form>
</td><td bgcolor=\"$bgcolor2\">
<form action=modules.php?name=$module_name&file=compose method=\"post\">
<input type=hidden name=to value=\"".htmlspecialchars($from_address)."\">
<input type=hidden name=subject value=\"".htmlspecialchars($subject)."\">
<input type=hidden name=body value=\"".htmlspecialchars($content)."\">
<input type=hidden name=op value=\"reply\">
<input type=submit value=\""._REPLY."\">
</form>
</td><td bgcolor=\"$bgcolor2\" width=\"100%\">
<form action=\"modules.php?name=$module_name&file=compose\" method=\"post\">
<input type=hidden name=\"to\" value=\"".htmlspecialchars($from_address)."\">
<input type=hidden name=\"subject\" value=\"".htmlspecialchars($subject)."\">
<input type=hidden name=\"body\" value=\"".htmlspecialchars($content)."\">
<input type=hidden name=\"op\" value=\"forward\">
<input type=submit value=\""._FORWARD."\">
</form>";
}
echo "</td></tr></table></tr></td></table></td></tr><tr><td colspan=2 bgcolor=\"$bgcolor2\">";
OpenTable();
echo $body_fix;
CloseTable();
echo "</td></tr></table>";
6.8
Code:
$message = $d->Result();
$rtext = "";
for ($j=0;$j<count($message);$j++) {
for ($i=0;$i<count($message[$j]);$i++) {
if (chop($message[$j][$i]["attachments"]) != '') {
$att_txt .= " <a href=\"".$d->attachment_path."/".$message[$j][$i]["attachments"]."\">".$message[$j][$i]["attachments"]."</a>";
}
}
for ($i=0;$i<count($message[$j]);$i++) {
if (eregi("text/html", $message[$j][$i]["body"]["type"])) {
$res = quoted_printable_decode($message[$j][$i]["body"]["body"]);
$res = ereg_replace("(=\n)", "", $res);
$res = eregi_replace("(<body)", "<xbody", $res);
$res = eregi_replace("(<meta)", "<xmeta", $res);
$res = filter_text($res); // Security fix by Ulf Harnhammar 2002
echo "
";
echo $res;
} else {
echo nl2br(htmlspecialchars($message[$j][$i]["body"]["body"]))."
";
}
$content = $rtext .= strip_tags($message[$j][$i]["body"]["body"]);
}
}
CloseTable();
echo "</td></tr></table>";