<?php
// VR票务专用精简页脚 — 不过度引入 ShopXO 默认导航
$shopxo_config = [];
$config_file = ROOT . 'app' . DS . 'config' . DS . 'shopxo.php';
if (is_file($config_file)) {
    $shopxo_config = include $config_file;
}
$shop_name = $shopxo_config['shop_name'] ?? 'VR票务';
$icp = $shopxo_config['icp'] ?? '';
$security_desc = $shopxo_config['security_desc'] ?? '';
?>
</div><!-- end .vr-ticket-page -->

<style>
    .vr-footer {
        padding: 30px 20px;
        text-align: center;
        background: #f8f9fa;
        border-top: 1px solid #e8e8e8;
        margin-top: 80px;
        /* 避开固定底部购买栏 */
    }

    .vr-footer-links {
        margin-bottom: 12px;
    }

    .vr-footer-links a {
        color: #666;
        font-size: 13px;
        text-decoration: none;
        margin: 0 12px;
    }

    .vr-footer-links a:hover {
        color: #409eff;
    }

    .vr-footer-copy {
        font-size: 12px;
        color: #999;
        margin-bottom: 6px;
    }

    .vr-footer-icp {
        font-size: 11px;
        color: #bbb;
    }
</style>

<div class="vr-footer">
    <div class="vr-footer-links">
        <a href="<?php echo Config('shopxo.host_url'); ?>">返回首页</a>
    </div>
    <div class="vr-footer-copy">
        &copy;
        <?php echo date('Y'); ?>
        <?php echo htmlspecialchars($shop_name, ENT_QUOTES, 'UTF-8'); ?> All Rights Reserved.
    </div>
    <?php if (!empty($icp)): ?>
    <div class="vr-footer-icp">
        <a href="https://beian.miit.gov.cn/" target="_blank" style="color:#bbb;text-decoration:none">
            <?php echo htmlspecialchars($icp, ENT_QUOTES, 'UTF-8'); ?>
        </a>
    </div>
    <?php endif; ?>
</div>

<?php echo Config('shopxo.is_close_website_footer_js') != 1 ? '<script src="' . Config('shopxo.host_url') . 'static/common/js/footer.js?v=' . ($shopxo_config['version'] ?? '1.0.0') . '"></script>' : ''; ?>
<script type='text/javascript'
    src="<?php echo Config('shopxo.host_url'); ?>static/common/lib/jquery/jquery-2.2.4.min.js"></script>
<!-- ⚠️ CryptoJS 定义文件，必须先于 common.js 引入 -->
<script type='text/javascript'
    src="<?php echo Config('shopxo.host_url'); ?>static/common/lib/base64/base64csvtojson.js"></script>
<!-- ⚠️ 引入 common.js -->
<script type='text/javascript'
    src="<?php echo Config('shopxo.host_url'); ?>static/common/js/common.js"></script>