. '&ent_id=' . $ent_num
. '&view_unsafe_images=' . (int) $view_unsafe_images;
- // adding warning message
- $body = html_tag('div',_("Viewing HTML formatted email"),'center');
-
- /**
- * height can't be set to 100%, because it does not work as expected when
- * iframe is inside the table. Browsers do not create full height objects
- * even when iframe is not nested. Maybe there is some way to get full size
- * with CSS. Tested in firefox 1.02 and opera 7.53
- *
- * width="100%" does not work as expected, when table width is not set (automatic)
- *
- * tokul: I think <iframe> are safer sandbox than <object>. Objects might
- * need special handling for IE and IE6SP2.
- */
- $body.= "<div><iframe name=\"message_frame\" width=\"100%\" height=\"$iframe_height\" src=\"$iframeurl\""
- .' frameborder="1" marginwidth="0" marginheight="0" scrolling="auto">' . "\n";
-
- // Message for browsers without iframe support
- //$body.= _("Your browser does not support inline frames.
- // You can view HTML formated message by following below link.");
- //$body.= "<br /><a href=\"$iframeurl\">"._("View HTML Message")."</a>";
-
- // if browser can't render iframe, it renders html message.
- $body.= $html_body;
-
- // close iframe
- $body.="</iframe></div>\n";
+ global $oTemplate;
+ $oTemplate->assign('iframe_url', $iframeurl);
+ $oTemplate->assign('html_body', $html_body);
+
+ $body = $oTemplate->fetch('read_html_iframe.tpl');
} else {
// old way of html rendering
$body = magicHTML($body, $id, $message, $mailbox);
--- /dev/null
+<?php
+/**
+ * read_html_iframe.tpl
+ *
+ * Tempalte for displaying HTML messages within an iframe.
+ *
+ * The following variables are available in this template:
+ * $iframe_url - URL to use for the src of the iframe.
+ * $html_body - HTML to spit out in case the brwoser does nto support iframes
+ *
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+?>
+<div class="htmlIframe">
+<?php echo _("Viewing HTML formatted email"); ?>
+<iframe name="message_frame" src="<?php echo $iframe_url; ?>" frameborder="1" marginwidth="0" marginheight="0" scrolling="auto">
+<?php echo $html_body; ?>
+</iframe>
+</div>
\ No newline at end of file