function weaverx_form_submit($value)
{
    weaverx_sapi_submit('</table>', '<table style="margin-top:10px;">');
}
function weaverx_admin_mainopts()
{
    ?>
<div id="tabwrap_main" style="padding-left:4px;">

<div id="tab-container-main" class='yetiisub'>
	<ul id="tab-container-main-nav" class='yetiisub'>
	<?php 
    weaverx_elink('#asp_genappear', __('Wrapping background colors, rounded corners, borders, fade, shadow', 'weaver-xtreme'), __('Wrapping Areas', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_widgets', __('Settings for Sidebars and Sidebar Layout', 'weaver-xtreme'), __('Sidebars &amp; Layout', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_headeropts', __('Site Title/Tagline properties, Header Image', 'weaver-xtreme'), __('Header', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_menus', __('Menu text and bg colors and other properties; Info Bar properties', 'weaver-xtreme'), __('Menus', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_content', __('Text colors and bg, image borders, featured image, other properties related to all content', 'weaver-xtreme'), __('Content Areas', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_postspecific', __('Properties related to posts: titles, meta info, navigation, excerpts, featured images, and more', 'weaver-xtreme'), __('Post Specifics', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_footer', __('Footer options: bg color, borders, more. Site Copyright', 'weaver-xtreme'), __('Footer', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_custom', __('Font settings &amp; Custom Settings', 'weaver-xtreme'), __('Fonts &amp; Custom', 'weaver-xtreme'), '<li>', '</li>');
    ?>
	</ul>

	<?php 
    weaverx_tab_title(__('Main Options', 'weaver-xtreme'), 'help.html#MainOptions', __('Help for Main Options', 'weaver-xtreme'));
    ?>

	<div id="asp_genappear" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_general();
    ?>
	</div>

	<div id="asp_widgets" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_layout();
    weaverx_mainopts_widgets();
    ?>
	</div>

	<div id="asp_headeropts" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_header();
    ?>
	</div>

	<div id="asp_menus" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_menus();
    ?>
	</div>

	<div id="asp_content" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_content();
    ?>
	</div>

	<div id="asp_postspecific" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_posts();
    ?>
	</div>

	<div id="asp_footer" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_footer();
    ?>
	</div>


	<div id="asp_links" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_custom();
    ?>
	</div>

</div> <!-- #tab-container-main -->
<?php 
    weaverx_sapi_submit();
    ?>
</div>	<!-- #tabwrap_main -->
   <script type="text/javascript">
	var tabberMainOpts = new Yetii({
	id: 'tab-container-main',
	tabclass: 'tab_mainopt',
	persist: true
	});
</script>
<?php 
}
function weaverx_admin_mainopts()
{
    if (!function_exists('weaverx_get_wp_custom_logo_url')) {
        weaverx_alert(__('    ****  WARNING!  ****\\r\\n\\r\\nYou are using a new Version 3 of the Weaver Xtreme Theme Support Plugin with an older version of the Weaver Xtreme Theme. Please update to the latest Version 3 of the Weaver Xtreme Theme.\\r\\n\\r\\nTHIS VERSION DOES NOT WORK WITH OLD VERSIONS OF WEAVER XTREME!'));
    }
    ?>
<div id="tabwrap_main" style="padding-left:4px;">

<div id="tab-container-main" class='yetiisub'>
	<ul id="tab-container-main-nav" class='yetiisub'>
	<?php 
    weaverx_elink('#asp_genappear', __('Wrapping background colors, rounded corners, borders, fade, shadow', 'weaver-xtreme'), __('Wrapping Areas', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_widgets', __('Settings for Sidebars and Sidebar Layout', 'weaver-xtreme'), __('Sidebars &amp; Layout', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_full', __('Settings to create full width sites', 'weaver-xtreme'), __('Full Width', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_headeropts', __('Site Title/Tagline properties, Header Image', 'weaver-xtreme'), __('Header', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_menus', __('Menu text and bg colors and other properties; Info Bar properties', 'weaver-xtreme'), __('Menus', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_content', __('Text colors and bg, image borders, featured image, other properties related to all content', 'weaver-xtreme'), __('Content Areas', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_postspecific', __('Properties related to posts: titles, meta info, navigation, excerpts, featured images, and more', 'weaver-xtreme'), __('Post Specifics', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_footer', __('Footer options: bg color, borders, more. Site Copyright', 'weaver-xtreme'), __('Footer', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_custom', __('Font settings &amp; Custom Settings', 'weaver-xtreme'), __('Fonts &amp; Custom', 'weaver-xtreme'), '<li>', '</li>');
    ?>
	</ul>

	<?php 
    weaverx_tab_title(__('Main Options', 'weaver-xtreme'), 'help.html#MainOptions', __('Help for Main Options', 'weaver-xtreme'));
    ?>

	<div id="asp_genappear" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_general();
    ?>
	</div>

	<div id="asp_widgets" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_layout();
    weaverx_mainopts_widgets();
    ?>
	</div>

	<div id="asp_full" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_fullwidth();
    ?>
	</div>

	<div id="asp_headeropts" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_header();
    ?>
	</div>

	<div id="asp_menus" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_menus();
    ?>
	</div>

	<div id="asp_content" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_content();
    ?>
	</div>

	<div id="asp_postspecific" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_posts();
    ?>
	</div>

	<div id="asp_footer" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_footer();
    ?>
	</div>


	<div id="asp_links" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_custom();
    ?>
	</div>

</div> <!-- #tab-container-main -->
<?php 
    weaverx_sapi_submit();
    ?>
</div>	<!-- #tabwrap_main -->
   <script type="text/javascript">
	var tabberMainOpts = new Yetii({
	id: 'tab-container-main',
	tabclass: 'tab_mainopt',
	persist: true
	});
</script>
<?php 
}
function weaverx_add_html_field($title, $name, $info, $help = '', $icon = '')
{
    if ($name == 'submit') {
        weaverx_sapi_submit('', "<br /><br />\n");
        return;
    }
    if ($name[0] == '+') {
        $name = substr($name, 1);
    }
    // fix locally
    $area_name = '' . $name . '_insert';
    $hide_front = 'hide_front_' . $name;
    $hide_rest = 'hide_rest_' . $name;
    $style_id = 'inject_' . $name;
    $add_class_id = 'inject_add_class_' . $name;
    $val = array('name' => $title . __(' BG', 'weaver-xtreme'), 'id' => $style_id . '_bgcolor', 'info' => '<span style="margin-top:6px;" class="i-left-bg dashicons dashicons-admin-appearance"></span>' . '<strong style="font-size:larger;">' . __('BG Color for area. (Add custom CSS using the CSS+ option.)', 'weaver-xtreme') . '</strong>', 'help' => '');
    $classes = array('name' => '<span class="i-left">{ }</span> <small>' . __('Add Classes', 'weaver-xtreme') . '</small>', 'id' => $add_class_id, 'type' => '+widetext', 'info' => __('Space separated class names to add to this area (<em>Advanced option</em>) (&starf;Plus)', 'weaver-xtreme'));
    ?>
<div class="atw-option-subheader"><?php 
    echo $icon;
    ?>
<span style="color:blue;"><b><?php 
    echo $title;
    ?>
</b></span></div></br />
<?php 
    if (!$info) {
        return;
    }
    echo $info;
    ?>
	<br />
	<?php 
    weaverx_textarea(weaverx_getopt($area_name), $area_name, 3, __('Any HTML, including shortcodes.', 'weaver-xtreme'));
    ?>

	<br />
	<?php 
    echo '<table style="width:90%;">';
    weaverx_form_ctext($val, true);
    weaverx_form_text($classes);
    echo '</table>';
    ?>
	<label><span class="dashicons dashicons-visibility"></span>
	<?php 
    _e('Hide on front page:', 'weaver-xtreme');
    ?>
	<input type="checkbox" name="<?php 
    weaverx_sapi_main_name($hide_front);
    ?>
" id="<?php 
    echo $hide_front;
    ?>
" <?php 
    checked(weaverx_getopt_checked($hide_front));
    ?>
 /></label>

	<small><?php 
    _e('If you check this box, then the code from this area will not be displayed on the front (home) page.', 'weaver-xtreme');
    ?>
</small><br />
	<label><span class="dashicons dashicons-visibility"></span>
	<?php 
    _e('Hide on non-front pages:', 'weaver-xtreme');
    ?>
	<input type="checkbox" name="<?php 
    weaverx_sapi_main_name($hide_rest);
    ?>
" id="<?php 
    echo $hide_rest;
    ?>
" <?php 
    checked(weaverx_getopt_checked($hide_rest));
    ?>
 /></label>
	<small><?php 
    _e('If you check this box, then the code from this area will not be displayed on non-front pages.', 'weaver-xtreme');
    ?>
</small><br /><br />
<?php 
}