X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions.php;h=209afbd3a13e8393548bf39749f0dbf510ff5b10;hb=892b98c9c69f0c026070b0df9b3707e18fdb602f;hp=3fd806955fb5aa5957cbced7c5b1e6c7c736fbd0;hpb=7e235a1a75c0544d1b41270f54568990b3af112a;p=squirrelmail.git diff --git a/src/options.php b/src/options.php index 3fd80695..209afbd3 100644 --- a/src/options.php +++ b/src/options.php @@ -18,6 +18,7 @@ require_once('../functions/imap.php'); require_once('../functions/array.php'); require_once('../functions/options.php'); require_once('../functions/strings.php'); +require_once('../functions/html.php'); /*********************************/ /*** Build the resultant page. ***/ @@ -46,7 +47,7 @@ function process_optionmode_submit($optpage, $optpage_data) { /* Remove Debug Mode Until Needed echo "name = '$option->name', " . "value = '$option->value', " - . "new_value = '$option->new_value'
\n"; + . "new_value = '$option->new_value'
\n"; */ if ($option->changed()) { $option->save(); @@ -70,40 +71,41 @@ function process_optionmode_link($optpage) { function print_optionpages_row($leftopt, $rightopt = false) { global $color; - echo "" . - '' . - "
' . - '' . - '' . - "'. - ""; if ($rightopt) { - echo "'; + $rightopt_name = html_tag( 'td', '' . $rightopt['name'] . '', 'left', $color[9], 'valign="top" width="49%"' ); + $rightopt_desc = html_tag( 'td', $rightopt['desc'], 'left', $color[0], 'valign="top" width="49%"' ); } else { - echo ""; + $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 '' . - '' . - "' . - ""; - if ($rightopt) { - echo "'; - } else { - echo ""; - } - - echo '' . - '
" . - '' . $leftopt['name'] . ''. - ' " . - '' . $rightopt['name'] . '' . - ' 
" . - $leftopt['desc'] . - ' " . - $rightopt['desc'] . - ' 
' . - '
\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', + '' . $leftopt['name'] . '' , + '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 ---------------------------- */ @@ -200,12 +202,14 @@ if (isset($optpage_name) && ($optpage_name != '')) { $optpage_title .= " - $optpage_name"; } -echo '
' . - "\n". - '
'. - "$optpage_title
\n". - ''. - "
\n"; +echo '
' . + html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="2" cellspacing="0" border="0"' ) . "\n" . + html_tag( 'tr' ) . "\n" . + html_tag( 'td', '', 'center' ) . + "$optpage_title
\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. */ @@ -261,14 +265,14 @@ if ($optpage == SMOPT_PAGE_MAIN) { $frame_top = '_top'; } /* Display a message indicating a successful save. */ - echo '' . _("Successfully Saved Options") . ": $optpage_name
\n"; + echo '' . _("Successfully Saved Options") . ": $optpage_name
\n"; /* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */ if ( !isset( $max_refresh ) ) { } else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) { - echo '' . _("Refresh Folder List") . '
'; + echo '' . _("Refresh Folder List") . '
'; } else if ($max_refresh) { - echo '' . _("Refresh Page") . '
'; + echo '' . _("Refresh Page") . '
'; } } /******************************************/ @@ -337,9 +341,12 @@ if ($optpage == SMOPT_PAGE_MAIN) { /* Now, print out each option page section. */ /********************************************/ $first_optpage = false; - echo "" . - '
' . - "
"; + 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; @@ -353,7 +360,7 @@ if ($optpage == SMOPT_PAGE_MAIN) { print_optionpages_row($first_optpage); } - echo "
\n"; + echo "
\n"; do_hook('options_link_and_description'); @@ -362,10 +369,12 @@ if ($optpage == SMOPT_PAGE_MAIN) { /* If we are not looking at the main option page, display the page here. */ /*************************************************************************/ } else { - echo '

' . "\n" + echo '
' . "\n" . create_optpage_element($optpage) . create_optmode_element(SMOPT_MODE_SUBMIT) - . '' . "\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']); @@ -410,7 +419,7 @@ if ($optpage == SMOPT_PAGE_MAIN) { /* Spit out a submit button. */ OptionSubmit($submit_name); - echo '
'; + echo ''; /* If it is not empty, trigger the bottom hook. */ if ($bottom_hook_name != '') { @@ -418,10 +427,10 @@ if ($optpage == SMOPT_PAGE_MAIN) { } } -echo '' . - ''. - ''. - '' . - ''; +echo '' . + ''. + ''. + '' . + ''; ?>