예제 #1
0
파일: options.php 프로젝트: jprice/EHCP
            $first_optpage = $next_optpage;
        } else {
            print_optionpages_row($first_optpage, $next_optpage);
            $first_optpage = false;
        }
    }
    if ($first_optpage != false) {
        print_optionpages_row($first_optpage);
    }
    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 addForm('options.php', 'POST', 'f') . create_optpage_element($optpage) . create_optmode_element(SMOPT_MODE_SUBMIT) . 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']);
    /* Set the inside_hook_name and submit_name. */
    switch ($optpage) {
        case SMOPT_PAGE_PERSONAL:
            $inside_hook_name = 'options_personal_inside';
            $bottom_hook_name = 'options_personal_bottom';
            $submit_name = 'submit_personal';
            break;
        case SMOPT_PAGE_DISPLAY:
            $inside_hook_name = 'options_display_inside';
            $bottom_hook_name = 'options_display_bottom';
            $submit_name = 'submit_display';
            break;
        case SMOPT_PAGE_HIGHLIGHT:
예제 #2
0
         $submit_name = 'submit_highlight';
         break;
     case SMOPT_PAGE_FOLDER:
         $bottom_hook_name = 'options_folder_bottom';
         $submit_name = 'submit_folder';
         break;
     case SMOPT_PAGE_ORDER:
         $bottom_hook_name = 'options_order_bottom';
         $submit_name = 'submit_order';
         break;
     default:
         $bottom_hook_name = '';
         $submit_name = 'submit';
 }
 // Begin output form
 echo addForm('options.php', 'post', 'option_form', '', '', array(), TRUE) . create_optpage_element($optpage) . create_optmode_element(SMOPT_MODE_SUBMIT);
 // This is the only variable that is needed by *just* the template.
 $oTemplate->assign('option_groups', $optpage_data['options']);
 global $ask_user_info, $org_name;
 if ($optpage == SMOPT_PAGE_PERSONAL && $ask_user_info && getPref($data_dir, $username, 'email_address') == "") {
     $oTemplate->assign('topmessage', sprintf(_("Welcome to %s. Please supply your full name and email address."), $org_name));
 }
 // These variables are not specifically needed by the template,
 // but they are relevant to the page being built, so we'll add
 // them in case some plugin is modifying the page, etc....
 //
 $oTemplate->assign('max_refresh', isset($max_refresh) ? $max_refresh : NULL);
 $oTemplate->assign('page_title', $optpage_title);
 $oTemplate->assign('optpage', $optpage);
 $oTemplate->assign('optpage_name', $optpage_name);
 $oTemplate->assign('optmode', $optmode);