-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin.html
More file actions
86 lines (73 loc) · 2.5 KB
/
admin.html
File metadata and controls
86 lines (73 loc) · 2.5 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script type="module" src="logout.js" defer></script>
<script type="module" src="firebase.js" defer></script>
<title>예약확인 시스템</title>
</head>
<body>
<header>
<div class="header">
<h1>예약확인</h1>
<img src="./image/user.png" alt="">
<p id="admin"></p>
<button id="logoutButton">로그아웃</button>
</div>
</header>
<div class="container">
<h1>예약내역</h1>
<div class="divider"></div>
<div class="Reserve_info">
<li>
<a href="#">예약번호</a>
<a href="#">고객명</a>
<a href="#">예약날짜</a>
<a href="#">결제금액</a>
<a href="#">좌석정보</a>
</li>
</div>
<div class="divider2"></div>
<div id="reserveData">
<table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</table>
</div>
<script type="module">
// Firebase 모듈 가져오기
import { initializeApp } from 'firebase/app';
import { getAuth, signOut } from 'firebase/auth';
// Firebase 구성
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
};
// Firebase 초기화
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
// 로그아웃 함수 정의
const logout = async () => {
try {
await signOut(auth);
console.log('로그아웃 성공');
window.location.href = '/index.html';
} catch (error) {
console.error('로그아웃 실패:', error.message);
}
};
document.getElementById('logOutButton').addEventListener('click', logout);
</script>
</body>
</html>