<?php
$interiart_footer_col = ot_get_option('interiart_footerType9_columns', 4);
$interiart_footer_width1 = ot_get_option('interiart_footerType9_width1', 3);
$interiart_footer_offset1 = ot_get_option('interiart_footerType9_offset1', 0);
$interiart_footer_width2 = ot_get_option('interiart_footerType9_width2', 3);
$interiart_footer_offset2 = ot_get_option('interiart_footerType9_offset2', 0);
$interiart_footer_width3 = ot_get_option('interiart_footerType9_width3', 3);
$interiart_footer_offset3 = ot_get_option('interiart_footerType9_offset3', 0);
$interiart_footer_width4 = ot_get_option('interiart_footerType9_width4', 3);
$interiart_footer_offset4 = ot_get_option('interiart_footerType9_offset4', 0);

$interiart_facebook = ot_get_option('interiart_TzFooterType9_facebook');
$interiart_twitter = ot_get_option('interiart_TzFooterType9_twitter');
$interiart_instagram = ot_get_option('interiart_TzFooterType9_instagram');
$interiart_tumblr = ot_get_option('interiart_TzFooterType9_tumblr');
$interiart_linkedin = ot_get_option('interiart_TzFooterType9_linkedin');
$interiart_youtube = ot_get_option('interiart_TzFooterType9_youtube');
$interiart_dribbble = ot_get_option('interiart_TzFooterType9_dribbble');
$interiart_behance = ot_get_option('interiart_TzFooterType9_behance');
$interiart_skype = ot_get_option('interiart_TzFooterType9_skype');
$interiart_pinterest = ot_get_option('interiart_TzFooterType9_pinterest');
$interiart_google_plus = ot_get_option('interiart_TzFooterType9_google_plus');

$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-9">
    <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-" . $j)):
                                dynamic_sidebar("interiart-footer-" . $j);
                            endif;
                            ?>
                        </div><!--end class footermenu-->
                    <?php
                    endfor;
                endif;
                ?>
            </div>
        </div>
        <div class="tzFooterBottom">
            <div class="tz-footer-logo col-md-4">
                <?php $interiart_footer_logo = ot_get_option('interiart_TzFooterType9_logo', '') ?>
                <?php if ($interiart_footer_logo != '') : ?>
                    <a class="pull-left tz_logo" href="<?php echo esc_url(get_home_url('/')); ?>"
                       title="<?php bloginfo('name'); ?>">
                        <?php
                        echo '<img class="logo_lager" src="' . $interiart_footer_logo . '" alt="' . get_bloginfo('title') . '" />';
                        ?>
                    </a>
                <?php endif; ?>
            </div>
            <div class="tzCopyright col-md-4">
                <?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>
            <div class="tzFooterSocial col-md-4">
                <ul>
                    <?php
                    if ($interiart_facebook != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_facebook); ?>"><i class="fa fa-facebook"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_twitter != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_twitter); ?>"><i class="fa fa-twitter"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_instagram != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_instagram); ?>"><i
                                        class="fa fa-instagram"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_tumblr != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_tumblr); ?>"><i class="fa fa-tumblr"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_linkedin != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_linkedin); ?>"><i class="fa fa-linkedin"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_youtube != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_youtube); ?>"><i class="fa fa-youtube-play"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_dribbble != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_dribbble); ?>"><i class="fa fa-dribbble"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_behance != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_behance); ?>"><i class="fa fa-behance"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_skype != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_skype); ?>"><i class="fa fa-skype"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_pinterest != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_pinterest); ?>"><i class="fa fa-pinterest-p"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                    <?php
                    if ($interiart_google_plus != '') {
                        ?>
                        <li>
                            <a href="<?php echo esc_url($interiart_google_plus); ?>"><i
                                        class="fa fa-google"></i></a>
                        </li>
                        <?php
                    }
                    ?>
                </ul>
            </div>
        </div>
    </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>