<?php global $di_data; ?>

<!-- Footer Area -->
<?php if ( $di_data['show_info_bar'] || $di_data['show_footer_text'] || $di_data['show_addr'] || is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) : ?>
<div class="container-fluid sfooter<?php if($di_data['hide_footer']){ echo ' hide-footer-m';} ?>">
    <div class="container<?php if( $di_data['return_top_style_two'] ) { echo ' return-top-two-con'; } ?>">

        <?php 
            if( $di_data['return_top_style_two'] ) { ?>
                <div class="return-top return-top-two">
                    <?php _e('Back to top', 'dina-kala'); ?>
                    <i class="fal fa-chevron-up" aria-hidden="true"></i>
                </div>
        <?php 
            }
        ?>

            <?php
            if ($di_data['show_info_bar']) { ?>
                <div class="row info-bar">

                    <?php if ($di_data['info_bar_prods']) { ?>
                    <?php if (!$di_data['edit_bar_prods']) { ?>
                    <div class="prod-count col">
                        <?php $count_prods = wp_count_posts('product'); $published_prods = $count_prods->publish; ?>
                        <i class="fal fa-shopping-bag" aria-hidden="true"></i>
                        <span class="count-num">
                            <?php echo $published_prods; ?>+</span>
                        <span class="count-text"><?php _e('Products','dina-kala') ?></span>
                    </div>
                    <?php } else { ?>
                    <div class="prod-count col">
                        <i class="<?php echo $di_data['bar_prods_icon']; ?>" aria-hidden="true"></i>
                        <span class="count-num">
                            <?php echo $di_data['bar_prods_value']; ?></span>
                        <span class="count-text"><?php echo $di_data['bar_prods_title']; ?></span>
                    </div>
                    <?php } } ?>

                    <?php if ($di_data['info_bar_sales']) { ?>
                    <?php if (!$di_data['edit_bar_sales']) { ?>
                    <div class="prod-count col">
                        <i class="fal fa-box-check" aria-hidden="true"></i>
                        <span class="count-num">
                        <?php echo di_woo_get_total_sales(); ?>+</span>
                        <span class="count-text"><?php _e('Order completed','dina-kala') ?></span>
                    </div>
                    <?php } else { ?>
                    <div class="prod-count col">
                        <i class="<?php echo $di_data['bar_sales_icon']; ?>" aria-hidden="true"></i>
                        <span class="count-num">
                            <?php echo $di_data['bar_sales_value']; ?></span>
                        <span class="count-text"><?php echo $di_data['bar_sales_title']; ?></span>
                    </div>
                    <?php } } ?>

                    <?php if ($di_data['info_bar_users']) { ?>
                    <?php if (!$di_data['edit_bar_users']) { ?>
                    <div class="prod-count col">
                        <?php $usercount = count_users(); $result = $usercount['total_users']; ?>
                        <i class="fal fa-users" aria-hidden="true"></i>
                        <span class="count-num">
                            <?php echo $result; ?>+</span>
                        <span class="count-text"><?php _e('Members','dina-kala') ?></span>
                    </div>
                    <?php } else { ?>
                    <div class="prod-count col">
                        <i class="<?php echo $di_data['bar_users_icon']; ?>" aria-hidden="true"></i>
                        <span class="count-num">
                            <?php echo $di_data['bar_users_value']; ?></span>
                        <span class="count-text"><?php echo $di_data['bar_users_title']; ?></span>
                    </div>
                    <?php } } ?>

                    <?php if ($di_data['info_bar_posts']) { ?>
                    <?php if (!$di_data['edit_bar_posts']) { ?>
                    <div class="prod-count col">
                        <?php $count_posts = wp_count_posts('post'); $published_posts = $count_posts->publish; ?>
                        <i class="fal fa-file-alt" aria-hidden="true"></i>
                        <span class="count-num">
                            <?php echo $published_posts; ?>+</span>
                        <span class="count-text"><?php _e('Blog content','dina-kala') ?></span>
                    </div>
                    <?php } else { ?>
                    <div class="prod-count col">
                        <i class="<?php echo $di_data['bar_posts_icon']; ?>" aria-hidden="true"></i>
                        <span class="count-num">
                            <?php echo $di_data['bar_posts_value']; ?></span>
                        <span class="count-text"><?php echo $di_data['bar_posts_title']; ?></span>
                    </div>
                    <?php } } ?>

                </div>
        <?php } ?>

        <?php if (is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) { ?>
        <div class="row fwidgets">
            <?php
            $footer_widgets = (int)$di_data['footer_widgets'];
            $col = ($footer_widgets > 3 ? 3 : 4);
            for ($x = 1; $x <= $footer_widgets; $x++) { ?>
            <div class="col-lg-<?php echo $col; ?> col-md-6 col-12 fwidget">
            <?php if ( is_active_sidebar( 'footer-'.$x ) ) :
                dynamic_sidebar('footer-'.$x);
            endif; ?>
            </div>
            <?php } ?>
        </div>
        <?php } ?>

        <?php if($di_data['show_addr']) { ?>
        <div class="row footer-addr">
            <div class="col-md-9 col-12 addr-con">
                <?php if(($di_data['addr_text']!='') && ($di_data['show_faddr'])) { ?>
                <div class="addr-text col-md-7 col-12"><i class="fal fa-map-marker-alt" aria-hidden="true"></i>
                    <?php echo $di_data['addr_text']; ?>
                </div>
                <?php } ?>
                <div class="ftel col-md-5 col-12">
                    <?php if(($di_data['site_tel']!='') && ($di_data['show_ftel'])) { ?>
                        <a href="tel:<?php echo dina_remove_dash($di_data['site_tel']); ?>" target="_blank">
                            <span>
                                <i class="fal fa-phone" aria-hidden="true"></i>
                                <span class="top-val" id="site-tel"><?php  echo $di_data['site_tel']; ?></span>
                            </span>
                        </a>
                    <?php } ?>
                    <?php if($di_data['replace_email']) { ?>
                        <?php if(($di_data['site_tel2']!='') && ($di_data['show_ftel'])) { ?>
                            <a href="tel:<?php echo dina_remove_dash($di_data['site_tel2']); ?>" target="_blank">
                                <span class="foot-tel">
                                    <i class="fal fa-phone-rotary" aria-hidden="true"></i>
                                    <span class="top-val" id="site-tel2"><?php  echo $di_data['site_tel2']; ?></span>
                                </span>
                            </a>
                        <?php } ?>
                    <?php } else { ?>
                        <?php if(($di_data['site_email']!='') && ($di_data['show_fmail'])) { ?>
                            <a href="mailto:<?php echo $di_data['site_email']; ?>" target="_blank">
                                <span class="foot-tel">
                                    <i class="fal fa-envelope" aria-hidden="true"></i>
                                    <span class="top-val" id="site-email"><?php echo $di_data['site_email']; ?></span>
                                </span>
                            </a>
                        <?php } ?>
                    <?php } ?>
                    
                </div>
            </div>
            <?php if($di_data['show_apps']) { ?>
            <div class="col-md-3 col-12 apps-icon">
                <?php if($di_data['and_link'] != '') { ?>
                <a href="<?php echo $di_data['and_link']; ?>" rel="nofollow" class="btn btn-outline-success and-btn"><i class="fab fa-android" aria-hidden="true"></i><?php _e(' Android' , 'dina-kala'); ?></a>
                <?php } ?>
                <?php if($di_data['ios_link'] != '') { ?>
                <a href="<?php echo $di_data['ios_link']; ?>" rel="nofollow" class="btn btn-outline-secondary ios-btn"><i class="fab fa-apple" aria-hidden="true"></i> <?php _e(' IOS' , 'dina-kala'); ?></a>
                <?php } ?>
            </div>
            <?php } ?>
        </div>
        <?php } ?>

        <?php if($di_data['show_footer_text']) { ?>
            <?php if($di_data['footer_text_main'] && !is_front_page()) {
                //
                } else { 
            ?>
            <div class="row footer-section-text">
                <?php if($di_data['ftext_title'] != '') { ?>
                <div class="col-12 footer-text-title">
                    <h3>
                        <?php echo $di_data['ftext_title']; ?>
                    </h3>
                </div>
                <?php } ?>
                <?php if($di_data['ftext_text'] != '') { ?>
                    <?php if($di_data['less_footer_text']) { ?>
                        <div class="col-12 footer-text footer-less dina-more-less" data-more="<?php _e('Show More','dina-kala') ?>" data-less="<?php _e('Show Less','dina-kala') ?>">
                    <?php } else { ?>
                        <div class="col-12 footer-text">
                    <?php } ?>
                        <?php echo $di_data['ftext_text']; ?>
                    </div>
                <?php } ?>
            </div>
            <?php } ?>
        <?php } ?>

    </div>
</div>
<?php endif; ?>
<!-- Footer Area -->

<!-- Copyright area -->
<div class="container-fluid copyright<?php if($di_data['hide_copy']){ echo ' hide-copy-m';} ?>">
    <div class="container">
        <div class="row">
        <div class="col-md-6 col-12 copy-text">
            <?php echo $di_data['copy_text']; ?>
        </div>
        <?php if($di_data['show_footer_social']) { ?>
        <div class="col-md-6 col-12 social-footer">
            <ul>
                <?php if($di_data['so_twitter']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_twitter_link']; ?>" title="<?php _e( 'Twitter', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-twitter"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_facebook']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_facebook_link']; ?>" title="<?php _e( 'Facebook', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-facebook-f"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_google']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_google_link']; ?>" title="<?php _e( 'Google+', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-google-plus-g"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_whatsapp']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_whatsapp_link']; ?>" title="<?php _e( 'Whatsapp', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-whatsapp"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_tiktok']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_tiktok_link']; ?>" title="<?php _e( 'Tiktok', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-tiktok"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_telegram']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_telegram_link']; ?>" title="<?php _e( 'Telegram', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-telegram-plane"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_instagram']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_instagram_link']; ?>" title="<?php _e( 'Instagram', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-instagram"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_youtube']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_youtube_link']; ?>" title="<?php _e( 'Youtube', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-youtube"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_linkedin']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_linkedin_link']; ?>" title="<?php _e( 'Linkedin', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-linkedin-in"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_dribble']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_dribble_link']; ?>" title="<?php _e( 'Dribble', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-dribbble"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_behance']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_behance_link']; ?>" title="<?php _e( 'Behance', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-behance"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_pinterest']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_pinterest_link']; ?>" title="<?php _e( 'Pinterest', 'dina-kala' ); ?>" target="_blank">
                        <i class="fab fa-pinterest-p"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_aparat']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_aparat_link']; ?>" title="<?php _e('Aparat','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-aparat"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_cloob']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_cloob_link']; ?>" title="<?php _e('Cloob','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-cloob"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_soroush']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_soroush_link']; ?>" title="<?php _e('Soroush','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-Soroush"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_gap']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_gap_link']; ?>" title="<?php _e('Gap','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-Gap"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_eitaa']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_eitaa_link']; ?>" title="<?php _e('Eitaa','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-Eitaa"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_bisphone']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_bisphone_link']; ?>" title="<?php _e('Bisphone','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-Bisphone"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_bale']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_bale_link']; ?>" title="<?php _e('Bale','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-Bale"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_igap']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_igap_link']; ?>" title="<?php _e('iGap','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-iGap"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_rubika']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_rubika_link']; ?>" title="<?php _e('Rubika','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-rubika"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_hoorsa']) { ?>
                <li>
                    <a href="<?php echo $di_data['so_hoorsa_link']; ?>" title="<?php _e('Hoorsa','dina-kala'); ?>" target="_blank">
                        <i class="dico ico-hoorsa"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_phone']) { ?>
                <li>
                    <a href="tel:<?php echo dina_remove_dash($di_data['so_phone_link']); ?>" title="<?php _e('Phone','dina-kala'); ?>" target="_blank">
                        <i class="fal fa-phone" aria-hidden="true"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_mobile']) { ?>
                <li>
                    <a href="tel:<?php echo dina_remove_dash($di_data['so_mobile_link']); ?>" title="<?php _e('Mobile','dina-kala'); ?>" target="_blank">
                        <i class="fal fa-mobile-alt" aria-hidden="true"></i>
                    </a>
                </li>
                <?php } ?>
                <?php if($di_data['so_email']) { ?>
                <li>
                    <a href="mailto:<?php echo $di_data['so_email_link']; ?>" title="<?php _e('Email','dina-kala'); ?>" target="_blank">
                        <i class="fal fa-at" aria-hidden="true"></i>
                    </a>
                </li>
                <?php } ?>
            </ul>
        </div>
        <?php } ?>
        </div>
    </div>
</div>
<!-- Copyright area -->