$note = _("Your Message has been sent.");
}
if (isset($note)) {
- echo html_tag( 'div', '<b>' . htmlspecialchars($note) .'</b>', 'center' ) . "<br />\n";
+ $oTemplate->assign('note', htmlspecialchars($note));
+ $oTemplate->display('note.tpl');
}
if ( sqgetGlobalVar('just_logged_in', $just_logged_in, SQ_SESSION) ) {
$just_logged_in = false;
sqsession_register($just_logged_in, 'just_logged_in');
- if (strlen(trim($motd)) > 0) {
- echo html_tag( 'table',
- html_tag( 'tr',
- html_tag( 'td',
- html_tag( 'table',
- html_tag( 'tr',
- html_tag( 'td', $motd, 'center' )
- ) ,
- '', $color[4], 'width="100%" cellpadding="5" cellspacing="1" border="0"' )
- )
- ) ,
- 'center', $color[9], 'width="70%" cellpadding="0" cellspacing="3" border="0"' );
+ $motd = trim($motd);
+ if (strlen($motd) > 0) {
+ $oTemplate->assign('motd', $motd);
+ $oTemplate->display('motd.tpl');
}
}
}
$oTemplate->display('message_list.tpl');
} else {
- $string = '<b>' . _("THIS FOLDER IS EMPTY") . '</b>';
- echo ' <table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="'.$color[9].'">';
- echo ' <tr><td>';
- echo ' <table width="100%" cellpadding="0" cellspacing="0" align="center" border="0" bgcolor="'.$color[4].'">';
- echo ' <tr><td><br />';
- echo ' <table cellpadding="1" cellspacing="5" align="center" border="0">';
- echo ' <tr>' . html_tag( 'td', $string."\n", 'left')
- . '</tr>';
- echo ' </table>';
- echo ' <br /></td></tr>';
- echo ' </table></td></tr>';
- echo ' </table>';
+ $oTemplate->display('empty_folder.tpl');
}
do_hook('right_main_bottom');
--- /dev/null
+<?php
+/**
+ * empty_foler.tpl
+ *
+ * Message displayed when the folder is empty
+ *
+ * There are no variables available to this template.
+ *
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+// Get template variables
+extract($t);
+?>
+<div class="sqm_emptyFolderWrapper">
+ <table class="sqm_emptyFolder" cellspacing="1">
+ <tr>
+ <td>
+ <em><?php echo _("THIS FOLDER IS EMPTY"); ?></em>
+ </td>
+ </tr>
+ </table>
+</div>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * motd.tpl
+ *
+ * Tempalte for display Message of the day
+ *
+ * Variables available in this template:
+ * $motd - string containing the MOTD 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
+ */
+
+// Get variables from template
+extract($t);
+?>
+<!-- Begin MOTD -->
+<div class="sqm_motdWrapper">
+ <table class="sqm_motd" cellspacing="3">
+ <tr>
+ <td>
+ <?php echo $motd; ?>
+ </td>
+ </tr>
+ </table>
+</div>
+<!-- End MOTD -->
--- /dev/null
+<?php
+/**
+ * note.tpl
+ *
+ * Template for displaying notes as needed.
+ *
+ * Variables available in this template:
+ * $note = Sanitized string containing not 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
+ */
+
+// Get the variables from the template
+extract($t)
+?>
+<div class="sqm_noteWrapper">
+ <div class="sqm_note">
+ <?php echo $note."\n"; ?>
+ </div>
+</div>
+<br />
text-align:center;
}
+/* note.tpl defs */
+.sqm_noteWrapper {
+ text-align:center;
+ width:100%;
+}
+.sqm_note {
+ margin-left:auto;
+ margin-right:auto;
+ font-weight:bold;
+ text-align:center;
+}
+
+/* motd.tpl defs */
+.sqm_motdWrapper {
+ text-align:center;
+ width:100%;
+ margin:1px;
+}
+.sqm_motd {
+ margin-left:auto;
+ margin-right:auto;
+ text-align:center;
+ background: <?php echo $color[9]; ?>;
+ width:70%;
+ padding:0;
+}
+.sqm_motd td {
+ text-align:center;
+ background: <?php echo $color[4]; ?>;
+ padding:5px;
+}
+
+/* empty_folder.tpl defs */
+.sqm_emptyFolderWrapper {
+ text-align:center;
+ width:100%;
+}
+.sqm_emptyFolder {
+ margin-left:auto;
+ margin-right:auto;
+ text-align:center;
+ background: <?php echo $color[9]; ?>;
+ padding:1;
+ width:100%;
+}
+.sqm_emptyFolder td {
+ text-align:center;
+ background: <?php echo $color[4]; ?>;
+ padding-top:15px;
+ padding-bottom:15px;
+}
+
/* page_header.tpl definitions */
.sqm_currentFolder {
background: <?php echo $color[9]; ?>;
* this file, e.g. the template root directory.
*/
$templates_provided = array (
+ 'empty_folder.tpl',
'error_message.tpl',
'footer.tpl',
'left_main.tpl',
'message_list.tpl',
'page_header.tpl',
'paginator.tpl',
+ 'note.tpl',
+ 'motd.tpl',
'stylesheet.tpl'
);
text-align:center;
}
+/* note.tpl defs */
+.sqm_noteWrapper {
+ text-align:center;
+ width:100%;
+}
+.sqm_note {
+ margin-left:auto;
+ margin-right:auto;
+ font-weight:bold;
+ text-align:center;
+}
+
+/* motd.tpl defs */
+.sqm_motdWrapper {
+ text-align:center;
+ width:100%;
+ margin:1px;
+}
+.sqm_motd {
+ margin-left:auto;
+ margin-right:auto;
+ text-align:center;
+ background: <?php echo $color[9]; ?>;
+ width:70%;
+ padding:0;
+}
+.sqm_motd td {
+ text-align:center;
+ background: <?php echo $color[4]; ?>;
+ padding:5px;
+}
+
+/* empty_folder.tpl defs */
+.sqm_emptyFolderWrapper {
+ text-align:center;
+ width:100%;
+}
+.sqm_emptyFolder {
+ margin-left:auto;
+ margin-right:auto;
+ text-align:center;
+ background: <?php echo $color[9]; ?>;
+ padding:1;
+ width:100%;
+}
+.sqm_emptyFolder td {
+ text-align:center;
+ background: <?php echo $color[4]; ?>;
+ padding-top:15px;
+ padding-bottom:15px;
+}
+
/* page_header.tpl definitions */
.sqm_currentFolder {
background: <?php echo $color[9]; ?>;