-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
364 lines (316 loc) · 12.5 KB
/
Copy pathindex.html
File metadata and controls
364 lines (316 loc) · 12.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Đặt Tên Huyền Học - Thái Cực</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #0c1e3e 0%, #0a1628 50%, #071020 100%);
color: #e8f4f8;
line-height: 1.6;
min-height: 100vh;
}
.container {
max-width: 700px;
margin: 0 auto;
padding: 60px 20px;
}
.taichi {
font-size: 5rem;
color: #5eb3d9;
text-align: center;
margin-bottom: 10px;
text-shadow: 0 0 30px rgba(94, 179, 217, 0.5);
animation: rotate 20s linear infinite;
display: inline-block;
}
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.subtitle {
opacity: 0.7;
margin-bottom: 50px;
font-size: 1rem;
text-align: center;
}
.section { margin-bottom: 35px; }
label {
display: block;
font-size: 0.75rem;
opacity: 0.6;
margin-bottom: 12px;
text-transform: uppercase;
letter-spacing: 2px;
color: #8ecae6;
}
input {
width: 100%;
background: rgba(94, 179, 217, 0.05);
border: 1px solid rgba(94, 179, 217, 0.2);
color: #e8f4f8;
padding: 15px;
font-size: 1rem;
outline: none;
border-radius: 4px;
transition: all 0.3s;
}
input:focus {
border-color: #5eb3d9;
background: rgba(94, 179, 217, 0.1);
box-shadow: 0 0 20px rgba(94, 179, 217, 0.15);
}
.grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
}
.grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}
.card {
background: rgba(94, 179, 217, 0.05);
border: 1px solid rgba(94, 179, 217, 0.15);
padding: 20px;
cursor: pointer;
text-align: center;
transition: all 0.3s;
border-radius: 4px;
}
.card:hover, .card.selected {
border-color: #5eb3d9;
background: rgba(94, 179, 217, 0.15);
box-shadow: 0 0 25px rgba(94, 179, 217, 0.2);
}
.card .symbol {
font-size: 1.3rem;
margin-bottom: 5px;
opacity: 0.8;
}
button {
background: transparent;
border: 1px solid #5eb3d9;
color: #5eb3d9;
padding: 18px 50px;
font-size: 0.9rem;
letter-spacing: 3px;
cursor: pointer;
border-radius: 4px;
transition: all 0.4s;
text-transform: uppercase;
}
button:hover:not(:disabled) {
background: #5eb3d9;
color: #0a1628;
box-shadow: 0 0 30px rgba(94, 179, 217, 0.4);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.hidden { display: none !important; }
.thank-you {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 40px;
background: radial-gradient(ellipse at center, rgba(94, 179, 217, 0.1) 0%, transparent 70%);
}
.thank-you .icon {
width: 100px;
height: 100px;
border: 2px solid #5eb3d9;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 3rem;
color: #5eb3d9;
margin-bottom: 40px;
box-shadow: 0 0 40px rgba(94, 179, 217, 0.3);
}
.thank-you h2 {
font-size: 2.2rem;
font-weight: 300;
margin-bottom: 20px;
color: #5eb3d9;
letter-spacing: 2px;
}
.thank-you p {
font-size: 1.1rem;
opacity: 0.85;
max-width: 450px;
line-height: 1.8;
}
.glow {
position: fixed;
width: 600px;
height: 600px;
background: radial-gradient(circle, rgba(94, 179, 217, 0.15) 0%, transparent 70%);
top: -200px;
right: -200px;
pointer-events: none;
z-index: -1;
}
@media (max-width: 600px) {
.grid-2, .grid-3 { grid-template-columns: 1fr; }
.taichi { font-size: 4rem; }
.thank-you h2 { font-size: 1.6rem; }
}
</style>
</head>
<body>
<div class="glow"></div>
<div class="container" id="formPage">
<div style="text-align: center;">
<div class="taichi">☯</div>
</div>
<p class="subtitle">Hệ thống phân tích bản mệnh & đặt tên huyền học</p>
<form id="divinationForm">
<!-- Giới tính -->
<div class="section">
<label>Giới tính</label>
<div class="grid-2">
<div class="card" onclick="selectGender('male', this)">
<div class="symbol">♂</div>
<div>Nam</div>
<input type="radio" name="gender" value="male" hidden required>
</div>
<div class="card" onclick="selectGender('female', this)">
<div class="symbol">♀</div>
<div>Nữ</div>
<input type="radio" name="gender" value="female" hidden>
</div>
</div>
</div>
<!-- Họ của khách hàng - THÊM MỚI -->
<div class="section">
<label>Họ của khách hàng</label>
<input type="text" name="ho" placeholder="Nhập họ (ví dụ: Nguyễn, Trần, Lê...)" required>
</div>
<!-- Ngày sinh -->
<div class="section">
<label>Ngày sinh (Dương lịch)</label>
<input type="date" name="birthDate" required>
</div>
<!-- Giờ sinh -->
<div class="section">
<label>Giờ sinh</label>
<div class="grid-3" id="timeGrid"></div>
<input type="hidden" name="birthTime" id="selectedTime" required>
</div>
<!-- Liên hệ -->
<div class="section">
<label>Thông tin liên hệ</label>
<input type="tel" name="phone" placeholder="Số điện thoại" required>
<input type="email" name="email" placeholder="Địa chỉ email" required style="margin-top: 15px;">
</div>
<button type="button" id="submitBtn" onclick="handleSubmit()">Khởi động phân tích</button>
</form>
</div>
<div id="thankYouPage" class="hidden thank-you">
<div class="icon">☯</div>
<h2>Cảm ơn quý khách</h2>
<p>Chúng tôi sẽ liên hệ ngay với quý khách để tư vấn chi tiết về bản mệnh và đề xuất tên phù hợp nhất.</p>
</div>
<script>
// Telegram Config
const TELEGRAM_BOT_TOKEN = '8250943920:AAGwz2lMwhpid20bElqGN_CJHei4QHd8k2k';
const TELEGRAM_CHAT_ID = '-5127782135';
let isSubmitting = false;
// Init time grid
const times = [
['23:00-01:00', 'Tý'], ['01:00-03:00', 'Sửu'], ['03:00-05:00', 'Dần'],
['05:00-07:00', 'Mão'], ['07:00-09:00', 'Thìn'], ['09:00-11:00', 'Tỵ'],
['11:00-13:00', 'Ngọ'], ['13:00-15:00', 'Mùi'], ['15:00-17:00', 'Thân'],
['17:00-19:00', 'Dậu'], ['19:00-21:00', 'Tuất'], ['21:00-23:00', 'Hợi']
];
const tg = document.getElementById('timeGrid');
times.forEach(([time, name]) => {
tg.innerHTML += `
<div class="card" onclick="selectTime('${name} (${time})', this)">
<div style="font-size: 0.75rem; opacity: 0.6; margin-bottom: 4px;">${time}</div>
<div style="font-weight: 500;">${name}</div>
</div>
`;
});
function selectGender(val, el) {
document.querySelectorAll('input[name="gender"]').forEach(i => i.checked = false);
el.querySelector('input').checked = true;
document.querySelectorAll('#formPage .card').forEach(c => c.classList.remove('selected'));
el.classList.add('selected');
}
function selectTime(val, el) {
document.getElementById('selectedTime').value = val;
tg.querySelectorAll('.card').forEach(c => c.classList.remove('selected'));
el.classList.add('selected');
}
async function sendTelegram(data) {
const msg = `🔮 THÁI CỰC - KHÁCH HÀNG MỚI\n\n` +
`Họ: ${data.ho}\n` +
`Giới tính: ${data.gender}\n` +
`Ngày sinh: ${data.birthDate}\n` +
`Giờ sinh: ${data.birthTime}\n` +
`SĐT: ${data.phone}\n` +
`Email: ${data.email}\n\n` +
`⏰ ${new Date().toLocaleString('vi-VN')}`;
try {
const response = await fetch(`https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage`, {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
chat_id: TELEGRAM_CHAT_ID,
text: msg,
parse_mode: 'HTML'
})
});
return response.ok;
} catch(e) {
console.error('Telegram error:', e);
return false;
}
}
async function handleSubmit() {
if (isSubmitting) {
console.log('Đang xử lý, vui lòng đợi...');
return;
}
const form = document.getElementById('divinationForm');
const btn = document.getElementById('submitBtn');
// Validate form
const gender = form.querySelector('input[name="gender"]:checked');
const ho = form.querySelector('input[name="ho"]').value;
const birthDate = form.querySelector('input[name="birthDate"]').value;
const birthTime = document.getElementById('selectedTime').value;
const phone = form.querySelector('input[name="phone"]').value;
const email = form.querySelector('input[name="email"]').value;
if (!gender || !ho || !birthDate || !birthTime || !phone || !email) {
alert('Vui lòng điền đầy đủ thông tin');
return;
}
isSubmitting = true;
btn.disabled = true;
btn.textContent = 'Đang gửi...';
const data = {
ho: ho,
gender: gender.value === 'male' ? 'Nam' : 'Nữ',
birthDate: birthDate,
birthTime: birthTime,
phone: phone,
email: email
};
await sendTelegram(data);
document.getElementById('formPage').classList.add('hidden');
document.getElementById('thankYouPage').classList.remove('hidden');
}
</script>
</body>
</html>