function haku_update_sidebar_action()
{
    /*
    	Security check
    */
    check_ajax_referer('haku_nonce', 'haku_referer');
    /*
    	Processing
    */
    $form_contents = $_POST;
    $sidebar_id = $form_contents['id'];
    unset($form_contents['action'], $form_contents['haku_referer'], $form_contents['id']);
    $current_sidebars = get_option(get_haku_var('theme_sidebars'));
    $current_sidebars[$sidebar_id] = $form_contents;
    if (update_option(get_haku_var('theme_sidebars'), $current_sidebars)) {
        $response = ':)';
    } else {
        $response = haku_error(10);
    }
    /*
    	Response
    */
    die($response);
}
function haku_theme_update_notify()
{
    $xml = haku_get_latest_theme_version();
    ?>
	
	<!-- Wrapper -->
	<div class="wrap">
		
		<!-- WP Icon -->
		<div id="icon-themes" class="icon32"></div>

		<h2 style="margin-bottom: 15px;"><?php 
    echo get_haku_var('theme_name');
    ?>
 <?php 
    echo $xml->latest;
    ?>
 <?php 
    _e('Available', 'haku');
    ?>
!</h2>
	    
	    <div class="updated"><p><strong><?php 
    printf(__('A new version of %s has just become available!', 'haku'), get_haku_var('theme_name'));
    ?>
</strong> <?php 
    printf(__('Head over %s, login into your account, switch to the "Downloads" section and re-download %s, just like you did the first time.', 'haku'), '<a href="http://themeforest.net" target="_blank">ThemeForest.net</a>', get_haku_var('theme_name'));
    ?>
</p></div>
		
		<!-- Theme picture -->
		<img style="float: left; margin: 10px 35px 0 10px;" src="<?php 
    echo get_stylesheet_directory_uri() . '/screenshot.png';
    ?>
" />
		
		<!-- Info -->
		<div style="float: left; width: 500px;">
		
			<h2 style="padding-top: 0;"><?php 
    _e('Things you should know', 'haku');
    ?>
</h2>
			<p><?php 
    printf(__('Before updating, I recommend you to perform a quick backup of your current version of %s (%s). There&rsquo;s no risk that something might corrupt your database, but you might lose any eventual change you made on the theme itself.', 'haku'), get_haku_var('theme_name'), get_theme_version());
    ?>
</p>
			<p><?php 
    _e('Your theme path:', 'haku');
    ?>
 <code><?php 
    echo TEMPLATEPATH;
    ?>
</code></p>
		    
		    <h3><?php 
    _e('How to update?', 'haku');
    ?>
</h3>
		    <p><?php 
    echo sprintf(__('Updating a theme is pretty much like installing it. Download it, extract the .zip package, find the theme folder (do not upload the entire package!). Now, if you have no idea of what a FTP connection is, simply delete the current version of %s and upload the new one. Otherwise, connect to your server, navigate to the WordPress themes folder and replace the whole theme folder.', 'haku'), get_haku_var('theme_name'));
    ?>
</p>
			
			<p><?php 
    _e('Your themes path:', 'haku');
    ?>
 <code><?php 
    echo get_theme_root();
    ?>
</code></p>
			
			<h3><?php 
    _e('I still need help.', 'haku');
    ?>
</h3>
			<p><?php 
    echo sprintf(__('If you still need help, don&rsquo;t hesitate to contact me through my ThemeForest.net %s Contact Form.', 'haku'), '<a href="http://themeforest.net/user/pacovitiello1?ref=pacovitiello1">' . __('Profile Page', 'haku') . '</a>');
    ?>
</p>
			
		</div>
		<!-- end: Info -->
		
		<div class="clear"></div>
		
	    <h3><?php 
    _e('What&rsquo;s changed?', 'haku');
    ?>
</h3>

	    <div><?php 
    echo $xml->changelog;
    ?>
</div>

	</div>
	<!-- end: Wrapper -->
	
	<?php 
}
function haku_metaboxes_javascript()
{
    wp_register_script('haku_metabox_js', get_haku_var('includes_uri') . '/metabox.js', '', get_theme_version());
    wp_enqueue_script('haku_metabox_js');
}
		
		<!-- Option -->
		<div>
			
			<!-- Checkbox -->
			<a href="#" class="haku_checkbox"></a>
			
			<!-- Real input -->
			<input <?php 
haku_checked('theme_update');
?>
 name="theme_update" type="checkbox" value="theme_update" />
			
			<!-- Option desc -->
			<p><?php 
printf(__('Check this if you want to be notified when a new update for %s is available.', 'haku'), get_haku_var('theme_name'));
?>
</p>
		
		</div>
		<!-- end: Option -->
							
	</div>
	<!-- end: Option group -->
	
	</form>
	<!-- end: Form -->
	
</div>
<!-- end: Tab -->
function haku_error($code)
{
    return sprintf(get_haku_var('str_error'), $code);
}
		<!-- end: Sidebar -->
		
		<!-- Tabs container -->
		<div>
			
			<!-- Theme options -->
			<?php 
require get_haku_var('panel') . '/options.php';
?>
			
			<!-- Version -->
			<span id="haku_version"><?php 
_e('Version', 'haku');
?>
 <?php 
echo get_haku_var('$');
?>
</span>
			
		</div>
		<!-- end: Tabs container -->
		
	</div>
	<!-- end: Main container -->

	<!-- Footer -->
	<div class="footer">
		
		<span><!-- haku by winterbits --></span>
		
	</div>
function haku_panel_actions()
{
    require get_haku_var('panel') . '/actions.php';
}