query("SELECT COUNT(*) FROM articles WHERE status='published'")->fetchColumn(); $draftCount = (int) $pdo->query("SELECT COUNT(*) FROM articles WHERE status='draft'")->fetchColumn(); $pageCount = (int) $pdo->query("SELECT COUNT(*) FROM pages")->fetchColumn(); $categoryCount = (int) $pdo->query("SELECT COUNT(*) FROM categories")->fetchColumn(); $recentArticles = $pdo->query( "SELECT a.id, a.title, a.status, a.created_at, c.name as category_name FROM articles a LEFT JOIN categories c ON a.category_id = c.id ORDER BY a.created_at DESC LIMIT 5" )->fetchAll(); $pageTitle = 'Dashboard'; $currentPage = 'dashboard'; ob_start(); ?>
Noch keine Artikel vorhanden.
| Titel | Kategorie | Status | Erstellt |
|---|---|---|---|
| = e($article['title']) ?> | = e($article['category_name'] ?? '–') ?> | = $article['status'] === 'published' ? 'Veröffentlicht' : 'Entwurf' ?> | = format_date($article['created_at']) ?> |