<?php
/*
/*-----------------------------------------------*/
/* KENTOOZ FRAMEWORK FOR FREE THEME
/* Website: kentooz.com
/* The Author: Gian Mokhammad Ramadhan 
/* Social network :twitter.com/g14nnakal facebook.com/gianmr
/* Version :1.0
/*-----------------------------------------------*/

// Do not load directly...
if ( ! defined( 'ABSPATH' ) ) { die( 'Direct access forbidden.' ); }

/*******************************************
# Main footer on hook system ~ post
*******************************************/
if ( !function_exists( 'ktz_mainfooter' ) ) :
function ktz_mainfooter() {
	$footer_column = get_theme_option('ktz_footer_columns');
	echo '<div class="row">';
		switch($footer_column) :
			case 'full':
				echo '<div class="span12 widget-area" role="complementary">';
				dynamic_sidebar('widget_fot1');
				echo '</div>';
				break;
			case 'half_half':
				echo '<div class="span6 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span6 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				break;
			case 'onethird_onethird_onethird':					
				echo '<div class="span4 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span4 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				echo '<div class="span4">';
				dynamic_sidebar( 'widget_fot3' );
				echo '</div>';
				break;
			case 'twothird_onethird':
				echo '<div class="span8 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span4 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				break;
			case 'onethird_twothird':
				echo '<div class="span4 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span8 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				break;
			case 'onefourth_onefourth_onefourth_onefourth':
				echo '<div class="span3 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span3 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				echo '<div class="span3 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot3' );
				echo '</div>';
				echo '<div class="span3 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot4' );
				echo '</div>';
				break;
			case 'threefourth_onefourth':
				echo '<div class="span9 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span3 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				break;
			case 'onefourth_threefourth':
				echo '<div class="span3 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span9 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				break;
			case 'onesixth_onesixth_onesixth_onesixth_onesixth_onesixth':
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot3' );
				echo '</div>';
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot4' );
				echo '</div>';
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot5' );
				echo '</div>';
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot6' );
				echo '</div>';
				break;
			case 'fivesixth_onesixth':
				echo '<div class="span10 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				break;
			case 'onesixth_fivesixth':
				echo '<div class="span2 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot1' );
				echo '</div>';
				echo '<div class="span10 widget-area" role="complementary">';
				dynamic_sidebar( 'widget_fot2' );
				echo '</div>';
				break;
		endswitch;
	echo '</div>';
	}
endif;

/*******************************************
# Sub footer on hook system ~ post
*******************************************/
if ( !function_exists( 'ktz_subfooter' ) ) :
function ktz_subfooter() {
	echo '<div class="span6"><div class="pull-left clearfix">';
	echo '<p class="footercredits">' . get_theme_option('ktz_footcredits') . '<br />';
	echo '</p>';
	echo '</div></div>';
	}
endif;

/*******************************************
# Footer social network on hook system ~ footer
*******************************************/
if ( !function_exists('ktz_sn') ) {
function ktz_sn() {
	if ((get_theme_option('ktz_tweet_sn') != '') || (get_theme_option('ktz_fb_sn') != '') || (get_theme_option('ktz_gplus_sn') != '') || (get_theme_option('ktz_in_sn') != '') || (get_theme_option('ktz_dribble_sn') != '') || (get_theme_option('ktz_flickr_sn') != '') || (get_theme_option('ktz_deviant_sn') != '') || (get_theme_option('ktz_blogger_sn') != '') || (get_theme_option('ktz_vimeo_sn') != '') || (get_theme_option('ktz_youtube_sn') != '') || (get_theme_option('ktz_rss_sn') != '')) :
	echo '<div class="span6"><div class="pull-right clearfix"><ul class="icon24px footer-sn">';
			if (get_theme_option('ktz_tweet_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_tweet_sn') . '" class="twitter" title="Twitter"></a></li>';
			if (get_theme_option('ktz_fb_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_fb_sn') . '" class="facebook" title="Facebook"></a></li>';
			if (get_theme_option('ktz_gplus_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_gplus_sn') . '" class="gplus" title="GPlus"></a></li>';
			if (get_theme_option('ktz_in_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_in_sn') . '" class="in" title="LinkedIn"></a></li>';
			if (get_theme_option('ktz_dribble_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_dribble_sn') . '" class="dribble" title="Dribble"></a></li>';
			if (get_theme_option('ktz_flickr_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_flickr_sn') . '" class="flickr" title="Flickr"></a></li>';
			if (get_theme_option('ktz_deviant_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_deviant_sn') . '" class="deviant" title="DeviantArt"></a></li>';
			if (get_theme_option('ktz_blogger_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_blogger_sn') . '" class="blogger" title="Blogger"></a></li>';
			if (get_theme_option('ktz_vimeo_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_vimeo_sn') . '" class="vimeo" title="Vimeo"></a></li>';
			if (get_theme_option('ktz_youtube_sn') != '')
				echo '<li><a href="' . get_theme_option('ktz_youtube_sn') . '" class="youtube" title="YouTube"></a></li>';
			if (get_theme_option('ktz_rss_sn') != '')
				echo '<li><a href="' . get_bloginfo('rss2_url') . '" class="rss" title="RSS"></a></li>';
	echo '</ul></div></div>';
	endif;
	} 
}