<?php include_once('header.php'); ?>

<?php
// Pull all the categories into an array
$options_categories = array();  
$options_categories_obj = get_categories();
foreach ($options_categories_obj as $category) {
	$options_categories[$category->cat_ID] = $category->cat_name;
}

$options_categories['recent_posts'] = 'Recent Posts';

// Pull all the pages into an array
$options_pages = array();  
$options_pages_obj = get_pages('sort_column=post_parent,menu_order');
$options_pages[''] = 'Select a page:';
foreach ($options_pages_obj as $page) {
	$options_pages[$page->ID] = $page->post_title;
}
?>

<form action='' enctype='multipart/form-data'>
	<div class='top_button'>
		<img class='save_tip' style='display: none;' src='<?php bloginfo('template_directory'); ?>/framework/views/theme_options/images/save_tip.png' alt='' />
		<input type='submit' name='save_changes' value='' class='save_changes' />
	</div>
	<div style='clear: both;'></div>
	<div id='general_settings' class='mainTab'>
		<div id='general'>
			<?php $this->upload('logo', 'Logo', 'Upload your logo'); ?>
			<?php $this->upload('favicon', 'Favicon', 'Upload your Favicon'); ?>
			<?php $this->textarea('header_banner', 'Header Banner Code', ''); ?>
			<?php $this->text('feedburner', 'Feedburner URL', ''); ?>
			<?php $this->textarea('404', '404', ''); ?>
		</div>
		<div id='analytics' style='display: none;'>
			<?php $this->textarea('analytics', 'Analaytics Code', ''); ?>
		</div>
		<div id='theme_footer' style='display: none;'>
			<?php $this->checkbox('footer_widgets', 'Show Footer Widgets'); ?>
			<?php $this->checkbox('copyright', 'Show Copyright'); ?>
			<?php $this->textarea('footer_left', 'Footer Text Left', ''); ?>
			<?php $this->textarea('footer_right', 'Footer Text Right', ''); ?>
		</div>
	</div>
	<div id='homepage_settings' style='display: none;' class='mainTab'>
		<?php $this->checkbox('carousel', 'Show posts carousel'); ?>
		<?php $this->select('carousel_category', $options_categories, 'Posts carousel category'); ?>
		<?php $this->checkbox('featured_slider', 'Show featured slider'); ?>
		<?php $this->select('featured_slider_category', $options_categories, 'Featured slider category'); ?>
		<?php $this->select('homepage_style', array(
			'magazine' => 'Magazine',
			'blog' => 'Traditional Blog',
		),
		'Homepage Style'); ?>
		<?php $this->select('slider_effect', array(
			'random' => 'Random',
			'sliceDown' => 'Slice Down',
			'sliceDownLeft' => 'Slice Down Left',
			'sliceUp' => 'Slice Up',
			'sliceUpLeft' => 'Slice Up Left',
			'sliceUpDown' => 'Slice Up Down',
			'sliceUpDownLeft' => 'Slice Up Down Left',
			'fold' => 'Fold',
			'fade' => 'Fade',
			'slideInRight' => 'Slide In Right',
			'slideInLeft' => 'Slide In Left',
			'boxRandom' => 'Box Random',
			'boxRain' => 'Box Rain',
			'boxRainReverse' => 'Box Rain Reverse',
			'boxRainGrow' => 'Box Rain Grow',
			'boxRainGrowReverse' => 'Box Rain Grow Reverse',
		),
		'Slider Effect'); ?>
		<?php $this->text('slider_speed', 'Slider Speed', ''); ?>
	</div>
	<div id='posts_settings' style='display: none;' class='mainTab'>
		<?php $this->checkbox('posts_navigation', 'Show posts navigation'); ?>
		<?php $this->checkbox('posts_featured', 'Show featured image on posts'); ?>
		<?php $this->checkbox('author', 'Show author info box on posts'); ?>
		<?php $this->checkbox('tags', 'Show tags on posts'); ?>
		<?php $this->checkbox('categories', 'Show categories on posts'); ?>
		<?php $this->checkbox('related', 'Show related posts box on posts'); ?>
		<?php $this->checkboxes(array(
			'twitter' => 'Twitter',
			'facebook' => 'Facebook',
			'digg' => 'Digg',
			'stumbleupon' => 'StumbleUpon',
			'reddit' => 'Reddit',
			'tumblr' => 'Tumblr',
			'email' => 'Email',
			'google' => 'Google +1',
		),
		'Social Media Support'); ?>
	</div>
	<div id='appearence_settings' style='display: none;' class='mainTab'>
		<?php $this->colorpicker('bg_color', 'Bg Color'); ?>
		<?php $this->upload('bg_image', 'Bg Image', ''); ?>
		<?php $this->select('bg_repeat', array(
			'no-repeat' => 'no-repeat',
			'repeat' => 'repeat',
			'repeat-x' => 'repeat-x',
			'repeat-y' => 'repeat-y'
		),
		'Bg Repeat'); ?>
		<?php $this->checkbox('show_pattern', 'Show Pattern? (Select one from below)'); ?>
		<?php $this->images('pattern', array(
			'pattern1' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern1.png',
			'pattern2' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern2.png',
			'pattern3' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern3.png',
			'pattern4' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern4.png',
			'pattern5' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern5.png',
			'pattern6' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern6.png',
			'pattern7' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern7.png',
			'pattern8' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern8.png',
			'pattern9' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern9.png',
			'pattern10' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern10.png',
			'pattern11' => get_bloginfo('template_url') . '/framework/views/theme_options/images/pattern-thumbs/pattern11.png',
		), 'Background Pattern'); ?>
		<?php $this->colorpicker('header_bg_color', 'Header Bg Color'); ?>
		<?php $this->colorpicker('nav_bg_color', 'Navigation Bg Color'); ?>
	</div>
	<div class='reset_save'>
		<div class='reset_button'>
			<input onclick='return confirm("Click OK to reset. Any settings will be lost!");' type='submit' name='reset' value='' class='reset_btn' />
			<img class='reset_tip' style='display: none;' src='<?php bloginfo('template_directory'); ?>/framework/views/theme_options/images/reset_tip.png' alt='' />
		</div>
		<div class='bottom_button'>
			<img class='save_tip' style='display: none;' src='<?php bloginfo('template_directory'); ?>/framework/views/theme_options/images/save_tip.png' alt='' />
			<input type='submit' name='save_changes' value='' class='save_changes' />
		</div>
		<div style='clear: both;'></div>
	</div>
	<div style='clear: both;'></div>
</form>

<?php include_once('footer.php'); ?>