<?php
$interiart_footer_col     =   ot_get_option('interiart_footerType5_columns',4);
$interiart_footer_width1  =   ot_get_option('interiart_footerType5_width1',3);
$interiart_footer_offset1 =   ot_get_option('interiart_footerType5_offset1',0);
$interiart_footer_width2  =   ot_get_option('interiart_footerType5_width2',3);
$interiart_footer_offset2 =   ot_get_option('interiart_footerType5_offset2',0);
$interiart_footer_width3  =   ot_get_option('interiart_footerType5_width3',3);
$interiart_footer_offset3 =   ot_get_option('interiart_footerType5_offset3',0);
$interiart_footer_width4  =   ot_get_option('interiart_footerType5_width4',3);
$interiart_footer_offset4 =   ot_get_option('interiart_footerType5_offset4',0);

$general_btn_backtotop = ot_get_option('general_btn_backtotop', 'yes');
$position_backtotop = ot_get_option('PositionBackTop', '0');
$position_backtotop_class = 'tz_btt_position_right';
if($position_backtotop == '1'):
    $position_backtotop_class = 'tz_btt_position_left';
endif;

?>
<footer class="tzFooter tzFooter-Type-5">
    <div class="container">
        <div class="tzFooterTop">
            <div class="row">
                <?php
                if(isset($interiart_footer_col) && $interiart_footer_col!=""):
                    for($i=0;$i<$interiart_footer_col;$i++):
                        $j = $i +1;
                        if($i==0){
                            $interiart_col = $interiart_footer_width1;
                            $interiart_offset = $interiart_footer_offset1;
                        }elseif($i==1){
                            $interiart_col = $interiart_footer_width2;
                            $interiart_offset = $interiart_footer_offset2;
                        }elseif($i==2){
                            $interiart_col = $interiart_footer_width3;
                            $interiart_offset = $interiart_footer_offset3;
                        }elseif($i==3){
                            $interiart_col = $interiart_footer_width4;
                            $interiart_offset = $interiart_footer_offset4;
                        }
                        ?>
                        <div class="col-md-<?php echo esc_attr($interiart_col); ?> col-md-offset-<?php echo esc_attr($interiart_offset); ?> footerattr">
                            <?php
                            if(is_active_sidebar("interiart-footer-type5-".$j) ):
                                dynamic_sidebar("interiart-footer-type5-".$j);
                            endif;
                            ?>
                        </div><!--end class footermenu-->
                        <?php
                    endfor;
                endif;
                ?>
            </div>
        </div>

        <div class="tzFooterBottom">
            <div class="tzCopyright pull-left">
                <?php
                $interiart_footer_text = ent2ncr(ot_get_option('interiart_copyright'));
                if($interiart_footer_text == ''){
                    echo '<p>Copyright &copy Templaza</p>';
                }else{
                    echo balanceTags($interiart_footer_text );
                }
                ?>
            </div>

            <?php
            if ( has_nav_menu('footer-menu') ){
                ?>
                <div class="tz-footer-menu pull-right">
                    <nav>
                        <?php
                        wp_nav_menu(array(
                            'theme_location'    => 'footer-menu',
                            'menu_class'        => 'menu-footer',
                            'container'         =>  false,
                        ));
                        ?>
                    </nav>
                </div>
                <?php
            }
            ?>

        </div><!--end class footerbottom -->
    </div>
    <?php
    if ($general_btn_backtotop == 'yes') {
        ?>
        <div class="tz_backtotop <?php echo esc_attr($position_backtotop_class); ?>">
            <a href="javascript:" id="return_to_top" class="#" >
                <i class="flaticon-up-arrow"></i>
            </a>
        </div>
        <?php
    }
    ?>
</footer>