<?php

// Create control panel class
class ControlPanel {

	// Store default settings
	var $default_settings = Array(
		'livechat' => '#',
		'login' => '#',
		'phone' => '+1-800-555-5555',
		'email' => '',
		'contact_email' => '',
		'offer' => '<strong>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</strong> Lorem Ipsum has been the<br />industry\'s standard dummy text ever since the <strong>1500s, when an unknown</strong> printer took.',
		'buttont1' => 'Reseller Hosting',
		'buttont2' => 'Managed Hosting',
		'buttont3' => 'Virtual Server',
		'buttonu1' => '#',
		'buttonu2' => '#',
		'buttonu3' => '#',
		'bheading' => '<h1><span>Reseller</span> Hosting<br />Made Easy and Affordable!</h1>',
		'bprice' => '$3.98/mo',
		'bfeatures' => 'Unlimited Storage
Unlimited Monthly Bandwidth
CGI, PHP, RoR and MySQL',
		'btext' => 'Get Started Now',
		'burl' => '#getstarted',
		'reviewhome' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
		'newsletter' => '<input type="text" name="name" class="field4" id="field4" value="Name:" onfocus=\'javascript: this.value = ""\' onblur=\'javascript: if(this.value =="") this.value = "Name:"\' />
<input type="text" name="emailaddress" class="field4" id="field5" value="Email:" onfocus=\'javascript: this.value = ""\' onblur=\'javascript: if(this.value =="") this.value = "Email:"\' />
<input type="submit" name="submit" class="submitbtn" value="" />',
		'copyright' => 'Copyright &copy; 2012, <span class="yellow">Live Web</span> All Rights Reserved.<br />
Usage of this site constitutes acceptance of the Terms of Service, DMCA Policy and Privacy Policy.'
	);

	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('live')))
	add_option('live', $this->default_settings);
	$this->options = get_option('live');
	}

	// Add Control panel menus
	function add_menu() {
		add_theme_page('Theme Options', 'Theme Options', 'administrator', 'options', array(&$this, 'optionsmenu'), get_template_directory_uri().'/admin/options.png');
	}

	// Add CSS and JavaScript (Header) - if needed
	function admin_head() {
		wp_enqueue_script('media-upload');
		wp_enqueue_script('thickbox');
		wp_register_script('my-upload', get_template_directory_uri().'/admin/my-script.js', array('jquery','media-upload','thickbox'));
		wp_enqueue_script('my-upload');
		wp_enqueue_style('thickbox');
		print '<link rel="stylesheet" type="text/css" media="all" href="'.get_template_directory_uri().'/admin/style.css" />';
	}

	// Process options page
	function optionsmenu() {
		include_once TEMPLATEPATH.'/admin/options.php';
	}

} // End control panel class

// Make $options array
$new_control_panel = new ControlPanel();
$live = get_option('live');

?>
