';
echo $content['body'];
//test added by Richie
if (!isset($_REQUEST['display_images']) || $_REQUEST['display_images'] != 1)
{
$content['body'] = eregi_replace('src="[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]"', 'src="none"', $content['body']);
$content['body'] = eregi_replace('src=[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]', '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 && (eregi('image', $tmp['mime']) && ($tmp['number'] != '')))
{
$exploded = explode('/', $tmp['mime']);
$img_type = array_pop($exploded);
if (eregi('JPEG', $img_type) || eregi('JPG', $img_type) || eregi('GIF', $img_type) || eregi ('PNG', $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 ((!eregi('ATTACHMENT', $tmp['disposition'])) && $conf->display_text_attach && (eregi('text/plain', $tmp['mime'])))
echo '
'.view_part_detail($mail, $mailid, $tmp['number'], $tmp['transfer'], $tmp['charset'], $charset);
if ($conf->display_img_attach && (eregi('image', $tmp['mime']) && ($tmp['number'] != '')))
{
$exploded = explode('/', $tmp['mime']);
$img_type = array_pop($exploded);
if (eregi('JPEG', $img_type) || eregi('JPG', $img_type) || eregi('GIF', $img_type) || eregi ('PNG', $img_type))
{
echo '
';
echo '
';
echo '
';
echo '';
}
}
}
echo '