Repository navigation
Expand file tree
/
Copy pathadmin_users.php
More file actions
67 lines (62 loc) · 1.88 KB
/
Copy pathadmin_users.php
File metadata and controls
67 lines (62 loc) · 1.88 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
include "db.php";
$sql = "SELECT * FROM member";
$stmt = $pdo->prepare($sql);
$stmt->execute();
?>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>회원관리</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<main class="admin-page">
<section class="admin-card">
<div class="admin-header">
<div>
<h1>회원관리</h1>
<p class="desc">사이트에 가입한 회원 목록을 확인하는 관리자 페이지입니다.</p>
</div>
<a class="small-link" href="login.html">로그인 페이지</a>
</div>
<table class="member-table">
<thead>
<tr>
<th>번호</th>
<th>아이디</th>
<th>이름</th>
<th>이메일</th>
<th>가입일</th>
<th>관리</th>
</tr>
</thead>
<tbody>
<?php
$num = 1;
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { ?>
<tr>
<td><?php echo $num; ?></td>
<td><?php echo $row['user_id']; ?></td>
<td><?php echo $row['user_name']; ?></td>
<td><?php echo $row['user_email']; ?></td>
<td><?php echo $row['user_reg_datetime']; ?></td>
<td>
<a href="edit_user.php?userId=<?php echo $row['user_id']; ?>" class="table-btn edit">수정</a>
<form action="delete_user.php" method="post" style="display:inline;">
<input type="hidden" name="userId" value="<?php echo $row['user_id']; ?>">
<button class="table-btn delete" type="submit">삭제</button>
</form>
</td>
</tr>
<?php
$num++;
} ?>
</tbody>
</table>
</section>
</main>
</body>
</html>