<footer class="bg-success">
    <div class="copyright py-5">
        <p class="text-center">
            <?php echo $cfg_powerby; ?> <?php echo $cfg_beian;?> Powered by <a href="https://www.dedebiz.com" title="DedeBIZ内容管理系统-国内流行的内容管理系统多端全媒体解决方案" target="_blank">DedeBIZ<?php echo $cfg_version; ?></a>
        </p>
    </div>
</footer>
<div class="scroll-top">
    <button onclick="gotop()" id="btnScrollTop" title="返回顶部">
        <i class="fa fa-chevron-up"></i> 
    </button>
</div>
<script src="<?php echo $cfg_cmsurl; ?>/static/web/js/popper.min.js"></script>
<script src="<?php echo $cfg_cmsurl; ?>/static/web/js/bootstrap.bundle.min.js"></script>
<script src="<?php echo $cfg_cmsurl; ?>/static/web/js/style.js"></script>
<script async src="<?php echo $cfg_cmsurl; ?>/apps/statistics.php?url_type=0"></script>
<script>
    //校验是否登录
    function CheckLogin() {
        $.get("<?php echo $cfg_cmsurl; ?>/user/ajax_loginsta.php?format=json",function(data) {
            let result = JSON.parse(data);
            if (result.code === 200) {
                $("#_login").html(`
                    欢迎，${result.data.username}
                    <a class="ml-2" href="<?php echo $cfg_cmsurl; ?>/user/">[会员中心]</a>
                    <a class="ml-2" href="<?php echo $cfg_cmsurl; ?>/user/index_do.php?fmdo=login&dopost=exit">[退出]</a>
                `);
                $("#iptUsername").val(result.data.username);
                $("#iptUsername").attr("disabled", "disabled");
                $(".areaValidate").hide();
            } else {
                $(".areaValidate").show();
            }
        });
    }
    //页面加载触发
    $(document).ready(function () {
        CheckLogin();
    });
</script>