<footer class="bg-success">
    <div class="copyright py-5">
        <p class="text-center">
            Powered by <a href="https://www.dedebiz.com" title="DedeBIZ内容管理系统-国内流行的内容管理系统多端全媒体解决方案" target="_blank">DedeCMS<?php echo $cfg_version;?></a> &copy; 2022 <a href="https://www.dedebiz.com" target="_blank" title="DedeBIZ商业技术支持，提供更专业强大的站点应用开发技术">DedeBIZ技术支持</a><br>
            <?php echo $cfg_powerby;?>&nbsp;&nbsp;<?php echo $cfg_beian;?>
        </p>
    </div>
</footer>
<!-- /footer -->
<div class="scroll-top">
    <button onclick="gotop()" id="btnScrollTop" title="返回顶部">
        <i class="fa fa-chevron-up" aria-hidden="true"></i>
    </button>
</div>
<!-- /.scroll-top -->
<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>
    //校验是否登录
    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>