require_once('../functions/array.php');
require_once('../functions/options.php');
require_once('../functions/strings.php');
+require_once('../functions/html.php');
/*********************************/
/*** Build the resultant page. ***/
/* Remove Debug Mode Until Needed
echo "name = '$option->name', "
. "value = '$option->value', "
- . "new_value = '$option->new_value'<BR>\n";
+ . "new_value = '$option->new_value'<br>\n";
*/
if ($option->changed()) {
$option->save();
function print_optionpages_row($leftopt, $rightopt = false) {
global $color;
- echo "<TABLE BGCOLOR=\"$color[4]\" WIDTH=\"100%\" CELLPADDING=0 CELLSPACING=5 BORDER=0>" .
- '<TR><TD VALIGN="TOP">' .
- '<TABLE WIDTH="100%" CELLPADDING="3" CELLSPACING="0" BORDER="0">' .
- '<TR>' .
- "<TD VALIGN=TOP BGCOLOR=\"$color[9]\" WIDTH=\"49%\">" .
- '<A HREF="' . $leftopt['url'] . '">' . $leftopt['name'] . '</A>'.
- '</TD>'.
- "<TD VALIGN=TOP BGCOLOR=\"$color[4]\" WIDTH=\"2%\"> </TD>";
if ($rightopt) {
- echo "<TD VALIGN=top BGCOLOR=\"$color[9]\" WIDTH=\"49%\">" .
- '<A HREF="' . $rightopt['url'] . '">' . $rightopt['name'] . '</A>' .
- '</TD>';
+ $rightopt_name = html_tag( 'td', '<a href="' . $rightopt['url'] . '">' . $rightopt['name'] . '</a>', 'left', $color[9], 'valign="top" width="49%"' );
+ $rightopt_desc = html_tag( 'td', $rightopt['desc'], 'left', $color[0], 'valign="top" width="49%"' );
} else {
- echo "<TD VALIGN=top BGCOLOR=\"$color[4]\" WIDTH=\"49%\"> </TD>";
+ $rightopt_name = html_tag( 'td', ' ', 'left', $color[4], 'valign="top" width="49%"' );
+ $rightopt_desc = html_tag( 'td', ' ', 'left', $color[4], 'valign="top" width="49%"' );
}
- echo '</TR>' .
- '<TR>' .
- "<TD VALIGN=top BGCOLOR=\"$color[0]\" WIDTH=\"49%\">" .
- $leftopt['desc'] .
- '</TD>' .
- "<TD VALIGN=top BGCOLOR=\"$color[4]\" WIDTH=\"2%\"> </TD>";
- if ($rightopt) {
- echo "<TD VALIGN=top BGCOLOR=\"$color[0]\" WIDTH=\"49%\">" .
- $rightopt['desc'] .
- '</TD>';
- } else {
- echo "<TD VALIGN=top BGCOLOR=\"$color[4]\" WIDTH=\"49%\"> </TD>";
- }
-
- echo '</TR>' .
- '</TABLE>' .
- '</TD></TR>' .
- "</TABLE>\n";
+ echo
+ html_tag( 'table', "\n" .
+ html_tag( 'tr', "\n" .
+ html_tag( 'td', "\n" .
+ html_tag( 'table', "\n" .
+ html_tag( 'tr', "\n" .
+ html_tag( 'td',
+ '<a href="' . $leftopt['url'] . '">' . $leftopt['name'] . '</a>' ,
+ 'left', $color[9], 'valign="top" width="49%"' ) .
+ html_tag( 'td',
+ ' ' ,
+ 'left', $color[4], 'valign="top" width="2%"' ) . "\n" .
+ $rightopt_name
+ ) . "\n" .
+ html_tag( 'tr', "\n" .
+ html_tag( 'td',
+ $leftopt['desc'] ,
+ 'left', $color[0], 'valign="top" width="49%"' ) .
+ html_tag( 'td',
+ ' ' ,
+ 'left', $color[4], 'valign="top" width="2%"' ) . "\n" .
+ $rightopt_desc
+ ) ,
+ '', '', 'width="100%" cellpadding="2" cellspacing="0" border="0"' ) ,
+ 'left', '', 'valign="top"' )
+ ) ,
+ '', $color[4], 'width="100%" cellpadding="0" cellspacing="5" border="0"' );
}
/* ---------------------------- main ---------------------------- */
$optpage_title .= " - $optpage_name";
}
-echo '<BR>' .
- "<TABLE BGCOLOR=\"$color[0]\" WIDTH=\"95%\" ALIGN=\"CENTER\" CELLPADDING=\"2\" CELLSPACING=\"0\" BORDER=\"0\">\n".
- '<TR><TD ALIGN="CENTER">'.
- "<B>$optpage_title</B><BR>\n".
- '<TABLE WIDTH="100%" BORDER="0" CELLPADDING="5" CELLSPACING="0">'.
- "<TR><TD BGCOLOR=\"$color[4]\" ALIGN=\"CENTER\">\n";
+echo '<br>' .
+ html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="2" cellspacing="0" border="0"' ) . "\n" .
+ html_tag( 'tr' ) . "\n" .
+ html_tag( 'td', '', 'center' ) .
+ "<b>$optpage_title</b><br>\n".
+ html_tag( 'table', '', '', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) . "\n" .
+ html_tag( 'tr' ) . "\n" .
+ html_tag( 'td', '', 'center', $color[4] ) . "\n";
/*******************************************************************/
/* DO OLD SAVING OF SUBMITTED OPTIONS. THIS WILL BE REMOVED LATER. */
$frame_top = '_top';
}
/* Display a message indicating a successful save. */
- echo '<B>' . _("Successfully Saved Options") . ": $optpage_name</B><BR>\n";
+ echo '<b>' . _("Successfully Saved Options") . ": $optpage_name</b><br>\n";
/* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */
if ( !isset( $max_refresh ) ) {
} else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
- echo '<A HREF="../src/left_main.php" TARGET="left">' . _("Refresh Folder List") . '</A><BR>';
+ echo '<a href="../src/left_main.php" target="left">' . _("Refresh Folder List") . '</a><br>';
} else if ($max_refresh) {
- echo '<A HREF="../src/webmail.php?right_frame=options.php" TARGET="' . $frame_top . '">' . _("Refresh Page") . '</A><BR>';
+ echo '<a href="../src/webmail.php?right_frame=options.php" target="' . $frame_top . '">' . _("Refresh Page") . '</a><br>';
}
}
/******************************************/
/* Now, print out each option page section. */
/********************************************/
$first_optpage = false;
- echo "<TABLE BGCOLOR=\"$color[4]\" WIDTH=\"100%\" CELLPADDING=0 CELLSPACING=\"5\" BORDER=\"0\">" .
- '<TR><TD VALIGN="TOP">' .
- "<TABLE BGCOLOR=\"$color[4]\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" BORDER=\"0\"><TR><TD>";
+ echo html_tag( 'table', '', '', $color[4], 'width="100%" cellpadding="0" cellspacing="5" border="0"' ) . "\n" .
+ html_tag( 'tr' ) . "\n" .
+ html_tag( 'td', '', 'left', '', 'valign="top"' ) .
+ html_tag( 'table', '', '', $color[4], 'width="100%" cellpadding="3" cellspacing="0" border="0"' ) . "\n" .
+ html_tag( 'tr' ) . "\n" .
+ html_tag( 'td', '', 'left' );
foreach ($optpage_blocks as $next_optpage) {
if ($first_optpage == false) {
$first_optpage = $next_optpage;
print_optionpages_row($first_optpage);
}
- echo "</TD></TR></TABLE></TD></TR></TABLE>\n";
+ echo "</td></tr></table></td></tr></table>\n";
do_hook('options_link_and_description');
/* If we are not looking at the main option page, display the page here. */
/*************************************************************************/
} else {
- echo '<FORM NAME="f" ACTION="options.php" METHOD="POST"><BR>' . "\n"
+ echo '<form name="f" action="options.php" method="post"><br>' . "\n"
. create_optpage_element($optpage)
. create_optmode_element(SMOPT_MODE_SUBMIT)
- . '<TABLE WIDTH="100%" CELLPADDING=2 CELLSPACING=0 BORDER=0>' . "\n";
+ . html_tag( 'table', '', '', '', 'width="100%" cellpadding="2" cellspacing="0" border="0"' ) . "\n"
+ . html_tag( 'tr' ) . "\n"
+ . html_tag( 'td', '', 'left' ) . "\n";
/* Output the option groups for this page. */
print_option_groups($optpage_data['options']);
/* Spit out a submit button. */
OptionSubmit($submit_name);
- echo '</TABLE></FORM>';
+ echo '</td></tr></table></form>';
/* If it is not empty, trigger the bottom hook. */
if ($bottom_hook_name != '') {
}
}
-echo '</TD></TR>' .
- '</TABLE>'.
- '</TD></TR>'.
- '</TABLE>' .
- '</BODY></HTML>';
+echo '</td></tr>' .
+ '</table>'.
+ '</td></tr>'.
+ '</table>' .
+ '</body></html>';
?>
require_once('../functions/array.php');
require_once('../functions/plugin.php');
require_once('../functions/strings.php');
+require_once('../functions/html.php');
function oh_opt( $val, $sel, $tit ) {
echo "<option value=\"$val\"";
$message_highlight_list[$theid]['match_type'] = $match_type;
}
displayPageHeader($color, 'None');
-?>
-<br>
-<table width="95%" align="center" border="0" cellpadding="2" cellspacing="0"><tr><td bgcolor="<?php echo $color[0] ?>">
- <center><b><?php echo _("Options") . ' - ' . _("Message Highlighting"); ?></b></center>
-</td></tr></table>
-<?php
-echo '<br><center>[<a href="options_highlight.php?action=add">' . _("New") . '</a>]'.
+echo '<br>' .
+html_tag( 'table', "\n" .
+ html_tag( 'tr', "\n" .
+ html_tag( 'td', '<center><b>' . _("Options") . ' - ' . _("Message Highlighting") . '</b></center>',
+ 'left', $color[0] )
+ ) ,
+'center', '', 'width="95% border="0" cellpadding="2" cellspacing="0"' ) . "<br>\n" .
+html_tag( 'table', '', '', '', 'width="100% border="0" cellpadding="0" cellspacing="0"' ) .
+ html_tag( 'tr' ) . "\n" .
+ html_tag( 'td', '', 'left' );
+
+echo '<center>[<a href="options_highlight.php?action=add">' . _("New") . '</a>]'.
' - [<a href="options.php">'._("Done").'</a>]</center><br>'."\n";
if (count($message_highlight_list) >= 1) {
- echo '<table border="0" cellpadding="3" cellspacing="0" align="center" width="80%">'."\n";
+ echo html_tag( 'table', '', 'center', '', 'width="80% border="0" cellpadding="3" cellspacing="0"' ) . "\n";
for ($i=0; $i < count($message_highlight_list); $i++) {
- echo '<tr bgcolor="' . $message_highlight_list[$i]['color'] . '">'.
- "<td width=\"20%\" bgcolor=\"$color[4]\" nowrap>".
- "<small>[<a href=\"options_highlight.php?action=edit&theid=$i\">".
- _("Edit") .
- '</a>] [<a href="options_highlight.php?action=delete&theid='.
- $i . '">' . _("Delete") . '</a>]</small>'.
- '</td><td>'.
- htmlspecialchars($message_highlight_list[$i]['name']) .
- '</td><td>'.
- $message_highlight_list[$i]['match_type'] . ' = ' .
- htmlspecialchars($message_highlight_list[$i]['value']).
- '</td></tr>';
+ $match_type = '';
+ switch ($message_highlight_list[$i]['match_type'] ) {
+ case 'from' :
+ $match_type = _("From");
+ break;
+ case 'to' :
+ $match_type = _("To");
+ break;
+ case 'cc' :
+ $match_type = _("Cc");
+ break;
+ case 'to_cc' :
+ $match_type = _("To or Cc");
+ break;
+ case 'subject' :
+ $match_type = _("subject");
+ break;
+ }
+
+ echo html_tag( 'tr',
+ html_tag( 'td',
+ '<small>[<a href="options_highlight.php?action=edit&theid=' . $i . '">' .
+ _("Edit") .
+ '</a>] [<a href="options_highlight.php?action=delete&theid='.
+ $i . '">' . _("Delete") . '</a>]</small>' ,
+ 'left', $color[4], 'width="20%" nowrap' ) .
+ html_tag( 'td',
+ htmlspecialchars($message_highlight_list[$i]['name']) ,
+ 'left' ) .
+ html_tag( 'td',
+ $match_type . ' = ' .
+ htmlspecialchars($message_highlight_list[$i]['value']) ,
+ 'left' ) ,
+ '', $message_highlight_list[$i]['color'] ) . "\n";
}
echo "</table>\n".
"<br>\n";
}
}
}
+
+ if (isset($message_highlight_list[$theid]['color'])) {
+ $current_color = $message_highlight_list[$theid]['color'];
+ }
+ else {
+ $current_color = '63aa7f';
+ }
+
+ for($x = 0; $x < 5; $x++) {
+ for($y = 0; $y < 19; $y++) {
+ $gridindex = "$y,$x";
+ $gridcolor = $new_color_list[$gridindex];
+ if ($gridcolor == $current_color) {
+ $pre_defined_color = 1;
+ break;
+ }
+ }
+ }
+
if (!isset($message_highlight_list[$theid]['color']))
$selected_choose = ' checked';
+ else if ($pre_defined_color)
+ $selected_predefined = ' checked';
else if ($selected_choose == '')
$selected_input = ' checked';
echo '<form name="f" action="options_highlight.php">' . "\n";
echo '<input type="hidden" value="save" name="action">' . "\n";
echo '<input type="hidden" value="'.$theid.'" name="theid">' . "\n";
- echo '<table width="80%" align="center" cellpadding="3" cellspacing="0" border="0">' . "\n";
- echo " <tr bgcolor=\"$color[0]\">\n";
- echo " <td align=\"right\" nowrap><b>\n";
+ echo html_tag( 'table', '', 'center', '', 'width="80%" cellpadding="3" cellspacing="0" border="0"' ) . "\n";
+ echo html_tag( 'tr', '', '', $color[0] ) . "\n";
+ echo html_tag( 'td', '', 'right', '', 'nowrap' ) . "<b>\n";
echo _("Identifying name") . ":";
echo ' </b></td>' . "\n";
- echo ' <td>' . "\n";
+ echo html_tag( 'td', '', 'left' ) . "\n";
if (isset($message_highlight_list[$theid]['name']))
$disp = $message_highlight_list[$theid]['name'];
else
echo " <input type=\"text\" value=\"".$disp."\" name=\"identname\">";
echo " </td>\n";
echo " </tr>\n";
- echo ' <tr><td><small><small> </small></small></td></tr>' . "\n";
- echo " <tr bgcolor=\"$color[0]\">\n";
- echo ' <td align="right"><b>' . "\n";
- echo _("Color") . ':';
- echo " </b></td>\n";
- echo ' <td>' . "\n";
+ echo html_tag( 'tr', html_tag( 'td', '<small><small> </small></small>', 'left' ) ) ."\n";
+ echo html_tag( 'tr', '', '', $color[0] ) . "\n";
+ echo html_tag( 'td', '<b>'. _("Color") . ':</b>', 'right' );
+ echo html_tag( 'td', '', 'left' );
echo " <input type=\"radio\" name=color_type value=1$selected_choose> <select name=newcolor_choose>\n";
echo " <option value=\"$color_list[0]\"$selected0>" . _("Dark Blue") . "\n";
echo " <option value=\"$color_list[1]\"$selected1>" . _("Dark Green") . "\n";
echo " </tr>\n";
# Show grid of color choices
- echo "<tr bgcolor=\"$color[0]\"><td colspan='2'>\n";
- echo "<table border=0 cellpadding=\"2\" align=\"center\" cellspacing=\"1\">\n";
- if (isset($message_highlight_list[$theid]['color'])) {
- $current_color = $message_highlight_list[$theid]['color'];
- }
- else {
- $current_color = '63aa7f';
- }
+ echo html_tag( 'tr', '', '', $color[0] ) . "\n";
+ echo html_tag( 'td', '', 'left', '', 'colspan="2"' );
+ echo html_tag( 'table', '', 'center', '', 'border=0 cellpadding="2" cellspacing="1"' ) . "\n";
+
for($x = 0; $x < 5; $x++) {
- echo "<tr>\n";
+ echo html_tag( 'tr' ) . "\n";
for($y = 0; $y < 19; $y++) {
$gridindex = "$y,$x";
$gridcolor = $new_color_list[$gridindex];
- $selected = ($gridcolor == $current_color)?'CHECKED':'' ;
- echo "<td bgcolor=\"#$gridcolor\"><input type='radio' name=color_type value='#$gridcolor' $selected>\n";
- echo "</td>\n";
+ $selected = ($gridcolor == $current_color) ? ' checked' : '' ;
+ echo html_tag( 'td', '<input type="radio" name="color_type" value="#' . $gridcolor .'"' . $selected . '>', 'left', $gridcolor, 'colspan="2"' );
}
echo "</tr>\n";
}
echo "</table>\n";
echo "</td></tr>\n";
- echo ' <tr><td><small><small> </small></small></td></tr>' . "\n";
- echo " <tr bgcolor=\"$color[0]\">\n";
- echo ' <td align="center" colspan=2>' . "\n";
+ echo html_tag( 'tr', html_tag( 'td', '<small><small> </small></small>', 'left' ) ) . "\n";
+ echo html_tag( 'tr', '', '', $color[0] ) . "\n";
+ echo html_tag( 'td', '', 'center', '', 'colspan="2"' ) . "\n";
echo " <select name=match_type>\n";
oh_opt( 'from',
($message_highlight_list[$theid]['match_type'] == 'from'),
require_once('../src/validate.php');
require_once('../functions/display_messages.php');
+require_once('../functions/html.php');
if (isset($return)) {
SaveUpdateFunction();
SaveUpdateFunction();
}
+ do_hook('options_identities_top');
LoadInfo($full_name, $email_address, $reply_to, $signature, '');
-
-?>
-<br>
-<table width="95%" align=center border=0 cellpadding=2 cellspacing=0>
-<tr><td bgcolor="<?php echo $color[0] ?>" align="center">
-
- <b><?php echo _("Options") . ' - ' . _("Advanced Identities"); ?></b>
-
- <table width="100%" border="0" cellpadding="1" cellspacing="1">
- <tr><td bgcolor="<?php echo $color[4] ?>" align="center">
-
-<form name="f" action="options_identities.php" method="post"><br>
-
-<?php do_hook('options_identities_top'); ?>
-
-<table width="80%" cellpadding=2 cellspacing=0 border=0>
- <tr bgcolor="<?php echo $color[9] ?>">
- <th colspan=2 align=center><?php echo _("Default Identity") ?></th>
- </tr>
-<?PHP
-
- ShowTableInfo($full_name, $email_address, $reply_to, $signature, '');
+ $td_str = '';
+ $td_str .= '<form name="f" action="options_identities.php" method="post"><br>';
+ $td_str .= ShowTableInfo($full_name, $email_address, $reply_to, $signature, '');
- $num = 1;
- while (LoadInfo($full_name, $email_address, $reply_to, $signature, $num))
- {
-?>
- <tr bgcolor="<?PHP echo $color[9] ?>">
- <th colspan=2 align=center><?PHP printf (_("Alternate Identity %d"),
- $num) ?></th>
- </tr>
-<?PHP
- ShowTableInfo($full_name, $email_address, $reply_to, $signature, $num);
- $num ++;
- }
-
-?>
- <tr bgcolor="<?php echo $color[9] ?>">
- <th colspan=2 align=center><?PHP echo _("Add a New Identity") ?></th>
- </tr>
-<?php
- ShowTableInfo('', '', '', '', $num);
-?>
-</table>
-</form>
-
- </td></tr>
- </table>
-
-</td></tr>
-</table>
-</body></html>
-
-<?PHP
+ $num = 1;
+ while (LoadInfo($full_name, $email_address, $reply_to, $signature, $num)) {
+ $td_str .= html_tag( 'tr',
+ html_tag( 'th', sprintf (_("Alternate Identity %d"), $num), 'center', '', 'colspan="2"' ) ,
+ '', $color[9]);
+ $td_str .= ShowTableInfo($full_name, $email_address, $reply_to, $signature, $num);
+ $num ++;
+ }
+
+ echo '<br>' .
+ html_tag( 'table', "\n" .
+ html_tag( 'tr', "\n" .
+ html_tag( 'td', "\n" .
+ '<b>'. _("Options") . ' - ' . _("Advanced Identities") .'</b><br>' .
+ html_tag( 'table', "\n" .
+ html_tag( 'tr', "\n" .
+ html_tag( 'td', "\n" .
+ html_tag( 'table', "\n" .
+ html_tag( 'tr', "\n" .
+ html_tag( 'th', _("Default Identity"), 'center', '', 'colspan="2"' ) ,
+ '', $color[9]) . "\n" .
+ $td_str . "\n" .
+ html_tag( 'tr',
+ html_tag( 'th', _("Add a New Identity") . ShowTableInfo('', '', '', '', $num), 'center', '', 'colspan="2"' ) ,
+ '', $color[9]) ,
+ '', '', 'width="80%" cellpadding="2" cellspacing="0" border="0"' ) ,
+ 'center', $color[4] )
+ ) ,
+ '', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) ,
+ 'center', $color[0] )
+ ) ,
+ 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
+
+ '</body></html>';
function SaveUpdateFunction() {
global $username, $data_dir, $full_name, $email_address, $reply_to, $signature;
}
function sti_input( $title, $hd, $data, $post, $bg ) {
-
- echo "<tr$bg><td align=right nowrap>$title:".
- '</td><td>'.
- '<input size=50 type=text value="' . htmlspecialchars($data) .
- "\" name=\"$hd$post\"></td></tr>";
-
+ $return_val = html_tag( 'tr',
+ html_tag( 'td', $title . ':', 'right', '', 'nowrap' ) .
+ html_tag( 'td', '<input size="50" type="text" value="' . htmlspecialchars($data) . '" name="' . $hd . $post . '">' , 'left' ) ,
+ '', $bg );
+ return ($return_val);
}
function sti_textarea( $title, $hd, $data, $post, $bg ) {
-
- echo "<tr$bg><td align=right nowrap>$title:".
- '</td><td>'.
- "<textarea cols=50 rows=5 name=\"$hd$post\">" . htmlspecialchars($data) .
- "</textarea></td></tr>";
-
+ $return_val = html_tag( 'tr',
+ html_tag( 'td', $title . ':', 'right', '', 'nowrap' ) .
+ html_tag( 'td', '<textarea cols="50" rows="5" name="' . $hd . $post . '">' . htmlspecialchars($data) . '</textarea>' , 'left' ) ,
+ '', $bg );
+ return ($return_val);
}
function ShowTableInfo($full_name, $email_address, $reply_to, $signature, $post) {
global $color;
- $OtherBG = ' bgcolor="' . $color[0] . '"';
+ $OtherBG = $color[0];
if ($full_name == '' && $email_address == '' && $reply_to == '' && $signature == '')
$OtherBG = '';
else
$isEmptySection = false;
- sti_input( _("Full Name"), 'full_name', $full_name, $post, $OtherBG );
- sti_input( _("E-Mail Address"), 'email_address', $email_address, $post, $OtherBG );
- sti_input( _("Reply To"), 'reply_to', $reply_to, $post, $OtherBG );
- sti_textarea( _("Signature"), 'signature', $signature, $post, $OtherBG );
+ $return_val = '';
+ $return_val .= sti_input( _("Full Name"), 'full_name', $full_name, $post, $OtherBG );
+ $return_val .= sti_input( _("E-Mail Address"), 'email_address', $email_address, $post, $OtherBG );
+ $return_val .= sti_input( _("Reply To"), 'reply_to', $reply_to, $post, $OtherBG );
+ $return_val .= sti_textarea( _("Signature"), 'signature', $signature, $post, $OtherBG );
do_hook('options_identities_table', $OtherBG, $isEmptySection, $post);
- echo "<tr$OtherBG>".
- '<td> </td><td>'.
- "<input type=hidden name=\"form_for_$post\" value=\"1\">".
- '<input type=submit name="update" value="'.
- _("Save / Update") . '">';
+ $return_val .= html_tag( 'tr', '', '', $OtherBG);
+ $return_val .= html_tag( 'td', ' ', 'left' );
+ $return_val .= html_tag( 'td', '', 'left' );
+ $return_val .= '<input type=hidden name="form_for_'. $post .'" value="1">';
+ $return_val .= '<input type="submit" name="update" value="' . _("Save / Update") . '">';
+
+
if (! $isEmptySection && $post != '') {
- echo "<input type=submit name=\"make_default_$post\" value=\"".
+ $return_val .= '<input type="submit" name="make_default_' . $post . '" value="'.
_("Make Default") . '">'.
- "<input type=submit name=\"delete_$post\" value=\"".
+ '<input type=submit name="delete_' . $post . '" value="'.
_("Delete") . '">';
}
if (! $isEmptySection && $post != '' && $post > 1) {
- echo '<input type=submit name="promote_' . $post . '" value="'.
+ $return_val .= '<input type=submit name="promote_' . $post . '" value="'.
_("Move Up") . '">';
}
do_hook('options_identities_buttons', $isEmptySection, $post);
- echo '</td></tr>'.
- '<tr><td colspan="2"> </td></tr>';
+ $return_val .= '</td></tr>'.
+ html_tag( 'tr', html_tag( 'td', ' ', 'left', '', 'colspan="2"' ));
+
+ return ($return_val);
}
?>
\ No newline at end of file
require_once('../functions/imap.php');
require_once('../functions/array.php');
require_once('../functions/plugin.php');
+require_once('../functions/html.php');
if (! isset($action)) { $action = ''; }
if ($action == 'delete' && isset($theid)) {
} elseif ($action == 'save') {
}
displayPageHeader($color, 'None');
-?>
- <br>
-<table width="95%" align=center border=0 cellpadding=2 cellspacing=0>
-<tr><td align="center" bgcolor="<?php echo $color[0] ?>">
-
- <b><?php echo _("Options") . " - " . _("Index Order"); ?></b>
- <table width="100%" border="0" cellpadding="1" cellspacing="1">
- <tr><td bgcolor="<?php echo $color[4] ?>" align="center"><br>
-<?php
+ echo '<br>' .
+ html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'center', $color[0] ) .
+ '<b>' . _("Options") . ' - ' . _("Index Order") . '</b>' .
+ html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'center', $color[4] );
$available[1] = _("Checkbox");
$available[2] = _("From");
setPref($data_dir, $username, "order$i", $index_order[$i]);
}
}
- echo '<table cellspacing="0" cellpadding="0" border="0" width="65%"><tr><td>' . "\n";
- echo _("The index order is the order that the columns are arranged in the message index. You can add, remove, and move columns around to customize them to fit your needs.");
- echo '</td></tr></table><br>';
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td',
+ _("The index order is the order that the columns are arranged in the message index. You can add, remove, and move columns around to customize them to fit your needs.")
+ )
+ ) ,
+ '', '', '', 'width="65%" border="0" cellpadding="0" cellspacing="0"' ) . "<br>\n";
if (count($index_order))
{
- echo '<table cellspacing="0" cellpadding="0" border="0">' . "\n";
+ echo html_tag( 'table', '', '', '', ' cellspacing="0" cellpadding="0" border="0"' ) . "\n";
for ($i=1; $i <= count($index_order); $i++) {
$tmp = $index_order[$i];
- echo '<tr>';
- echo "<td><small><a href=\"options_order.php?method=up&num=$i\">". _("up") ."</a></small></td>\n";
- echo '<td><small> | </small></td>' . "\n";
- echo "<td><small><a href=\"options_order.php?method=down&num=$i\">". _("down") . "</a></small></td>\n";
- echo '<td><small> | </small></td>' . "\n";
- echo '<td>';
+ echo html_tag( 'tr' );
+ echo html_tag( 'td', '<small><a href="options_order.php?method=up&num=' . $i . '">'. _("up") .'</a></small>' );
+ echo html_tag( 'td', '<small> | </small>' );
+ echo html_tag( 'td', '<small><a href="options_order.php?method=down&num=' . $i . '">'. _("down") .'</a></small>' );
+ echo html_tag( 'td', '<small> | </small>' );
+ echo html_tag( 'td' );
/* Always show the subject */
if ($tmp != 4)
- echo "<small><a href=\"options_order.php?method=remove&num=$i\">" . _("remove") . '</a></small>';
- echo "</td>\n";
- echo '<td><small> - </small></td>' . "\n";
- echo '<td>' . $available[$tmp] . "</td>\n";
- echo "</tr>\n";
+ echo '<small><a href="options_order.php?method=remove&num=' . $i . '">' . _("remove") . '</a></small>';
+ else
+ echo ' ';
+ echo '</td>';
+ echo html_tag( 'td', '<small> - </small>' );
+ echo html_tag( 'td', $available[$tmp] );
+ echo '</tr>' . "\n";
}
- echo "</table>\n";
+ echo '</table>' . "\n";
}
if (count($index_order) != count($available)) {
echo '</form>';
}
- echo '<p><a href="../src/options.php">' . _("Return to options page") . '</a></p><br>';
+ echo html_tag( 'p', '<a href="../src/options.php">' . _("Return to options page") . '</a></p><br>' );
?>
</td></tr>