function wp_bvs_settings_page()
{
    global $pagenow;
    $settings = get_option("wp_bvs_theme_settings");
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    ?>

	<style type="text/css">
        #imgLoading1, #imgLoading2, #imgLoading3 {
            display: none;
            position: absolute;
            padding: 5px;
        }
        #poststuff h3.title {
            font-size: 125%;
            font-family: "Open Sans", sans-serif;
            text-transform: uppercase;
            text-decoration: underline;
        }
    </style>

	<div class="wrap">
		<h2><?php 
    echo __('Theme Options', 'vhl');
    ?>
</h2>

		<?php 
    if ('true' == esc_attr($_GET['updated'])) {
        echo '<div class="updated" ><p>' . __('Theme options updated', 'vhl') . '</p></div>';
    }
    if (isset($_GET['tab'])) {
        wp_bvs_admin_tabs($_GET['tab']);
    } else {
        wp_bvs_admin_tabs('layout');
    }
    ?>

		<div id="poststuff">
			<form method="post" action="<?php 
    admin_url('themes.php?page=theme-settings');
    ?>
">
				<?php 
    wp_nonce_field("wp_bvs-settings-page");
    if ($pagenow == 'themes.php' && $_GET['page'] == 'theme-settings') {
        if (isset($_GET['tab'])) {
            $tab = $_GET['tab'];
        } else {
            $tab = 'homepage';
        }
        echo '<table class="form-table">';
        switch ($tab) {
            case 'header':
                include TEMPLATEPATH . "/bireme_archives/admin/header.php";
                break;
            case 'colors':
                include TEMPLATEPATH . "/bireme_archives/admin/colors.php";
                break;
            case 'layout':
            default:
                include TEMPLATEPATH . "/bireme_archives/admin/layout.php";
                break;
        }
        echo '</table>';
    }
    ?>
				<p class="submit" style="clear: both;">
					<input type="submit" name="Submit"  class="button-primary" value="<?php 
    echo __('Update');
    ?>
" onclick="document.getElementById('imgLoading3').style.display='inline'" />
					<input type="hidden" name="wp_bvs-settings-submit" value="Y" />
					<span id="imgLoading3"><img src="<?php 
    echo get_template_directory_uri() . '/bireme_archives/default/load.gif';
    ?>
"/></span>
				</p>
			</form>

		</div>

	</div>
<?php 
}
Esempio n. 2
0
function wp_bvs_settings_page()
{
    global $pagenow;
    $settings = get_option("wp_bvs_theme_settings");
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    ?>
	
	<div class="wrap">
		<h2><?php 
    echo $theme_data['Name'];
    ?>
 Theme Settings</h2>
		
		<?php 
    if ('true' == esc_attr($_GET['updated'])) {
        echo '<div class="updated" ><p>Theme Settings updated.</p></div>';
    }
    if (isset($_GET['tab'])) {
        wp_bvs_admin_tabs($_GET['tab']);
    } else {
        wp_bvs_admin_tabs('layout');
    }
    ?>

		<div id="poststuff">
			<form method="post" action="<?php 
    admin_url('themes.php?page=theme-settings');
    ?>
">
				<?php 
    wp_nonce_field("wp_bvs-settings-page");
    if ($pagenow == 'themes.php' && $_GET['page'] == 'theme-settings') {
        if (isset($_GET['tab'])) {
            $tab = $_GET['tab'];
        } else {
            $tab = 'homepage';
        }
        echo '<table class="form-table">';
        switch ($tab) {
            case 'header':
                include TEMPLATEPATH . "/bireme_archives/admin/header.php";
                break;
            case 'colors':
                include TEMPLATEPATH . "/bireme_archives/admin/colors.php";
                break;
            case 'layout':
            default:
                include TEMPLATEPATH . "/bireme_archives/admin/layout.php";
                break;
        }
        echo '</table>';
    }
    ?>
				<p class="submit" style="clear: both;">
					<input type="submit" name="Submit"  class="button-primary" value="Update Settings" />
					<input type="hidden" name="wp_bvs-settings-submit" value="Y" />
				</p>
			</form>
			
		</div>

	</div>
<?php 
}