<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>

<a href="#" id="gotop" uk-totop uk-scroll></a>
<?php
$currentUrl = $_SERVER['REQUEST_URI'];

 ?>
<?php if (strpos($currentUrl, 'search') == true) { ?>

<!--<footer class="uk-section-small uk-text-center uk-text-muted">-->
<!--	<div class="uk-container">-->
<!---->
<!---->
<!--		<div class="uk-margin-medium uk-text-small uk-link-primary">&copy; --><?php //echo date("Y");?><!-- <a href="--><?php //$this->options->siteUrl();?><!--">--><?php //$this->options->title();?><!--</a> All right Reserved.  <br> <br>-->
<!--     --><?php //if (General::Options('PoliceBa')): ?><!--<img  src="--><?php //$this->options->themeUrl('assets/images/beian.png');?><!--"> <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=--><?php //echo General::parseNumber(General::Options('PoliceBa')); ?><!--">--><?php //echo General::Options('PoliceBa'); ?><!--</a>--><?php //endif; ?><!----><?php //if (General::Options('IcpBa') && General::Options('PoliceBa')): ?><!--  | --><?php //endif; ?><!----><?php //if (General::Options('IcpBa')): ?><!--<a href="https://beian.miit.gov.cn/">--><?php //echo General::Options('IcpBa'); ?><!--</a>--><?php //endif; ?>
<!--		</div>-->
<!--		--><?php //echo General::Options('CustomizationFooterCode'); ?>
<!--	</div>-->
<!--</footer>-->

<!--    <footer class="uk-background-secondary uk-background-norepeat uk-background-cover uk-background-center-center uk-light uk-margin-large-top" >-->
<!--        <div class="uk-section uk-section-small uk-section-hero uk-position-relative" data-uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: false">-->
<!--            <div class="uk-container">-->
<!--                <div class="hero-search">-->
<!--                    <div class="uk-position-relative" style="display: flex; justify-content: center; align-items: center; height: 40px;"> -->
<!--                <div class='lxdh'>-->
<!--                            <a href="https://wa.me/8617000161888?text=Hello!">No result ? Contact us on WhatsApp.</a>-->
<!--                   </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!---->
<!--    </footer>-->
<?php
}
?>


<script src="<?php $this->options->themeUrl('assets/plugins/fancybox/fancybox.umd.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('assets/plugins/autocomplete/autoComplete.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('assets/plugins/menutree/menutree.min.js?v='); ?><?php echo themeVersion();?>"></script>
<script src="<?php $this->options->themeUrl('assets/js/beardocs.js?v='); ?><?php echo themeVersion();?>"></script>
<script src="<?php $this->options->themeUrl('assets/plugins/lazyload/transition.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('assets/plugins/lazyload/visibility.min.js'); ?>"></script>
<?php echo General::Options('CustomizationFooterJsCode'); ?>
<?php $this->footer(); ?>
<script src="<?php $this->options->themeUrl('assets/plugins/instant.page/instantpage.min.js'); ?>"></script>

<!-- 添加反馈功能的JavaScript代码 -->
<script>
  function recordFeedback(questionId, questionTitle, isHelpful) {
      // 显示加载状态
      var resultDiv = document.getElementById('feedback-result-' + questionId);
      resultDiv.style.display = 'block';
      resultDiv.innerHTML = 'Submitting your feedback...';
      
      // 准备发送的数据
      var data = new FormData();
      data.append('action', 'recordFeedback');
      data.append('questionId', questionId);
      data.append('questionTitle', questionTitle);
      data.append('isHelpful', isHelpful);
      
      // 发送AJAX请求
      fetch('/index.php/category/M288/?feedback=1', {
          method: 'POST',
          body: data
      })
      .then(response => response.json())
      .then(data => {
          resultDiv.innerHTML = data.message;
          
          // 如果提交成功，禁用按钮
          if (data.status === 'success') {

            
              // 禁用按钮，避免重复提交
              var buttons = document.querySelectorAll(".feedback-btn-"+questionId);
              buttons.forEach(function(btn) {
                  btn.disabled = true;
                  btn.style.opacity = '0.5';
                  btn.style.cursor = 'default';
              });
          }
      })
      .catch(error => {
          resultDiv.innerHTML = 'Submission failed, please try again later.';
          console.error('Error:', error);
      });
  }
</script>

</body>
</html>
