<?php
/**
 * 炎酷CMS - 访问统计（按天聚合）
 * 展示 今天/昨天/本周/上周/本月/上月/今年/去年/总计 的 IP 数与浏览量(PV)
 * 数据按天聚合入库，不再记录、展示逐条访问明细
 */
define('YKCMS', 1);
require dirname(__DIR__) . '/inc/auth.php';

$page_title = '访问统计';
$active = 'stats';

$statCards = stats_overview();

require dirname(__DIR__) . '/inc/header.php';
?>
<div class="yk-card">
  <h3>访问概况（IP 数 / 浏览量）</h3>
  <div class="yk-stats">
    <?php foreach ($statCards as $c): ?>
    <div class="yk-stat">
      <div style="color:#888;font-size:13px"><?php echo e($c['label']); ?></div>
      <div class="num"><?php echo number_format($c['ip']); ?><small style="font-size:13px;color:#999;font-weight:400"> IP</small></div>
      <div style="color:#999;font-size:12px;margin-top:4px">浏览量 <?php echo number_format($c['pv']); ?></div>
    </div>
    <?php endforeach; ?>
  </div>
</div>
<?php require dirname(__DIR__) . '/inc/footer.php'; ?>
