echo "name = '$option->name', "
. "value = '$option->value', "
. "new_value = '$option->new_value'\n";
+//FIXME: NO HTML IN THE CORE!
echo "<br />";
*/
if ($option->changed()) {
. create_optpage_element($optpage)
. create_optmode_element(SMOPT_MODE_SUBMIT);
-//FIXME: NO HTML IN THE CORE!!
// Wrap the template in a table to keep from breaking the hooks below
- echo "<table cellspacing=\"0\" class=\"table_blank\">\n" .
- " <tr>\n" .
- " <td colspan=\"2\">\n";
+ $oTemplate->assign('attributes', array('cellspacing' => 0, 'class' => 'table_blank'));
+ $oTemplate->display('table.tpl');
+ $oTemplate->display('table_row.tpl');
+ $oTemplate->assign('attributes', array('colspan' => 2));
+ $oTemplate->display('table_data.tpl');
// This is the only variable that is needed by *just* the template.
$oTemplate->assign('options', $optpage_data['options']);
$oTemplate->assign('submit_name', $submit_name);
$oTemplate->display('options.tpl');
-//FIXME: need to remove HTML from here!
- echo " </td>\n" .
- " </tr>\n";
+ $oTemplate->display('table_data_close.tpl');
+ $oTemplate->display('table_row_close.tpl');
/* If it is not empty, trigger the inside hook. */
if ($inside_hook_name != '') {
do_hook($inside_hook_name, $null);
}
-//FIXME: need to remove HTML from here!
- echo "</table>\n" .
- "</form>\n";
+ $oTemplate->display('table_close.tpl');
+ $oTemplate->display('form_close.tpl');
/* If it is not empty, trigger the bottom hook. */
if ($bottom_hook_name != '') {
--- /dev/null
+<?php
+
+/**
+ * form_close.tpl
+ *
+ * Template for constructing a closing form tag.
+ *
+ * The following variables are available in this template:
+ * <NONE>
+ *
+ * @copyright © 1999-2008 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id: form_close.tpl 12078 2007-01-07 07:28:11Z pdontthink $
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+
+?></form>
+
--- /dev/null
+<?php
+
+/**
+ * table.tpl
+ *
+ * Template for constructing an opening table tag.
+ *
+ * The following variables are available in this template:
+ * array $attributes The table attributes
+ *
+ * @copyright © 1999-2008 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id: table.tpl 12078 2007-01-07 07:28:11Z pdontthink $
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+
+// retrieve the template vars
+//
+extract($t);
+
+
+echo '<table';
+
+foreach ($attributes as $key => $value) {
+ echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
+}
+
+echo ">\n";
+
--- /dev/null
+<?php
+
+/**
+ * table_close.tpl
+ *
+ * Template for constructing a closing table tag.
+ *
+ * The following variables are available in this template:
+ * <NONE>
+ *
+ * @copyright © 1999-2008 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id: table_close.tpl 12078 2007-01-07 07:28:11Z pdontthink $
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+
+?></table>
+
--- /dev/null
+<?php
+
+/**
+ * table_data.tpl
+ *
+ * Template for constructing an opening table data tag.
+ *
+ * The following variables are available in this template:
+ * array $attributes The table attributes
+ *
+ * @copyright © 1999-2008 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id: table_data.tpl 12078 2007-01-07 07:28:11Z pdontthink $
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+
+// retrieve the template vars
+//
+extract($t);
+
+
+echo '<td';
+
+foreach ($attributes as $key => $value) {
+ echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
+}
+
+echo ">\n";
+
--- /dev/null
+<?php
+
+/**
+ * table_data_close.tpl
+ *
+ * Template for constructing a closing table data tag.
+ *
+ * The following variables are available in this template:
+ * <NONE>
+ *
+ * @copyright © 1999-2008 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id: table_data_close.tpl 12078 2007-01-07 07:28:11Z pdontthink $
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+
+?></td>
+
--- /dev/null
+<?php
+
+/**
+ * table_row.tpl
+ *
+ * Template for constructing an opening table row tag.
+ *
+ * The following variables are available in this template:
+ * array $attributes The table attributes
+ *
+ * @copyright © 1999-2008 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id: table_row.tpl 12078 2007-01-07 07:28:11Z pdontthink $
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+
+// retrieve the template vars
+//
+extract($t);
+
+
+echo '<tr';
+
+foreach ($attributes as $key => $value) {
+ echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
+}
+
+echo ">\n";
+
--- /dev/null
+<?php
+
+/**
+ * table_row_close.tpl
+ *
+ * Template for constructing a closing table row tag.
+ *
+ * The following variables are available in this template:
+ * <NONE>
+ *
+ * @copyright © 1999-2008 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id: table_row_close.tpl 12078 2007-01-07 07:28:11Z pdontthink $
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+
+?></tr>
+