Exemple #1
0
$messagebody = '';
do_hook('read_body_top');
if ($show_html_default == 1) {
    $ent_ar = $message->findDisplayEntity(array());
} else {
    $ent_ar = $message->findDisplayEntity(array(), array('text/plain'));
}
$cnt = count($ent_ar);
for ($i = 0; $i < $cnt; $i++) {
    $messagebody .= formatBody($imapConnection, $message, $color, $wrap_at, $ent_ar[$i], $passed_id, $mailbox);
    if ($i != $cnt - 1) {
        $messagebody .= '<hr noshade size=1>';
    }
}
displayPageHeader($color, $mailbox);
formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response);
formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee);
echo '<table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">';
echo '  <tr><td>';
echo '    <table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="' . $color[9] . '">';
echo '      <tr><td>';
echo '        <table width="100%" cellpadding="3" cellspacing="0" align="center" border="0">';
echo '          <tr bgcolor="' . $color[4] . '"><td>';
// echo '            <table cellpadding="1" cellspacing="5" align="left" border="0">';
echo html_tag('table', '', 'left', '', 'cellpadding="1" cellspacing="5" border="0"');
echo '              <tr>' . html_tag('td', '<br />' . $messagebody . "\n", 'left') . '</tr>';
echo '            </table>';
echo '          </td></tr>';
echo '        </table></td></tr>';
echo '    </table>';
echo '  </td></tr>';
    echo '       <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="' . $color[4] . '">';
    echo '        <tr>' . html_tag('td', '', 'left', $color[9]);
    echo '           <b>' . _("Attachments") . ':</b>';
    echo '        </td></tr>';
    echo '        <tr><td>';
    echo '          <table width="100%" cellpadding="2" cellspacing="2" align="center"' . ' border="0" bgcolor="' . $color[0] . '"><tr><td>';
    echo $attachmentsdisplay;
    echo '          </td></tr></table>';
    echo '       </td></tr></table>';
    echo '  </td></tr>';
    echo '<tr><td height="5" colspan="2" bgcolor="' . $color[4] . '"></td></tr>';
}
echo '</table>';
/* show attached images inline -- if pref'fed so */
if ($attachment_common_show_images && is_array($attachment_common_show_images_list)) {
    foreach ($attachment_common_show_images_list as $img) {
        $imgurl = SM_PATH . 'src/download.php' . '?' . 'passed_id=' . urlencode($img['passed_id']) . '&amp;mailbox=' . urlencode($mailbox) . '&amp;ent_id=' . urlencode($img['ent_id']) . '&amp;absolute_dl=true';
        echo html_tag('table', "\n" . html_tag('tr', "\n" . html_tag('td', '<img src="' . $imgurl . '" />' . "\n", 'left')), 'center', '', 'cellspacing="0" border="0" cellpadding="2"');
    }
}
formatMenuBar($aMailbox, $passed_id, $passed_ent_id, $message, false, FALSE);
do_hook('read_body_bottom');
sqimap_logout($imapConnection);
/* sessions are written at the end of the script. it's better to register
   them at the end so we avoid double session_register calls */
/* add the mailbox to the cache */
$mailbox_cache[$aMailbox['NAME']] = $aMailbox;
sqsession_register($mailbox_cache, 'mailbox_cache');
?>
</body></html>