<?php $page_class = 'page-download'; include __DIR__ . '/_header.php'; ?>
<section class="banner-simple"><div class="container"><h1><?php echo htmlspecialchars(tplv($tplCurrent, 'title', '下载中心')); ?></h1></div></section>
<?php if ($tplCurrent) { ?><section class="section-block"><div class="container split-layout"><div class="prose-block"><p>文件名：<?php echo htmlspecialchars(tplv($tplCurrent, 'file_name')); ?></p><p>文件大小：<?php echo htmlspecialchars(formatSize((int) tplv($tplCurrent, 'file_size', 0))); ?></p></div><aside class="meta-card"><h3>下载信息</h3><p>扩展名：<?php echo htmlspecialchars(tplv($tplCurrent, 'file_ext')); ?></p><p>下载次数：<?php echo intval(tplv($tplCurrent, 'down_count', 0)); ?></p><a class="btn btn-primary" href="<?php echo htmlspecialchars(tplv($tplCurrent, 'file_path')); ?>">立即下载</a></aside></div></section><?php } else { ?><section class="section-block"><div class="container card-grid cols-3"><?php foreach ($tplList as $row) { ?><article class="show-card"><div class="show-body"><h3><a href="<?php echo tpl_url('download', $row); ?>"><?php echo htmlspecialchars(tplv($row, 'title')); ?></a></h3><p><?php echo htmlspecialchars(tplv($row, 'file_name')); ?></p></div></article><?php } ?></div><div class="pagination-wrap"><?php echo $tplPager; ?></div></section><?php } ?>
<?php include __DIR__ . '/_footer.php'; ?>
