<?php
if ( function_exists('register_sidebar') )
	register_sidebar(array(
        'before_widget' => '',
        'after_widget' => '',
        'before_title' => '<h2>',
        'after_title' => '</h2>',
    ));
    if ( function_exists('register_sidebar') )    
    	register_sidebars(1,array(
    		'before_widget' => '', 
    		'after_widget' => '',
    		'before_title' => '<h2>',
    		'after_title' => '</h2>',
    		));
	add_action ('admin_menu', 'k2menu');	
	$k2loc = '../themes/' . basename(dirname($file)); 

function k2menu() {
	add_submenu_page('themes.php', 'Blackeye Options', 'Blackeye Options', 5, $k2loc . 'functions.php', 'menu');
}

function menu() {
	load_plugin_textdomain('k2options');
	//this begins the admin page
?>

<?php if (isset($_POST['Submit'])) : ?>
	<div class="updated">
		<p><?php _e('Cutline Options have been updated'); ?></p>
	</div>
<?php endif; ?>

<div class="wrap">

	<h2><?php _e('Blackeye Options'); ?></h2>
	<form name="dofollow" action="" method="post">
	  	<table width="700px" cellspacing="2" cellpadding="5" class="editform">
			<tr valign="top">
			<th scope="row"><?php echo __('Archives Page'); ?></th>
			<td>
				<input name="archives" id="add-archive" type="checkbox" value="add_archive" <?php checked('add_archive', get_option('k2archives')); ?> />
				<label for="add-archives"><?php _e('Enable the Cutline Archives page') ?></label>
				<p><small>Enabling this checkbox will create an Archives Page, which will show up in your blog menu as the first page.</small></p>
			</td>
			</tr>
		</table>
	
		<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options') ?> &raquo;" /></p>
	
	</form>
</div>

<div class="wrap">
	<p style="text-align: center;">Get help with Cutline at <a href="http://cutline.tubetorial.com">the Cutline support site</a>.</p>
</div>

<?php } // this ends the admin page ?>	
