Example #1
0
/**
 * function optionsframework_options_page -  Builds the Options Page
 */
function optionsframework_options_page()
{
    global $iva_options, $advance_options;
    $user_id = get_current_user_id();
    $current_user = wp_get_current_user();
    $avatar = get_avatar($user_id, 50);
    $howdy = sprintf(__('Howdy, %1$s'), $current_user->display_name);
    ?>
		<div id="atp_container">
			<div class="atpinterface">
				<div class="page_load">Loading Theme Options...</div>
				<form action="" enctype="multipart/form-data" id="atpform" method='post'>
					<div id="atp-popup-save" class="atp-save-popup"><div class="atp-save-save">Options Updated</div></div>
					<div id="atp-popup-reset" class="atp-save-popup"><div class="atp-save-reset">Options Reset</div></div>
					
					<!-- #atp_header -->
					<div id="atp_header" class="clearfix">
						<div class="leftpane">
							<div class="headinfo">
								<div class="atp_avatar"><?php 
    echo $avatar;
    ?>
</div>
								<h4><?php 
    echo $howdy;
    ?>
 </h4>
								<h5><span>Theme Options Panel</span></h5>
							</div>
						</div>
						<div class="rightpane">
							<div class="headlogo">
								<h1><?php 
    echo THEMENAME;
    ?>
</h1>
							</div>
							<div class="panelinfo">
								<div class="themename">Version <span class="details orange"><?php 
    echo THEMEVERSION;
    ?>
</span></div>
							</div>
						</div>
					</div>
					<!-- #atp_header -->
		<?php 
    // Get all the options based on menu/page selection
    switch ($_GET['page']) {
        case 'advance':
            $return = optionsframework_machine($advance_options);
            break;
        case 'optionsframework':
            $return = optionsframework_machine($iva_options);
            break;
    }
    // Rev up the Options Machine
    //$return = optionsframework_machine($iva_options);
    ?>

					<div id="main">

						<div id="atp-nav">
							<ul>
								<?php 
    echo $return[1];
    ?>
							</ul>
						</div>
						
						<div id="content">
							<div class="options-content">
								<?php 
    echo $return[0];
    /* Settings */
    ?>
							</div>
						</div>
						
						<div class="clear"></div>
				
					</div>
		
					<div class="savebar">
						<div class="savelink">
						<img style="display:none" src="<?php 
    echo admin_url();
    ?>
/images/spinner.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="saving..." />
						<input type="submit" value="Save All Changes" class="green-button button button-primary button-hero right" />
						</div>
					</form>
					<form action="<?php 
    echo esc_attr($_SERVER['REQUEST_URI']);
    ?>
" method="post" style="display:inline" id="atpform-reset">
						<span class="submit-footer-reset">
							<input name="reset" type="submit" value="Reset Options" class="red-button button button-secondary" onclick="return confirm('Click OK to reset. Any settings will be lost!');" />
							<input type="hidden" name="atp_save" value="reset" />
						</span>
					</form>
					</div>
					<?php 
    if (!empty($update_message)) {
        echo $update_message;
    }
    ?>
					<div class="clear"></div>
			</div>
	<!-- end atpinterface-->
	</div>
	<!-- end atp_container-->
	<?php 
}
Example #2
0
function optionsframework_options_page()
{
    $options = get_option('of_template');
    $themename = get_option('of_themename');
    ?>


<div class="wrap" id="of_container">
  <div id="of-popup-save" class="of-save-popup">
    <div class="of-save-save">Options Updated</div>
  </div>
  <div id="of-popup-reset" class="of-save-popup">
    <div class="of-save-reset">Options Reset</div>
  </div>
  <form action="" enctype="multipart/form-data" id="ofform">
    <div id="header">
      <div class="logo">
        <h2><?php 
    echo $themename;
    ?>
 Admin Panel</h2>
      </div>
	  <button id="save_all_changes" type="submit" class="of-button" />Save All Changes</button>
      <div class="clear"></div>
    </div>
    <?php 
    // Rev up the Options Machine
    $return = optionsframework_machine($options);
    ?>
    <div id="main">
      <div id="of-nav">
        <ul>
          <?php 
    echo $return[1];
    ?>
        </ul>
      </div>
      <div id="content"> <?php 
    echo $return[0];
    /* Settings */
    ?>
 </div>
      <div class="clear"></div>
    </div>
    <div class="save_bar_top">
    <img style="display:none" src="<?php 
    echo THEME_ADMIN_IMG;
    ?>
/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." />

  </form>
  <form action="<?php 
    echo esc_attr($_SERVER['REQUEST_URI']);
    ?>
" method="post" style="display:inline" id="ofform-reset">
    <span class="submit-footer-reset">

    <input name="reset" type="submit" value="Reset Options"  class="button submit-button reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" />
    <input type="hidden" name="of_save" value="reset" />
    </span>
  </form>
  
  
	</div>
<?php 
    if (!empty($update_message)) {
        echo $update_message;
    }
    ?>
<div style="clear:both;"></div>
</div>
<!--wrap-->


<?php 
}
function optionsframework_options_page()
{
    $options = get_option('of_template');
    $themename = get_option('of_themename');
    ?>

<div class="wrap" id="of_container">
  <div id="of-popup-save" class="of-save-popup">
    <div class="of-save-save">Settings has been updated!</div>
  </div>
  <div id="of-popup-reset" class="of-save-popup">
    <div class="of-save-reset">Settings has been reseted!</div>
  </div>
  <form action="" enctype="multipart/form-data" id="ofform">
    <div id="header">
      <div class="logo">
        <h2><?php 
    echo $themename;
    ?>
</h2>
      </div>
      <div class="icon-option"> </div>
      <div class="clear"></div>
    </div>
    <?php 
    // Rev up the Options Machine
    $return = optionsframework_machine($options);
    ?>
    <div id="main">
      <div id="of-nav">
        <ul>
          <?php 
    echo $return[1];
    ?>
        </ul>
      </div>
      <div id="content"> <?php 
    echo $return[0];
    /* Settings */
    ?>
 </div>
      <div class="clear"></div>
    </div>
    <div class="save_bar_top">
    <img style="display:none" src="<?php 
    echo bloginfo('stylesheet_directory');
    ?>
/admin/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." />
    <input type="submit" value="Save Settings" class="button-primary" />
  </form>
  <form action="<?php 
    echo esc_attr($_SERVER['REQUEST_URI']);
    ?>
" method="post" style="display:inline;" id="ofform-reset">
    <span class="submit-footer-reset">
    <input name="reset" type="submit" value="Reset Settings" class="button submit-button reset-button" onclick="return confirm('Is settings been reseted?');" />
    <input type="hidden" name="of_save" value="reset" />
    </span>
  </form>
</div>
<?php 
    if (!empty($update_message)) {
        echo $update_message;
    }
    ?>
<div style="clear:both;"></div>
</div>
<div style="margin-left:110px;">Designd & Coding : <a href="http://www.erhankilic.org" title="Erhan Kılıç">Erhan Kılıç</a></div>
<!--wrap-->
<?php 
}