<?php

	/* Disable the Admin Bar. */
	function my_function_admin_bar(){ return false; }
	add_filter( 'show_admin_bar' , 'my_function_admin_bar');
		function the_category_filter($thelist,$separator=' ') {  
			if(!defined('WP_ADMIN')) {  
				//Category Names to exclude  
				$exclude = array('Uncategorized', 'Private');  

				$cats = explode($separator,$thelist);  
				$newlist = array();  
				foreach($cats as $cat) {  
					$catname = trim(strip_tags($cat));  
					if(!in_array($catname,$exclude))  
						$newlist[] = $cat;  
				}  
				return implode($separator,$newlist);  
			} else {  
				return $thelist;  
			}  
		}  

		$themename = "SiteCrusherPro";
		$shortname = "wpc";

		$options = array (

	);


class My_Services_Widget extends WP_Widget {
	function My_Services_Widget() {
		$widget_ops = array('classname' => 'widget_myservices', 'description' => 'A list with your services link.' );
		$this->WP_Widget('services_links', 'My Services Widget', $widget_ops);
	}
	function widget($args, $instance) {
		extract($args, EXTR_SKIP);
		echo $before_widget;
		$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
		if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
			?>
				<ul class="services">
					<li><a href="<?php echo get_option('readmoreURL1'); ?>"><?php echo html_entity_decode(htmlspecialchars(get_option('headline1'), ENT_NOQUOTES, "iso-8859-1")); ?></a></li>
					<li><a href="<?php echo get_option('readmoreURL2'); ?>"><?php echo html_entity_decode(htmlspecialchars(get_option('headline2'), ENT_NOQUOTES, "iso-8859-1")); ?></a></li>
					<li><a href="<?php echo get_option('readmoreURL3'); ?>"><?php echo html_entity_decode(htmlspecialchars(get_option('headline3'), ENT_NOQUOTES, "iso-8859-1")); ?></a></li>
				</ul>
			<?php 
		echo $after_widget;
	}
	function update($new_instance, $old_instance) {
		$instance = $old_instance;
		$instance['title'] = strip_tags($new_instance['title']);
		return $instance;
	}
	function form($instance) {
		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
		$title = strip_tags($instance['title']);
		?>
		<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
	<?php
	}
}
	register_widget('My_Services_Widget');

class Connect_With_Me_Widget extends WP_Widget {
	function Connect_With_Me_Widget() {
		$widget_ops = array('classname' => 'widget_connectwithme', 'description' => 'A list of your contacts & social links.' );
		$this->WP_Widget('social_links', 'Connect With Me Widget', $widget_ops);
	}
	function widget($args, $instance) {
		extract($args, EXTR_SKIP);
		echo $before_widget;
		$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
		if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
			?>
				<ul>
						<li><a href="tel:<?php echo html_entity_decode(htmlspecialchars(get_option('calltoaction-headline'), ENT_NOQUOTES, "iso-8859-1")); ?>" id="phoneLink"><?php echo html_entity_decode(htmlspecialchars(get_option('calltoaction-headline'), ENT_NOQUOTES, "iso-8859-1")); ?></a></li>
						<?php if (get_option('calltoaction-fanpage') != "") { ?>
								<li><a href="<?php echo get_option('calltoaction-fanpage'); ?>" id="fbLink">Connect on Facebook</a></li>
						<?php } ?>
						<?php if (get_option('calltoaction-places') != "") { ?>
								<li><a href="<?php echo get_option('calltoaction-places'); ?>" id="placesLink">Find us On Google Places</a></li>
						<?php } ?>
					</ul>
			<?php 
		echo $after_widget;
	}
	function update($new_instance, $old_instance) {
		$instance = $old_instance;
		$instance['title'] = strip_tags($new_instance['title']);
		return $instance;
	}
	function form($instance) {
		$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
		$title = strip_tags($instance['title']);
		?>
		<p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
	<?php
	}
}
	register_widget('Connect_With_Me_Widget');

function mytheme_add_admin() {

	global $themename, $shortname, $options;
	if((get_option('logo') == '')
		||(get_option('calltoaction-headline') == '')
		||(get_option('calltoaction-subheadline') == '')
		||(get_option('calltoaction-graphic') == '')
		||(get_option('tagline') == '')

		||(get_option('headline1') == '')
		||(get_option('subheadline1') == '')
		||(get_option('content') == '')
		||(get_option('readmore1') == '')
		||(get_option('readmoreURL1') == '')

		||(get_option('headline2') == '')
		||(get_option('subheadline2') == '')
		||(get_option('content2') == '')
		||(get_option('readmore2') == '')
		||(get_option('readmoreURL2') == '')

		||(get_option('headline3') == '')
		||(get_option('subheadline3') == '')
		||(get_option('content3') == '')
		||(get_option('readmore3') == '')
		||(get_option('readmoreURL3') == '')

		||(get_option('bg-style') == '')
		||(get_option('typography') == '')

		||(get_option('calltoaction-places') == '')
		||(get_option('calltoaction-fanpage') == '')

		||(get_option('calltoaction-bg') == '')
		||(get_option('calltoaction-logo') == '')

		||(get_option('logo_color') == '')
		||(get_option('cta_color') == '')
		||(get_option('headline_color') == '')
		||(get_option('nav_color') == '')

		||(get_option('fanpageBanner') == '')
		||(get_option('revealBanner') == '')
		||(get_option('mobileBanner') == '')
		||(get_option('mobilePage') == '')
		||(get_option('importSettings') == '')
		||(get_option('calltoaction-video') == '')
	) {
		 add_option('calltoaction-headline', '');
		 add_option('calltoaction-subheadline', '');
		 add_option('calltoaction-graphic', '');
		 add_option('inner-bg', '');
		 add_option('tagline', '');

		 add_option('headline1', '');
		 add_option('subheadline1', '');
		 add_option('content', '');
		 add_option('readmore1', '');
		 add_option('readmoreURL1', '');

		 add_option('headline2', '');
		 add_option('subheadline2', '');
		 add_option('content2', '');
		 add_option('readmore2', '');
		 add_option('readmoreURL2', '');

		 add_option('headline3', '');
		 add_option('subheadline3', '');
		 add_option('content3', '');
		 add_option('readmore3', '');
		 add_option('readmoreURL3', '');

		 add_option('bg-style', '');
		 add_option('typography', '');
		 add_option('calltoaction-fanpage', '');
		 add_option('calltoaction-places', '');
		 add_option('calltoaction-bg', '');
		  add_option('calltoaction-video', '');
		 add_option('calltoaction-logo', '');

		 add_option('logo_color', '');
		 add_option('cta_color', '');
		 add_option('nav_color', '');
		 add_option('headline_color', '');

		 add_option('fanpageBanner', '');
		 add_option('revealBanner', '');
		 add_option('mobileBanner', '');
		 add_option('mobilePage', '');

		 add_option('importSettings', '');

		 add_option('h1-color', '333333');
		 add_option('h2-color', '333333');
		 add_option('h3-color', '333333');
		 add_option('h4-color', '333333');
		 add_option('h5-color', '333333');
		 add_option('p-color', '333333');
	}

	if ( $_GET['page'] == basename(__FILE__) ) {

		if ( 'save' == $_REQUEST['action'] ) {

			 if(isset($_REQUEST['calltoaction-headline'])) {
				update_option('calltoaction-headline', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-headline']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			 if(isset($_REQUEST['calltoaction-subheadline'])) {
				update_option('calltoaction-subheadline', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-subheadline']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			 if(isset($_REQUEST['calltoaction-graphic'])) {
				update_option('calltoaction-graphic', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-graphic']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			 if(isset($_REQUEST['calltoaction-video'])) {
				update_option('calltoaction-video', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-video']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			 if(isset($_REQUEST['logo'])) {
				update_option('logo', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['logo']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['tagline'])) {
				update_option('tagline', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['tagline']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['bg-style'])) {
				update_option('bg-style', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['bg-style']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['typography'])) {
				update_option('typography', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['typography']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['headline1'])) {
				update_option('headline1', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['headline1']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['subheadline1'])) {
				update_option('subheadline1', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['subheadline1']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['content'])) {
				update_option('content', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['content']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['readmore1'])) {
				update_option('readmore1', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['readmore1']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['readmoreURL1'])) {
				update_option('readmoreURL1', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['readmoreURL1']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['headline2'])) {
				update_option('headline2', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['headline2']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['subheadline2'])) {
				update_option('subheadline2', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['subheadline2']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['content2'])) {
				update_option('content2', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['content2']), ENT_NOQUOTES, "iso-8859-1")));
			}  
			if(isset($_REQUEST['readmore2'])) {
				update_option('readmore2', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['readmore2']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['readmoreURL2'])) {
				update_option('readmoreURL2', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['readmoreURL2']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['headline3'])) {
				update_option('headline3', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['headline3']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['subheadline3'])) {
				update_option('subheadline3', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['subheadline3']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['content3'])) {
				update_option('content3', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['content3']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['readmore3'])) {
				update_option('readmore3', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['readmore3']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['readmoreURL3'])) {
				update_option('readmoreURL3', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['readmoreURL3']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['calltoaction-fanpage'])) {
				update_option('calltoaction-fanpage', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-fanpage']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['calltoaction-places'])) {
				update_option('calltoaction-places', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-places']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['calltoaction-bg'])) {
				update_option('calltoaction-bg', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-bg']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['calltoaction-logo'])) {
				update_option('calltoaction-logo', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['calltoaction-logo']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['logo_color'])) {
				update_option('logo_color', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['logo_color']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['cta_color'])) {
				update_option('cta_color', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['cta_color']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['nav_color'])) {
				update_option('nav_color', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['nav_color']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['headline_color'])) {
				update_option('headline_color', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['headline_color']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['fanpageBanner'])) {
				update_option('fanpageBanner', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['fanpageBanner']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['revealBanner'])) {
				update_option('revealBanner', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['revealBanner']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['mobileBanner'])) {
				update_option('mobileBanner', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['mobileBanner']), ENT_NOQUOTES, "iso-8859-1")));
			} 
			if(isset($_REQUEST['mobilePage'])) {
				update_option('mobilePage', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['mobilePage']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['importSettings'])) {
				update_option('importSettings', html_entity_decode(htmlspecialchars(stripslashes($_REQUEST['importSettings']), ENT_NOQUOTES, "iso-8859-1")));
			} 

			if(isset($_REQUEST['h1-size'])) {
			update_option('h1-size', $_REQUEST['h1-size']);
		}

		if(isset($_REQUEST['h1-style'])) {
			update_option('h1-style', $_REQUEST['h1-style']);
		}

		if(isset($_REQUEST['h2-size'])) {
			update_option('h2-size', $_REQUEST['h2-size']);
		}

		if(isset($_REQUEST['h2-style'])) {
			update_option('h2-style', $_REQUEST['h2-style']);
		}

		if(isset($_REQUEST['h3-size'])) {
			update_option('h3-size', $_REQUEST['h3-size']);
		}

		if(isset($_REQUEST['h3-style'])) {
			update_option('h3-style', $_REQUEST['h3-style']);
		}

		if(isset($_REQUEST['h4-size'])) {
			update_option('h4-size', $_REQUEST['h4-size']);
		}

		if(isset($_REQUEST['h4-style'])) {
			update_option('h4-style', $_REQUEST['h4-style']);
		}

		if(isset($_REQUEST['h5-size'])) {
			update_option('h5-size', $_REQUEST['h5-size']);
		}

		if(isset($_REQUEST['h5-style'])) {
			update_option('h5-style', $_REQUEST['h5-style']);
		}

		if(isset($_REQUEST['p-size'])) {
			update_option('p-size', $_REQUEST['p-size']);
		}

		if(isset($_REQUEST['p-style'])) {
			update_option('p-style', $_REQUEST['p-style']);
		}

		if(isset($_REQUEST['h1-color'])) {
			update_option('h1-color', $_REQUEST['h1-color']);
		}

		if(isset($_REQUEST['h2-color'])) {
			update_option('h2-color', $_REQUEST['h2-color']);
		}

		if(isset($_REQUEST['h3-color'])) {
			update_option('h3-color', $_REQUEST['h3-color']);
		}

		if(isset($_REQUEST['h4-color'])) {
			update_option('h4-color', $_REQUEST['h4-color']);
		}

		if(isset($_REQUEST['h5-color'])) {
			update_option('h5-color', $_REQUEST['h5-color']);
		}

		if(isset($_REQUEST['p-color'])) {
			update_option('p-color', $_REQUEST['p-color']);
		}
		} 
	}

	add_theme_page($themename." <br/>Theme Options", "".$themename." <br/>Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');

}

function mytheme_admin() {

	global $themename, $shortname, $options;

	if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
	if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>';

?>
	<?php include('../wp-content/themes/SiteCrusherPro/admin/styles.php'); ?>
	<?php include('../wp-content/themes/SiteCrusherPro/admin/jquery.php'); ?>

	<?php
		// Import Settings
		$getexportcode = get_option('importSettings');
		$exportcode = base64_decode($getexportcode);
		$exportvars = explode("%__%", $exportcode);

	?>
	<div id="admin-content" class="clearfix">
			<form  method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
				<?php if (get_option('importSettings') != "") { ?>
						<input name="save" type="image" src="../wp-content/themes/SiteCrusherPro/images/confirm.png" class="submit" style="display: block; margin: 0 auto;" value="Save changes" />
				<?php } ?>
			<h1>Site Crusher Pro Theme Options <strong id="money"><a href="http://leadmachineapp.com/" target="blank">Login To Members Area</a></strong></h1>
			<img src="http://cdn5.iconfinder.com/data/icons/woocons1/Dashboard .png" style="float: right; margin: 10px">
			<p><strong>Site Crusher Pro Theme Options:</strong> Here you will be able to edit all of the content and styles of your website instantly. Follow the steps for rapid website creation. Once you are done the wizard will let you know by turning green on completed steps.</p>
			<hr/>
			<img src="http://cdn2.iconfinder.com/data/icons/32pxmania/misc_57.png" style="float: right; margin: 10px">
			<p><strong>New additions:</strong> Create facebook fanpage campaign &amp; optimized mobile site. Facebook Fanpages w/ Reveal Page, Optimized Mobile Site w/ Blog, Access to Site Lead Machine to export content directly into your wordpress theme.</p>
			<a href="#" id="openCustomizeArea" class="open"><h2 id="customizeTheme">Customize Your Theme (Style, Header, Social Links)</h2></a>
			<?php include('../wp-content/themes/SiteCrusherPro/admin/customizeTheme.php'); ?>

			<a href="#"  id="opencalltoactionArea" class="open"><h2  id="bannerGraphich2">Customize Background, Logo &amp; Banner Graphic </h2></a>
			<?php include('../wp-content/themes/SiteCrusherPro/admin/bannerGraphic.php'); ?>

			<?php include('../wp-content/themes/SiteCrusherPro/admin/contentBoxes.php'); ?>

			<a href="#"  id="openfanpageArea" class="open"><h2>Customize Facebook Fan Page / Reveal Page</h2></a>
			<div id="fanpageArea" style="display: none">
				<img src="http://cdn3.iconfinder.com/data/icons/socialnetworking/32/facebook.png" style="float: right; margin: 10px">
				<p><strong>Facebook Fanpage Campaign:</strong> Here you will you can customize the banner graphic for your fanpage like &amp; reveal pages. Add the direct URL to your image.</p>
				<hr />
				<div class="big">
					<label>Like Page Bannner Image URL: (width: 495px by height: 300px)</label>
					<input type="text" class="input" name="fanpageBanner" id="fanpageBanner" value="<?php echo get_option('fanpageBanner'); ?>" style="width: 570px;" />
				</div>
				<div class="big">
					<label>Reveal Page Banner Image URL: (width: 495px by height: 300px)</label>
					<input type="text" class="input" name="revealBanner" id="revealBanner" value="<?php echo get_option('revealBanner'); ?>" style="width: 570px;" />
				</div>
				<hr /><a href="<?php echo get_bloginfo('template_directory'); ?>/i-images/facebook.png" target="_blank"><img src="<?php echo get_bloginfo('template_directory'); ?>/i-images/facebook.png" width="270" height="140" style=" margin-right: 10px; float: right;" /></a><br clear="all" />
			</div>

			<a href="#"  id="openmobileArea" class="open"><h2>Customize Optimized Mobile Page</h2></a>
			<div id="mobileArea" style="display: none">
				<img src="http://cdn5.iconfinder.com/data/icons/woocons1/Mobile%20Phone.png" style="float: right; margin: 10px">
				<p><strong>Optimize your site for mobile phones!</strong> Here you can add your custom banner image, only appears on mobile version. Must include your "mobile page" URL to work.</p>
				<hr />
				<div class="big">
					<label>Mobile Banner Image URL: (width: 330px by height: 300px)</label>
					<input type="text" class="input" name="mobileBanner" id="mobileBanner" value="<?php echo get_option('mobileBanner'); ?>" style="width: 570px;" />
				</div>
				<div class="big">
					<label>Mobile Page URL: (The URL to any created "mobile page".)</label>
					<input type="text" class="input" name="mobilePage" id="mobilePage" value="<?php echo get_option('mobilePage'); ?>" style="width: 570px;" />
				</div>
				<hr />
				<a href="<?php echo get_bloginfo('template_directory'); ?>/i-images/mobile.png" target="_blank"><img src="<?php echo get_bloginfo('template_directory'); ?>/i-images/mobile.png" width="270" height="140" style=" margin-right: 10px; float: left;" /></a>
				<a href="<?php echo get_bloginfo('template_directory'); ?>/i-images/mobile2.png" target="_blank"><img src="<?php echo get_bloginfo('template_directory'); ?>/i-images/mobile2.png" width="270" height="140" style=" margin-right: 10px; float: right;" /></a><br clear="all" />
			</div>	

			<a href="#"  id="openImportArea" class="open"><h2  id="importAreaH2">Import <strong>SiteLeadMachine</strong> Settings &amp; Content </h2></a>
			<div id="importArea" style="display: none;">
				<img src="http://cdn2.iconfinder.com/data/icons/oxygen/32x32/actions/document-import.png" style="float: right; margin: 10px">
				<p><strong>Import Your Settings & Content:</strong> Here you will you can customize the banner graphic for your fanpage like &amp; reveal pages. Add the direct URL to your image.</p>
				<hr />
				<div class="big">
					<label>Import Settings &amp; Content from <strong>SiteLeadMachine</strong></label>
					<textarea class="input" name="importSettings" id="importSettings" style="width: 570px; height: 200px; font-size: 13px;" /></textarea>
				</div>
				<hr />

				<a href="<?php echo get_bloginfo('template_directory'); ?>/i-images/export.png" target="_blank"><img src="<?php echo get_bloginfo('template_directory'); ?>/i-images/export.png" width="270" height="140" style=" margin-right: 10px; float: right;" /></a><br clear="all" />
			</div>

			<a href="#"  id="opensupportArea" class="open"><h2  id="support">Need Help? Watch Our Videos or Contact Us </h2></a>
			<div id="supportArea" style="display: none">
				<img src="http://cdn5.iconfinder.com/data/icons/Aristocracy_WebDesignTuts/32/Lifebuoy.png" style="float: right; margin: 10px">
				<p><strong>Watch our support "how-to" video!</strong> Here you will learn how to effectively use the Site Crusher Wordpress theme. If you still have questions please see our <a href="http://support.guerrillaoffline.com/">Support Center</a>.</p>
				<hr />
				<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='600' height='396' id='9e290e9c3ed8443dbdac105282ddd2ca'><param name='movie' value='https://crushersupport.viewscreencasts.com/public/ScreenrBusiness-3.5.1.swf' /><param name='flashvars' value='v=2Fcuhrupr|e9ece84ddc022d2a3fD30Cwno.cen.vnsee9ece84ddc022d2aBt1dr^*xFFF4t*rsespot92093d43ba158ddc^*^*0^*idwSrerEet.92093d43ba158ddc^*^*ak20FFF^*' /><param name='allowFullScreen' value='true' /><param name='AllowScriptAccess' value='always' /><param name='wmode' value='transparent'/><embed id='e9e290e9c3ed8443dbdac105282ddd2ca' wmode='transparent' AllowScriptAccess='always' src='https://crushersupport.viewscreencasts.com/public/ScreenrBusiness-3.5.1.swf' flashvars='v=2Fcuhrupr|e9ece84ddc022d2a3fD30Cwno.cen.vnsee9ece84ddc022d2aBt1dr^*xFFF4t*rsespot92093d43ba158ddc^*^*0^*idwSrerEet.92093d43ba158ddc^*^*ak20FFF^*' allowFullScreen='true' width='600' height='396' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object>
 <script type='text/javascript' src='https://crushersupport.viewscreencasts.com/svideo/9e290e9c3ed8443dbdac105282ddd2ca'></script> 
				<hr/>
			</div>	

			<h3>Currently Using Version 2.2</h3>
			<a href="http://leadmachineapp.com/" target="_blank"><img src="../wp-content/themes/SiteCrusherPro/images/members.png" style="border: none; float: left;"></a>
			<input name="save" type="image" src="../wp-content/themes/SiteCrusherPro/images/update.png" class="submit" style="float: right; margin-top: -9px;" value="Save changes" />    
			<input type="hidden" name="action" value="save" />
			<hr/>
			<p>Copyright &copy; 2011 - SiteCrusherPro, SuccessBug, Ltd</p>
		</form>
		<br clear="all"/>	
	</div>

<?php
}

add_action('admin_menu', 'mytheme_add_admin'); ?>
<?php


	if ( function_exists('register_sidebar') )
		register_sidebar( array(
			'name' => 'Main Sidebar',
			'before_widget' => '',
			'after_widget' => '',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));
		if ( function_exists('register_sidebar') )
		register_sidebar( array(
			'name' => 'Footer 1',
			'before_widget' => '',
			'after_widget' => '',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));
		if ( function_exists('register_sidebar') )
		register_sidebar( array(
			'name' => 'Footer 2',
			'before_widget' => '',
			'after_widget' => '',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));
		if ( function_exists('register_sidebar') )
		register_sidebar( array(
			'name' => 'Footer 3',
			'before_widget' => '',
			'after_widget' => '',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));
		if ( function_exists('register_sidebar') )
		register_sidebar( array(
			'name' => 'Footer 4',
			'before_widget' => '',
			'after_widget' => '',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));

	 function show_avatar($comment, $size)
  {                  $email=strtolower(trim($comment->comment_author_email));
   $rating = "G"; // [G | PG | R | X]
	   if (function_exists('get_avatar')) {
	echo get_avatar($email, $size);
 } else {
		$grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=
	   " . md5($emaill) . "&size=" . $size."&rating=".$rating;
	echo "<img src='$grav_url'/>";
 }         } 

	add_action( 'init', 'create_fanpage' );
	function create_fanpage() {
		register_post_type( 'fb_fanpage',
			array(
				'labels' => array(
					'name' => __( 'FB Like Page' ),
					'singular_name' => __( 'FB Like Page' )
				),
			'public' => true,
			'has_archive' => false,
			'menu_icon' => get_stylesheet_directory_uri() . '/images/facebooksettings.png',
			'rewrite' => true
			)
		);
		flush_rewrite_rules();
	}

	add_action( 'init', 'create_revealpage' );
	function create_revealpage() {
		register_post_type( 'fb_revealpage',
			array(
				'labels' => array(
					'name' => __( 'FB Reveal' ),
					'singular_name' => __( 'FB Reveal' )
				),
			'public' => true,
			'has_archive' => false,
			'menu_icon' => get_stylesheet_directory_uri() . '/images/star.png',
			'rewrite' => true
			)
		);
		flush_rewrite_rules();
	}

	add_action( 'init', 'create_mobile' );
	function create_mobile() {
		register_post_type( 'wp_mobile',
			array(
				'labels' => array(
					'name' => __( 'Mobile Page' ),
					'singular_name' => __( 'Mobile Page' )
				),
			'public' => true,
			'has_archive' => false,
			'menu_icon' => get_stylesheet_directory_uri() . '/images/mobile.png',
			'rewrite' => true
			)
		);
		flush_rewrite_rules();
	}

	add_action('admin_init', 'editor_admin_init');
	add_action('admin_head', 'editor_admin_head');

	function editor_admin_init() {
	  wp_enqueue_script('word-count');
	  wp_enqueue_script('post');
	  wp_enqueue_script('editor');
	  wp_enqueue_script('media-upload');
	}

	function editor_admin_head() {
	  wp_tiny_mce();
	}
?>