<?php
/**
 * @package WordPress
 * @subpackage Campoal
 */

global $post;
global $campoal_options;
$back_to_top = isset($campoal_options['conikal_back_to_top_field']) ? $campoal_options['conikal_back_to_top_field'] : 1;
$cookie_notice = isset($campoal_options['conikal_cookie_notice_field']) ? $campoal_options['conikal_cookie_notice_field'] : 0;
$cookie_notice_position = isset($campoal_options['conikal_cookie_notice_position_field']) ? $campoal_options['conikal_cookie_notice_position_field'] : 'footer';

// hidden modal login and footer section for login page
if (!is_page_template('login.php') && !is_page_template('dashboard-user.php')) {
	if(!is_user_logged_in()) {
		get_template_part('templates/login-register');
		get_template_part('templates/forgot-password');
        if (isset($_GET['verify'])) {
            get_template_part('templates/toast-notification');
        }
	} else if(!is_page_template('sign-successful.php')) {
		get_template_part('templates/toast-notification');
	}
    get_template_part('templates/app-footer');
}

// display back to top button
if ($back_to_top == 1) { ?>
    <a href="javascript:void(0)" id="back-to-top"><i class="chevron up icon"></i></a>
<?php } ?>
    </div>
    <?php if ($cookie_notice == 1 && $cookie_notice_position == 'footer') {
    	get_template_part('templates/cookie-notice');
    } ?>

    <?php wp_nonce_field('general_ajax_nonce', 'securityGeneral', true); ?>
    <!-- end pusher -->
    <div id="fb-root"></div>
    <?php wp_footer(); ?>
</body>
</html>