<?php
/**
 * 芋头CMS
 * ============================================================================
 * 版权所有 2016-2028 沅陵县乌托邦网络服务有限公司，并保留所有权利。
 * 网站地址: http://www.yutoucms.cn
 * ----------------------------------------------------------------------------
 * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷。
 * ============================================================================
 * Author: 芋头 <mxgsf@qq.com>
 * Date: 2026-6-2
 */
if (!defined('ROOT_PATH')) exit;
$footerChannels = $db->fetchAll("SELECT * FROM {$db->table('channel')} WHERE parent_id=0 AND is_show=1 ORDER BY list_order ASC,id ASC LIMIT 5");
$footerCompanyIntro = isset($site['company_intro']) ? trim(strip_tags($site['company_intro'])) : '';
?>
<div class="link">
  <div class="cont linknr"><span>友情链接：</span><?php foreach ($links as $lk) { ?><a href="<?php echo htmlspecialchars($lk['link_url']); ?>" target="_blank"><?php echo htmlspecialchars($lk['link_name']); ?></a><?php } ?></div>
</div>
<div class="footer">
  <div class="cont">
    <div class="foottop clearfix">
      <div class="footerlogo left"><p><?php echo htmlspecialchars($site['site_name']); ?></p></div>
      <div class="botnav right">
        <?php foreach ($footerChannels as $fc) { ?><li><a href="<?php echo getUrl('channel', intval($fc['id']), isset($fc['channel_dir']) ? $fc['channel_dir'] : ''); ?>"><?php echo htmlspecialchars($fc['channel_name']); ?></a></li><?php } ?>
        <li><a href="<?php echo getUrl('guestbook'); ?>">在线留言</a></li>
      </div>
      <?php if ($footerCompanyIntro !== '') { ?>
      <div class="footer-company-intro"><?php echo htmlspecialchars(msubstr($footerCompanyIntro, 0, 120)); ?></div>
      <?php } ?>
    </div>
    <div class="lxwm clearfix" id="contact">
      <ul>
        <li><img src="<?php echo $site['template_dir']; ?>images/foot01.png" alt="电话" /><p>公司电话</p><p><span><a href="tel:<?php echo htmlspecialchars(isset($site['site_phone']) ? $site['site_phone'] : '400-888-8888'); ?>"><?php echo htmlspecialchars(isset($site['site_phone']) && $site['site_phone']!=='' ? $site['site_phone'] : '400-888-8888'); ?></a></span></p></li>
        <li><img src="<?php echo $site['template_dir']; ?>images/foot02.png" alt="邮箱" /><p>E-mail</p><p><a href="mailto:<?php echo htmlspecialchars(isset($site['site_email']) ? $site['site_email'] : 'admin@admin.com'); ?>"><?php echo htmlspecialchars(isset($site['site_email']) && $site['site_email']!=='' ? $site['site_email'] : 'admin@admin.com'); ?></a></p></li>
        <li><img src="<?php echo $site['template_dir']; ?>images/foot03.png" alt="地址" /><p>地址</p><p><?php echo htmlspecialchars(isset($site['site_address']) && $site['site_address']!=='' ? $site['site_address'] : '江苏省南京市玄武区玄武湖88号'); ?></p></li>
      </ul>
      <?php if (!empty($site['contact_person']) || !empty($site['contact_wechat']) || !empty($site['contact_qq'])) { ?>
      <div class="footer-extra-contact">
        <?php if (!empty($site['contact_person'])) { ?><span>联系人：<?php echo htmlspecialchars($site['contact_person']); ?></span><?php } ?>
        <?php if (!empty($site['contact_wechat'])) { ?><span>微信：<?php echo htmlspecialchars($site['contact_wechat']); ?></span><?php } ?>
        <?php if (!empty($site['contact_qq'])) { ?><span>QQ：<?php echo htmlspecialchars($site['contact_qq']); ?></span><?php } ?>
      </div>
      <?php } ?>
    </div>
  </div>
</div>
<div class="bot">
  <div class="cont clearfix">
    <div class="col-md-6 col-sm-6 col-xs-12">Copyright &copy; <?php echo date('Y'); ?> <?php echo htmlspecialchars($site['site_name']); ?> <?php if (!empty($site['site_icp'])) { ?><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank"><?php echo htmlspecialchars($site['site_icp']); ?></a><?php } ?></div>
    <div class="botbeian col-md-6 col-sm-6 col-xs-12"><a href="<?php echo getUrl('home'); ?>" target="_blank">XML</a></div>
  </div>
</div>
<ul id="top_menu" class="top_menu hidden-m hidden-b show-l">
<li><a href="<?php echo getUrl('home'); ?>"><img src="<?php echo $site['template_dir']; ?>images/home.png" id="sy"><label id="sy1">网站首页</label></a></li>
<li><a href="tel:<?php echo htmlspecialchars(isset($site['site_phone']) && $site['site_phone']!=='' ? $site['site_phone'] : '400-888-8888'); ?>"><img src="<?php echo $site['template_dir']; ?>images/tel.png" id="dh"><label id="dh1">立即通话</label></a></li>
<li><a href="#contact"><img src="<?php echo $site['template_dir']; ?>images/nav.png" id="bm"><label id="bm1">联系我们</label></a></li>
</ul>
