-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
49 lines (44 loc) · 1.35 KB
/
index.php
File metadata and controls
49 lines (44 loc) · 1.35 KB
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
42
43
44
45
46
47
48
49
<?php
session_start();
require_once 'setconfig.php';
require_once 'class.crud.php';
SessionManager::requireLogin();
$crud = new Crud();
$admins = $crud->readAll('admins');
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8" />
<title>Admin Paneli</title>
</head>
<body>
<h1>Hoşgeldiniz, <?= htmlspecialchars($_SESSION['admin']['namesurname']) ?></h1>
<a href="logout.php">Çıkış Yap</a>
<h2>Admin Listesi</h2>
<?php if ($admins): ?>
<table border="1" cellpadding="5" cellspacing="0">
<thead>
<tr>
<th>ID</th>
<th>Kullanıcı Adı</th>
<th>İsim Soyisim</th>
<th>Kayıt Tarihi</th>
</tr>
</thead>
<tbody>
<?php foreach ($admins as $admin): ?>
<tr>
<td><?= htmlspecialchars($admin['admins_id']) ?></td>
<td><?= htmlspecialchars($admin['admins_username']) ?></td>
<td><?= htmlspecialchars($admin['admins_namesurname']) ?></td>
<td><?= htmlspecialchars($admin['admins_time']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p>Kayıt bulunamadı.</p>
<?php endif; ?>
</body>
</html>