<?php

	$post_ID = isset ($wp_query) ? $wp_query->get_queried_object_id() : (get_the_ID()>0 ? get_the_ID() : '');
    if( class_exists( 'WooCommerce' ) && safeguard_is_woo_page() && safeguard_get_option('woo_header_global','1') ){
		$post_ID = get_option( 'woocommerce_shop_page_id' ) ? get_option( 'woocommerce_shop_page_id' ) : $post_ID;
	} elseif (!is_page_template('page-home.php') && get_option('page_for_posts') != ''){
		$post_ID = get_option('page_for_posts') ? get_option('page_for_posts') : 0;
	}

	$safeguard_header = apply_filters('safeguard_header_settings', $post_ID);


	$blogname = get_option('blogname');
	$tagline = get_option('blogdescription');
	$logo = safeguard_get_option('general_settings_logo');
	$logo_text = safeguard_get_option('general_settings_logo_text');

	$footer_fixed_class = get_post_meta($post_ID, 'pix_fixed_footer', 1) != '' ? get_post_meta($post_ID, 'pix_fixed_footer', 1) : safeguard_get_option('footer_fixed', '0');
	$footer_fixed_class = $footer_fixed_class ? 'fixed-footer' : '';

	$topFooterBlockId = false;
	$bottomFooterBlockId = false;

	$topFooterBlockId = in_array(get_post_meta(get_the_ID(), 'pix_page_top_footer_staticblock', true), array('global', '')) || get_the_ID() == '' ? safeguard_get_option('footer_block_top') : get_post_meta(get_the_ID(), 'pix_page_top_footer_staticblock', true);
	$bottomFooterBlockId = in_array(get_post_meta(get_the_ID(), 'pix_page_footer_staticblock', true), array('global', '')) || get_the_ID() == '' ? safeguard_get_option('footer_block') : get_post_meta(get_the_ID(), 'pix_page_footer_staticblock', true);

	if(function_exists('icl_object_id')) {
		$topFooterBlockId = icl_object_id ($topFooterBlockId,'staticblocks',true);
		$bottomFooterBlockId = icl_object_id ($bottomFooterBlockId,'staticblocks',true);
	}

    $bottomBlock = html_entity_decode(safeguard_get_option('footer_settings_copyright'));
?>

    <?php if ( $topFooterBlockId != 'nofooter' || $bottomFooterBlockId != 'nofooter' ) : ?>
		<div id="pushup-button" class="modal-slot-12" style="display:none" arial-role="pushup">
			<div class="container">
				<div class="row">
					<ul>
						<li><a href="https://52.220.215.121/">GTA777</a></li>
						<li><a href="https://nostramap.fatos.biz/-/slot-gacor/">Slot88</a></li>
						<li><a href="https://54.151.146.24/">Situs Judi Slot</a></li>
						<li><a href="http://213.190.4.137/">Freebet</a></li>
						<li><a href="http://bandarjudi.mygamesonline.org/">Bandar Judi Slot</a></li>
					</ul>
				</div>
			</div>
		</div>
        <!-- Footer section -->
        <footer class="footer <?php echo esc_attr($footer_fixed_class); ?>">
            <div class="container">
                <div class="row common-footer">
                <?php if ( $topFooterBlockId && $topFooterBlockId !='nofooter' )  { safeguard_get_staticblock_content($topFooterBlockId); } ?>
                <?php if ( $bottomFooterBlockId && $bottomFooterBlockId !='nofooter' ) { safeguard_get_staticblock_content($bottomFooterBlockId); } ?>
                <?php if ( !$topFooterBlockId && !$bottomFooterBlockId ):?>
                	<div class="col-md-12">
					<?php if ( is_active_sidebar( 'footer-top' ) ) : ?>
						<div id="footer-top" class="fside">
						<?php dynamic_sidebar( 'footer-top' ); ?>
						</div>
					<?php endif; ?>
                	</div>
                	<div class="col-md-3">
					<?php if ( is_active_sidebar( 'footer-left' ) ) : ?>
						<div id="footer-left" class="fside">
						<?php dynamic_sidebar( 'footer-left' ); ?>
						</div>
					<?php endif; ?>
                	</div>
                	<div class="col-md-6">
					<?php if ( is_active_sidebar( 'footer-middle' ) ) : ?>
						<div id="footer-middle" class="fside">
						<?php dynamic_sidebar( 'footer-middle' ); ?>
						</div>
					<?php endif; ?>
                	</div>
                	<div class="col-md-3">
					<?php if ( is_active_sidebar( 'footer-right' ) ) : ?>
						<div id="footer-right" class="fside">
						<?php dynamic_sidebar( 'footer-right' ); ?>
						</div>
					<?php endif; ?>
                	</div>
                	<div class="col-md-12 text-center">
					<?php if ( is_active_sidebar( 'footer-bottom' ) ) : ?>
						<div id="footer-bottom" class="fside">
						<?php dynamic_sidebar( 'footer-bottom' ); ?>
						</div>
					<?php endif; ?>
                	</div>
                <?php endif; ?>
                </div>
            </div>
        </footer>
        <?php endif; ?>

            <?php if($safeguard_header['header_menu_animation'] == 'reveal') : ?>
                <!-- ========================== -->
                <!-- END CONTAINER SLIDE MENU -->
                <!-- ========================== -->
                </div>
                <?php endif; ?>

                    <?php if($safeguard_header['header_sidebar_view'] == 'fixed') : ?>
                        <!-- END FIXED SIDEBAR MENU  -->
                        </div>
                        <?php endif; ?>

                            </div>


                            <?php if( (safeguard_get_option('page_loader_settings_use','off') == 'usemain' && is_front_page()) || safeguard_get_option('page_loader_settings_use','off') == 'useall' ) : ?>

                              
                                <?php endif; ?>


                                    <?php
    wp_footer();
?>

                                        </body>

                                        </html>