}
displayPageHeader($color, 'None');
-?>
-<br /><table width="100%" border="0" cellspacing="0" cellpadding="2" align="center"><tr><td bgcolor="<?php echo $color[0]; ?>">
-<b><div style="text-align: center;">
-<?php
-echo _("Viewing a text attachment") . ' - ' .
- '<a href="'.$msg_url.'">' . _("View message") . '</a>';
-?>
-</b></td><tr><tr><td><div style="text-align: center;">
-<?php
-if ( $ishtml ) {
- echo '<a href="' . $unsafe_url . '">' . _("View Unsafe Images") . '</a> | ';
-}
-echo '<a href="' . $dwnld_url . '">' . _("Download this as a file") . '</a>';
-?>
-</div><br />
-</div></b>
-</td></tr></table>
-<table width="98%" border="0" cellspacing="0" cellpadding="2" align="center"><tr><td bgcolor="<?php echo $color[0]; ?>">
-<tr><td bgcolor="<?php echo $color[4]; ?>"><tt>
-<?php echo $body; ?>
-</tt></td></tr></table>
-<?php
+
+$oTemplate->assign('view_message_href', $msg_url);
+$oTemplate->assign('download_href', $dwnld_url);
+$oTemplate->assign('view_unsafe_image_href', $ishtml ? $unsafe_url : '');
+$oTemplate->assign('body', $body);
+
+$oTemplate->display('view_text.tpl');
+
$oTemplate->display('footer.tpl');
-?>
+?>
\ No newline at end of file
width:100%;
}
+div.viewText table.table1 {
+ width: 100%;
+}
+
+div.viewText td.header2 a {
+ font-size: smaller;
+ font-weight: normal;
+}
+
+div.viewText td.actions {
+ text-align: center;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+
+div.viewText td.text {
+ padding: 10px;
+ background-color: #ffffff /* __COLOR4__ */;
+}
+
+div.viewText td.spacer {
+ padding: 3px;
+ background-color: #DCDCDC /* __COLOR0__ */;
+}
+
+
--- /dev/null
+<?php
+/**
+ * view_text.tpl
+ *
+ * Tempalte for displaying a simple .txt or .html attachment
+ *
+ * The following variables are available in this template:
+ * $view_message_href - URL to navigate back to the main message
+ * $view_unsafe_image_href - URL to toggle viewing unsafe images
+ * $download_href - URL to download the attachment as a file
+ * $body - Body of the attachment to be displayed
+ *
+ * @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="viewText">
+<table cellspacing="0" class="table1">
+ <tr>
+ <td class="header2">
+ <?php echo _("Viewing a text attachment"); ?> -
+ <a href="<?php echo $view_message_href; ?>"><?php echo _("View message"); ?></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="actions">
+ <?php
+ if (!empty($view_unsafe_image_href)) {
+ ?>
+ <a href="<?php echo $view_unsafe_image_href; ?>"><?php echo _("View Unsafe Images"); ?></a> |
+ <?php
+ }
+ ?>
+ <a href="<?php echo $download_href; ?>"><?php echo _("Download this as a file"); ?></a>
+ </td>
+ </tr>
+ <tr>
+ <td class="spacer">
+ </td>
+ </tr>
+ <tr>
+ <td class="text">
+ <?php echo $body; ?>
+ </td>
+ </tr>
+</table>
+</div>
\ No newline at end of file