<?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('Webcolors')))
	add_option('Webcolors', $this->default_settings);
	$this->options = get_option('Webcolors');
	}

	// Add Control panel menus
	function add_menu() {
	add_menu_page(__('ألوان الويب','Webcolors'), __('الويب الويب','Webcolors'), 10, 'main-setting', array(&$this, 'optionsmenu'), get_bloginfo('template_directory').'/control/controlLogo.png', 62);
	}

	// Add CSS and JavaScript (Header) - if needed
	function admin_head() {
	}

	// Process options page
	function optionsmenu() {

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

} // End control panel class

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

?>