';
echo $content['body'];
//test added by Richie
if (!isset($_REQUEST['display_images']) || $_REQUEST['display_images'] != 1)
{
$content['body'] = preg_replace('/src="[[:alpha:]]+:\/\/[^<>[:space:]]+[[:alnum:]\/]"/i', 'src="none"', $content['body']);
$content['body'] = preg_replace('/src=[[:alpha:]]+:\/\/[^<>[:space:]]+[[:alnum:]\/]/i', 'src="none"', $content['body']);
}
//Display embedded HTML images
$tmp_attach_tab=$content['attachtab'];
$i = 0;
$conf->display_img_attach = true;
$conf->display_text_attach = true;
while ($tmp = array_pop($tmp_attach_tab))
{
if ($conf->display_img_attach && (preg_match("/image/i", $tmp['mime']) && ($tmp['number'] != '')))
{
$exploded = explode('/', $tmp['mime']);
$img_type = array_pop($exploded);
if (preg_match("/JPEG/i", $img_type) || preg_match("/JPG/i", $img_type) || preg_match("/GIF/i", $img_type) || preg_match ('/PNG/i', $img_type))
{
$new_img_src = 'src="get_img.php?mail=' . $mailid.'&num=' . $tmp['number'] . '&mime=' . $img_type . '&transfer=' . $tmp['transfer'] . '"';
$img_id = str_replace('<', '', $tmp['id']);
$img_id = str_replace('>', '', $img_id);
$content['body'] = str_replace('src="cid:'.$img_id.'"', $new_img_src, $content['body']);
$content['body'] = str_replace('src=cid:'.$img_id, $new_img_src, $content['body']);
}
}
}
while ($tmp = array_pop($content['attachtab']))
{
if ((!preg_match("/ATTACHMENT/i", $tmp['disposition'])) && $conf->display_text_attach && (preg_match("/text\/plain/i", $tmp['mime'])))
echo '
'.view_part_detail($mail, $mailid, $tmp['number'], $tmp['transfer'], $tmp['charset'], $charset);
if ($conf->display_img_attach && (preg_match("/image/i", $tmp['mime']) && ($tmp['number'] != '')))
{
$exploded = explode('/', $tmp['mime']);
$img_type = array_pop($exploded);
if (preg_match("/JPEG/i", $img_type) || preg_match("/JPG/i", $img_type) || preg_match("/GIF/i", $img_type) || preg_match ('/PNG/g', $img_type))
{
echo '
';
echo '
';
echo '
';
echo '';
}
}
}
echo '