function resman_conf()
{
    if (isset($_POST['resmanconfsubmit'])) {
        // Configuration form as been submitted. Updated the database.
        resman_conf_updatedb();
    }
    ?>
	<form action="" method="post">
	<input type="hidden" name="resmanconfsubmit" value="1" />
	<div class="wrap">

		<h2><?php 
    _e('Résumé Manager: Settings', 'resman');
    ?>
</h2>
<?php 
    $widths = array('60%', '39%');
    $functions = array(array('resman_print_settings_box', 'resman_print_livedocx_box'), array('resman_print_donate_box', 'resman_print_about_box'));
    $titles = array(array(__('Settings', 'resman'), __('LiveDocx Authentication', 'resman')), array(__('Donate', 'resman'), __('About This Plugin', 'resman')));
    jobman_create_dashboard($widths, $functions, $titles);
    ?>
	</div>
	</form>
<?php 
}
function jobman_display_conf()
{
    if (array_key_exists('jobmandisplaysubmit', $_REQUEST)) {
        check_admin_referer('jobman-display-updatedb');
        jobman_display_updatedb();
    } else {
        if (array_key_exists('jobmansortsubmit', $_REQUEST)) {
            check_admin_referer('jobman-sort-updatedb');
            jobman_sort_updatedb();
        } else {
            if (array_key_exists('jobmantemplatesubmit', $_REQUEST)) {
                check_admin_referer('jobman-template-updatedb');
                jobman_template_updatedb();
            } else {
                if (array_key_exists('jobmanappformsubmit', $_REQUEST)) {
                    check_admin_referer('jobman-appform-updatedb');
                    jobman_appform_updatedb();
                } else {
                    if (array_key_exists('jobmanapptemplatesubmit', $_REQUEST)) {
                        check_admin_referer('jobman-app-template-updatedb');
                        jobman_app_template_updatedb();
                    } else {
                        if (array_key_exists('jobmanwraptextsubmit', $_REQUEST)) {
                            check_admin_referer('jobman-wraptext-updatedb');
                            jobman_wrap_text_updatedb();
                        } else {
                            if (array_key_exists('jobmanmisctextsubmit', $_REQUEST)) {
                                check_admin_referer('jobman-misctext-updatedb');
                                jobman_misc_text_updatedb();
                            }
                        }
                    }
                }
            }
        }
    }
    ?>
	<div class="wrap">
<?php 
    jobman_print_settings_tabs();
    if (!get_option('pento_consulting')) {
        $widths = array('78%', '20%');
        $functions = array(array('jobman_print_display_settings_box', 'jobman_print_sort_box', 'jobman_print_template_box', 'jobman_print_app_settings_box', 'jobman_print_app_template_box', 'jobman_print_misc_text_box', 'jobman_print_wrap_text_box'), array('jobman_print_donate_box', 'jobman_print_about_box'));
        $titles = array(array(__('Display Settings', 'jobman'), __('Job List Sorting', 'jobman'), __('Job Templates', 'jobman'), __('Application Form Settings', 'jobman'), __('Application Form Template', 'jobman'), __('Miscellaneous Text', 'jobman'), __('Page Text', 'jobman')), array(__('Donate', 'jobman'), __('About This Plugin', 'jobman')));
    } else {
        $widths = array('49%', '49%');
        $functions = array(array('jobman_print_display_settings_box', 'jobman_print_misc_text_box', 'jobman_print_wrap_text_box'), array('jobman_print_sort_box', 'jobman_print_template_box', 'jobman_print_app_settings_box', 'jobman_print_app_template_box'));
        $titles = array(array(__('Display Settings', 'jobman'), __('Miscellaneous Text', 'jobman'), __('Page Text', 'jobman')), array(__('Job List Sorting', 'jobman'), __('Job Templates', 'jobman'), __('Application Form Settings', 'jobman'), __('Application Form Template', 'jobman')));
    }
    jobman_create_dashboard($widths, $functions, $titles);
}
function resman_sync_resume()
{
    if (isset($_REQUEST['resman-sync-conf'])) {
        resman_sync_update_settings();
    }
    ?>
	<input type="hidden" name="resmanconfsubmit" value="1" />
	<div class="wrap">

		<h2><?php 
    _e('Résumé Manager: Synchronisation', 'resman');
    ?>
</h2>
<?php 
    $widths = array('60%', '39%');
    $functions = array(array('resman_sync_hresume_box'), array('resman_print_donate_box', 'resman_print_about_box'));
    $titles = array(array(__('Synchronise hResume Source', 'resman')), array(__('Donate', 'resman'), __('About This Plugin', 'resman')));
    jobman_create_dashboard($widths, $functions, $titles);
    ?>
	</div>
<?php 
}
function jobman_conf()
{
    global $jobman_formats;
    $options = get_option('jobman_options');
    if (array_key_exists('tab', $_REQUEST)) {
        switch ($_REQUEST['tab']) {
            case 'display':
                jobman_display_conf();
                return;
            case 'appform':
                jobman_application_setup();
                return;
            case 'jobform':
                jobman_job_setup();
                return;
        }
    }
    if (array_key_exists('jobmanconfsubmit', $_REQUEST)) {
        // Configuration form as been submitted. Updated the database.
        check_admin_referer('jobman-conf-updatedb');
        jobman_conf_updatedb();
    } else {
        if (array_key_exists('jobmanresumesubmit', $_REQUEST)) {
            check_admin_referer('jobman-resume-settings-updatedb');
            jobman_resume_settings_updatedb();
        } else {
            if (array_key_exists('jobmancatsubmit', $_REQUEST)) {
                check_admin_referer('jobman-categories-updatedb');
                jobman_categories_updatedb();
            } else {
                if (array_key_exists('jobmaniconsubmit', $_REQUEST)) {
                    check_admin_referer('jobman-icons-updatedb');
                    jobman_icons_updatedb();
                } else {
                    if (array_key_exists('jobmanusersubmit', $_REQUEST)) {
                        check_admin_referer('jobman-users-updatedb');
                        jobman_users_updatedb();
                    } else {
                        if (array_key_exists('jobmanappemailsubmit', $_REQUEST)) {
                            check_admin_referer('jobman-application-email-updatedb');
                            jobman_application_email_updatedb();
                        } else {
                            if (array_key_exists('jobmaninterviewsubmit', $_REQUEST)) {
                                check_admin_referer('jobman-interview-updatedb');
                                jobman_interview_updatedb();
                            } else {
                                if (array_key_exists('jobmanotherpluginssubmit', $_REQUEST)) {
                                    check_admin_referer('jobman-other-plugins-updatedb');
                                    jobman_other_plugins_updatedb();
                                } else {
                                    if (array_key_exists('jobmanuninstallsubmit', $_REQUEST)) {
                                        check_admin_referer('jobman-uninstall-updatedb');
                                        jobman_uninstall_updatedb();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    ?>
	<div class="wrap">
<?php 
    jobman_print_settings_tabs();
    if (!get_option('smb_consulting')) {
        $widths = array('78%', '20%');
        $functions = array(array('jobman_print_settings_box', 'jobman_print_categories_box', 'jobman_print_icons_box', 'jobman_print_user_box', 'jobman_print_application_email_box', 'jobman_print_other_plugins_box', 'jobman_print_uninstall_box'), array('jobman_print_survey_box', 'jobman_print_donate_box', 'jobman_print_about_box', 'jobman_print_translators_box'));
        $titles = array(array(__('Settings', 'jobman'), __('Categories', 'jobman'), __('Icons', 'jobman'), __('User Settings', 'jobman'), __('Application Email Settings', 'jobman'), __('Other Plugins', 'jobman'), __('Uninstall Settings', 'jobman')), array(__('Job Manager - SURVEY -', 'jobman'), __('Donate', 'jobman'), __('About This Plugin', 'jobman'), __('Translators', 'jobman')));
        if ($options['interviews']) {
            $functions[0] = array_insert($functions[0], 5, 'jobman_print_interview_box');
            $titles[0] = array_insert($titles[0], 5, __('Interview Settings', 'jobman'));
        }
    } else {
        $widths = array('49%', '49%');
        $functions = array(array('jobman_print_settings_box', 'jobman_print_categories_box', 'jobman_print_other_plugins_box'), array('jobman_print_icons_box', 'jobman_print_user_box', 'jobman_print_application_email_box', 'jobman_print_uninstall_box'));
        $titles = array(array(__('Settings', 'jobman'), __('Categories', 'jobman'), __('Other Plugins', 'jobman')), array(__('Icons', 'jobman'), __('User Settings', 'jobman'), __('Application Email Settings', 'jobman'), __('Uninstall Settings', 'jobman')));
        if ($options['interviews']) {
            $functions[1] = array_insert($functions[1], 3, 'jobman_print_interview_box');
            $titles[1] = array_insert($titles[1], 3, __('Interview Settings', 'jobman'));
        }
    }
    jobman_create_dashboard($widths, $functions, $titles);
    ?>
	</div>
<?php 
}
function jobman_interview_details($iid)
{
    $interview = get_post($iid);
    ?>
	<div class="wrap">
	<h2><?php 
    _e('Job Manager: Interview Details', 'jobman');
    ?>
</h2>
<?php 
    $aid = get_post_meta($iid, 'application', true);
    $widths = array('49%', '49%');
    $functions = array(array('jobman_application_display_details'), array('jobman_comments', 'jobman_interview_past_comments', 'jobman_comments'));
    $titles = array(array(__('Application', 'jobman')), array(__('Interview Comments', 'jobman'), __('Previous Interview Comments', 'jobman'), __('Application Comments', 'jobman')));
    $params = array(array(array($aid)), array(array($iid, true), array($iid, $aid), array($aid)));
    jobman_create_dashboard($widths, $functions, $titles, $params);
    ?>
	</div>
<?php 
}
function jobman_application_details_layout($appid)
{
    $options = get_option('jobman_options');
    if (array_key_exists('jobman-email', $_REQUEST)) {
        check_admin_referer('jobman-reemail-application');
        jobman_email_application($appid, $_REQUEST['jobman-email']);
    }
    if (array_key_exists('new-interview', $_REQUEST)) {
        jobman_interview_new();
    }
    if (array_key_exists('comment', $_REQUEST)) {
        jobman_store_comment();
    }
    ?>
	<div id="jobman-application" class="wrap">
		<h2><?php 
    _e('Job Manager: Application Details', 'jobman');
    ?>
</h2>
		<div class="printicon"><a href="javascript:window.print()"><img src="<?php 
    echo JOBMAN_URL;
    ?>
/images/print-icon.png" /></a></div>
		<a href="?page=jobman-list-applications" class="backlink">&larr;<?php 
    _e('Back to Application List', 'jobman');
    ?>
</a>
<?php 
    $widths = array('59%', '39%');
    $functions = array(array('jobman_application_display_details'), array('jobman_comments', 'jobman_application_email_form'));
    $titles = array(array(__('Application', 'jobman')), array(__('Application Comments', 'jobman'), __('Share Application', 'jobman')));
    $params = array(array(array($appid)), array(array($appid, true), array()));
    if ($options['interviews']) {
        $functions[1] = array_insert($functions[1], 1, 'jobman_interview_application');
        $titles[1] = array_insert($titles[1], 1, __('Interviews', 'jobman'));
        $params[1] = array_insert($params[1], 1, array($appid, 'summary'));
    }
    jobman_create_dashboard($widths, $functions, $titles, $params);
    ?>
		<a href="?page=jobman-list-applications" class="backlink">&larr;<?php 
    _e('Back to Application List', 'jobman');
    ?>
</a>
	</div>
<?php 
}
function resman_livedocx_info()
{
    global $resman_livedocx_up;
    ?>
	<div class="wrap">
		<h2><?php 
    _e('LiveDocx Info', 'resman');
    ?>
</h2>
<?php 
    $widths = array('60%', '39%');
    $functions = array(array('resman_print_livedocx_status_box'), array('resman_print_donate_box', 'resman_print_about_box'));
    $titles = array(array(__('LiveDocx Server Status', 'resman')), array(__('Donate', 'resman'), __('About This Plugin', 'resman')));
    resman_livedocx_test_connection();
    if ($resman_livedocx_up && $_REQUEST['resmanforcecreate']) {
        resman_livedocx_create_documents();
    }
    if ($resman_livedocx_up) {
        $functions[0][] = 'resman_livedocx_force_create_box';
        $titles[0][] = __('Create Résumé Documents', 'jobman');
        $functions[0][] = 'resman_livedocx_fonts_box';
        $titles[0][] = __('LoveDocx Fonts', 'jobman');
    }
    jobman_create_dashboard($widths, $functions, $titles);
    ?>
	</div>
<?php 
}