$module) { if ($key === 'media') continue; $counts = ['draft' => 0, 'coming_soon' => 0, 'published' => 0, 'archived' => 0]; foreach (db()->query("SELECT status, COUNT(*) total FROM `{$module['table']}` GROUP BY status")->fetchAll() as $row) $counts[$row['status']] = (int) $row['total']; $rows[] = ['key' => $key, 'label' => $module['label'], 'counts' => $counts]; } render_header('公開狀態', 'publishing'); ?>
公開前先完成資料與來源檢查
| 內容模組 | 草稿 | 籌備中 | 公開 | 封存 | 管理 |
|---|---|---|---|---|---|
| = h($row['label']) ?> | = $row['counts']['draft'] ?> | = $row['counts']['coming_soon'] ?> | = $row['counts']['published'] ?> | = $row['counts']['archived'] ?> | 查看資料 |