function resman_hresume_update()
{
    $url = get_option('resman_hresume_path');
    if ($url == '') {
        return;
    }
    // Set our User-Agent string, so whoever we're scraping knows it's us.
    $ua = ini_get('user_agent');
    ini_set('user_agent', 'Wordpress-Resume-Manager/' . RESMAN_VERSION . ' http://pento.net/projects/wordpress-resume-mananger-plugin/');
    $html = file_get_html($url);
    ini_set('user_agent', $ua);
    $data = $html->find('.hresume, #hresume');
    if (count($data) <= 0) {
        // There was no hResume base element in the html
        return;
    }
    if (preg_match('@^https?://[^.]*\\.linkedin.com@', $url)) {
        $resume = resman_hresume_parse_linkedin($data[0]);
    } else {
        if (preg_match('@^https?://[^.]*\\.xing.com@', $url)) {
            $resume = resman_hresume_parse_xing($data[0]);
        } else {
            $resume = resman_hresume_parse_other($data[0]);
        }
    }
    resman_hresume_update_db($resume);
    resman_livedocx_create_documents();
}
function resman_edit_resume()
{
    $pages = array('personal' => __('Personal', 'resman'), 'general' => __('General', 'resman'), 'experience' => __('Experience', 'resman'), 'education' => __('Education', 'resman'), 'language' => __('Languages', 'resman'), 'skills' => __('Skills', 'resman'), 'references' => __('References', 'resman'));
    if (isset($_POST['resmansubmit'])) {
        // Résumé form has been submitted. Update the database.
        resman_resume_updatedb();
    }
    if (isset($_POST['ldx-create'])) {
        // User wants to update the LiveDocx-based documents
        resman_livedocx_create_documents();
    }
    ?>
	<form action="" method="post">
	<input type="hidden" name="resmansubmit" value="1" />
	<div class="wrap">
		<h2><?php 
    _e('Résumé Manager: Editor', 'resman');
    ?>
</h2>
		<div id="resmantabs">
		<ul class="resmantabs">
<?php 
    foreach ($pages as $page => $title) {
        ?>
			<li><a href="#resman-<?php 
        echo $page;
        ?>
"><?php 
        echo $title;
        ?>
</a></li>
<?php 
    }
    ?>
		</ul>
<?php 
    foreach ($pages as $page => $title) {
        ?>
		<div id="resman-<?php 
        echo $page;
        ?>
" class="pane">
<?php 
        resman_print_config($page, $title);
        ?>
		</div>
<?php 
    }
    ?>
		</div>
		<p class="submit">
			<input type="checkbox" name="ldx-create" value="1" /> <?php 
    _e('Re-create cached copies of the résumé? (This may take up to 10 seconds.)', 'resman');
    ?>
<br/><br/>
			<input type="submit" name="submit"  class="button-primary" value="<?php 
    _e('Update Résumé', 'resman');
    ?>
" />
		</p>
	</div>
	</form>
<?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 
}