<?php

// Create control panel class
class ControlPanel {

	// Store default settings
	var $default_settings = Array(
	);

	var $options;

	// Add the menus / head to admin panel
	function ControlPanel() {
    add_action('admin_menu', array(&$this, 'add_menu'));
	add_action('admin_head', array(&$this, 'admin_head'));
	if (!is_array(get_option('news')))
	add_option('news', $this->default_settings);
	$this->options = get_option('news');
	}

	// Add Control panel menus
	function add_menu() {
		add_submenu_page('themes.php', __('NewsWorld Options','news'), __('NewsWorld Options','news'), 10, 'theme-options', array(&$this, 'optionsmenu'));
	}

	// Add CSS and JavaScript (Header) - if needed
	function admin_head() {
		echo '<link rel="stylesheet" href="'.get_bloginfo('template_directory').'/lib/theme-options.css" type="text/css" media="all" />';
		echo '<link rel="stylesheet" href="'.get_bloginfo('template_directory').'/lib/colorpicker.css" type="text/css" media="all" />';
		echo '<script type="text/javascript" src="'.get_bloginfo('template_directory').'/lib/theme-options.js"></script>';
		echo '<script type="text/javascript" src="'.get_bloginfo('template_directory').'/lib/colorpicker.js"></script>';
		echo '<script type="text/javascript" src="'.get_bloginfo('template_directory').'/lib/eye.js"></script>';
	}

	// Process options page
	function optionsmenu() {

	// Load an appropriate options page
	if (!empty($_GET['page'])) {
		include_once TEMPLATEPATH.'/lib/'.$_GET['page'].'.php';
	}
	
	}

} // End control panel class

// Make $options array
$new_control_panel = new ControlPanel();
$news = get_option('news');

?>