-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
41 lines (37 loc) · 987 Bytes
/
dashboard.php
File metadata and controls
41 lines (37 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
require __DIR__ . '/db.php';
require __DIR__ . '/auth.php';
require_login();
enforce_session_timeout(3600);
try {
$pdo = db();
$count = (int)$pdo->query('SELECT COUNT(*) FROM users')->fetchColumn();
} catch (Throwable $e) {
$count = 0;
}
?>
<!doctype html>
<html lang="tr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dashboard</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
</head>
<body>
<main class="container">
<nav>
<ul>
<li><strong>Dashboard</strong></li>
</ul>
<ul>
<li><a href="logout.php">Çıkış</a></li>
</ul>
</nav>
<h1>Hoş geldiniz</h1>
<p>Kayıtlı kullanıcı sayısı: <strong><?=$count?></strong></p>
<!-- İstersen buraya Chart.js ekleyebilirsin -->
<!-- <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> -->
</main>
</body>
</html>