-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththank_you.php
More file actions
392 lines (344 loc) · 13.5 KB
/
Copy paththank_you.php
File metadata and controls
392 lines (344 loc) · 13.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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<?php
require_once 'config.php';
$siteTitle = getSetting('site_title', 'OpenDonate');
$brandName = getSetting('brand_name', $siteTitle);
$brandLogoUrl = getSetting('brand_logo_url', '');
$brandUrl = getSetting('brand_url', '#');
$brandFavicon = getSetting('brand_favicon_url', '');
$streamerName = getSetting('streamer_name', '');
$donationId = $_GET['donation_id'] ?? 0;
$donation = null;
if ($donationId > 0) {
$stmt = $pdo->prepare("SELECT * FROM donations WHERE id = ?");
$stmt->execute([$donationId]);
$donation = $stmt->fetch();
}
?>
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dziękujemy! – <?php echo htmlspecialchars($siteTitle); ?></title>
<?php if (!empty($brandFavicon)): ?>
<link rel="shortcut icon" href="<?php echo htmlspecialchars($brandFavicon); ?>">
<?php endif; ?>
<meta name="theme-color" content="#0e0e10">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--bg-base: #0e0e10;
--bg-surface: #18181b;
--bg-raised: #1f1f23;
--accent: #757aff;
--accent-rgb: 117,122,255;
--gold: #FFC244;
--gold-rgb: 255,194,68;
--success: #52c41a;
--text-1: #efeff1;
--text-2: #adadb8;
--text-3: #7b7b8b;
--border: #2a2a2e;
--radius-md: 10px;
--radius-lg: 14px;
--radius-pill: 100px;
--ease: cubic-bezier(0.4,0,0.2,1);
--spring: cubic-bezier(0.16,1,0.3,1);
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
body {
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--bg-base);
color: var(--text-1);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 24px 20px;
-webkit-font-smoothing: antialiased;
}
/* Subtle radial glow */
body::before {
content: '';
position: fixed;
inset: 0;
background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--accent-rgb),0.07) 0%, transparent 65%);
pointer-events: none;
z-index: 0;
}
.page {
position: relative;
z-index: 1;
max-width: 600px;
width: 100%;
}
/* Nav */
.top-nav {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 36px;
}
.nav-logo img { height: 36px; }
.nav-back {
display: flex; align-items: center; gap: 7px;
padding: 7px 16px;
border-radius: var(--radius-pill);
border: 1px solid var(--border);
background: transparent;
color: var(--text-2);
font: 600 12px/1 'Poppins', sans-serif;
text-decoration: none;
letter-spacing: 0.02em;
transition: all 0.15s var(--ease);
}
.nav-back:hover {
background: rgba(255,255,255,0.05);
color: var(--text-1);
border-color: rgba(255,255,255,0.15);
}
/* Hero */
.hero {
text-align: center;
padding: 48px 32px 40px;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
margin-bottom: 16px;
position: relative;
overflow: hidden;
animation: slideUp 0.5s var(--spring);
}
.hero::before {
content: '';
position: absolute;
top: -80px; left: 50%;
transform: translateX(-50%);
width: 400px; height: 400px;
background: radial-gradient(circle, rgba(var(--accent-rgb),0.06) 0%, transparent 65%);
pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
@keyframes slideUp {
from { opacity:0; transform: translateY(20px); }
to { opacity:1; transform: translateY(0); }
}
.success-ring {
width: 80px; height: 80px;
background: rgba(var(--accent-rgb),0.1);
border: 2px solid rgba(var(--accent-rgb),0.3);
border-radius: 50%;
display: inline-flex; align-items: center; justify-content: center;
margin-bottom: 22px;
animation: ringPop 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes ringPop {
0% { transform: scale(0); opacity:0; }
100% { transform: scale(1); opacity:1; }
}
.success-ring i { font-size: 32px; color: var(--accent); }
.hero h1 {
font-size: 30px;
font-weight: 800;
letter-spacing: -0.03em;
margin-bottom: 8px;
}
.hero-badge {
display: inline-flex; align-items: center; gap: 7px;
padding: 5px 14px;
background: rgba(82,196,26,0.08);
border: 1px solid rgba(82,196,26,0.2);
border-radius: var(--radius-pill);
color: var(--success);
font-size: 12px; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.07em;
margin-bottom: 16px;
}
.hero p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
/* Card */
.card {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 28px;
margin-bottom: 16px;
animation: slideUp 0.6s var(--spring);
}
.donation-rows {
display: flex; flex-direction: column;
gap: 0;
}
.info-row {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 14px 0;
border-bottom: 1px solid var(--border);
gap: 16px;
}
.info-row:last-child { border-bottom: none; }
.info-label {
display: flex; align-items: center; gap: 8px;
font-size: 12px; font-weight: 700;
color: var(--text-3);
text-transform: uppercase; letter-spacing: 0.07em;
min-width: 110px; flex-shrink: 0;
}
.info-label i { color: var(--accent); font-size: 13px; width: 14px; text-align: center; }
.info-value {
font-size: 15px; font-weight: 600;
color: var(--text-1);
text-align: right; flex: 1;
word-break: break-word; overflow-wrap: break-word;
}
.info-value.amount {
font-size: 24px; font-weight: 800;
color: var(--gold);
letter-spacing: -0.02em;
}
.info-value.message-val {
text-align: left;
color: var(--text-2);
background: var(--bg-raised);
border-left: 3px solid var(--accent);
padding: 12px 14px;
border-radius: 0 var(--radius-md) var(--radius-md) 0;
margin-top: 8px;
line-height: 1.6;
font-weight: 500;
font-size: 14px;
}
.message-row { flex-direction: column; }
/* Alert badge */
.queue-notice {
display: flex; align-items: center; gap: 10px;
padding: 14px 18px;
background: rgba(var(--accent-rgb),0.06);
border: 1px solid rgba(var(--accent-rgb),0.18);
border-radius: var(--radius-md);
margin-top: 20px;
font-size: 13px; font-weight: 600; color: var(--accent);
}
.queue-notice i { font-size: 16px; }
/* Back button */
.btn-primary {
display: flex; align-items: center; justify-content: center; gap: 8px;
width: 100%; padding: 14px 20px;
background: var(--accent);
border: none; border-radius: var(--radius-pill);
color: #fff;
font: 700 14px/1 'Poppins', sans-serif;
text-decoration: none;
cursor: pointer;
transition: all 0.15s var(--ease);
margin-top: 24px;
}
.btn-primary:hover {
background: #6166e6;
transform: translateY(-1px);
box-shadow: 0 6px 20px rgba(var(--accent-rgb),0.3);
}
/* Footer */
.footer {
text-align: center;
padding-top: 8px;
animation: slideUp 0.7s var(--spring);
}
.footer p { font-size: 12px; color: var(--text-3); }
/* Countdown */
.countdown { color: var(--text-3); font-size: 12px; margin-top: 6px; }
.countdown span { color: var(--accent); font-weight: 700; }
@media (max-width: 480px) {
.hero { padding: 36px 20px 30px; }
.hero h1 { font-size: 24px; }
.card { padding: 20px; }
.info-row { flex-direction: column; gap: 6px; }
.info-value { text-align: left; }
}
</style>
</head>
<body>
<div class="page">
<!-- Top nav -->
<nav class="top-nav">
<a href="<?php echo htmlspecialchars($brandUrl); ?>" class="nav-logo">
<?php if (!empty($brandLogoUrl)): ?>
<img src="<?php echo htmlspecialchars($brandLogoUrl); ?>" alt="<?php echo htmlspecialchars($brandName); ?>">
<?php else: ?>
<span style="color: var(--text-1); font: 800 18px/1 'Poppins', sans-serif;"><?php echo htmlspecialchars($brandName); ?></span>
<?php endif; ?>
</a>
<a href="index.php" class="nav-back">
<i class="fas fa-arrow-left"></i> Powrót
</a>
</nav>
<!-- Hero -->
<div class="hero">
<div class="success-ring">
<i class="fas fa-check"></i>
</div>
<div class="hero-badge"><i class="fas fa-circle" style="font-size:8px"></i> Płatność zrealizowana</div>
<h1>Dziękujemy!</h1>
<p>Twój donate został pomyślnie zrealizowany.<?php if (!empty($streamerName)): ?><br>Wspierasz stream <?php echo htmlspecialchars($streamerName); ?> — jesteś kozakiem!<?php else: ?><br>Twoje wsparcie zostało zaksięgowane.<?php endif; ?></p>
</div>
<!-- Donation details -->
<?php if ($donation): ?>
<div class="card">
<div class="donation-rows">
<div class="info-row">
<span class="info-label"><i class="fas fa-user"></i> Nick</span>
<span class="info-value"><?php echo htmlspecialchars($donation['donor_name']); ?></span>
</div>
<div class="info-row">
<span class="info-label"><i class="fas fa-coins"></i> Kwota</span>
<span class="info-value amount"><?php echo number_format($donation['amount'], 2); ?> PLN</span>
</div>
<?php if (!empty($donation['message'])): ?>
<div class="info-row message-row">
<span class="info-label"><i class="fas fa-comment-dots"></i> Wiadomość</span>
<span class="info-value message-val"><?php echo nl2br(htmlspecialchars($donation['message'])); ?></span>
</div>
<?php endif; ?>
<?php if (!empty($donation['voice_message_path'])): ?>
<div class="info-row">
<span class="info-label"><i class="fas fa-microphone"></i> Audio</span>
<span class="info-value" style="color:var(--success)"><i class="fas fa-check-circle"></i> Wiadomość głosowa dołączona</span>
</div>
<?php endif; ?>
</div>
<div class="queue-notice">
<i class="fas fa-tv"></i>
<span>Twój alert pojawi się na ekranie streamera podczas transmisji!</span>
</div>
<a href="index.php" class="btn-primary">
<i class="fas fa-arrow-left"></i> Powrót na stronę główną
</a>
</div>
<?php else: ?>
<div class="card" style="text-align:center">
<p style="color:var(--text-2);margin-bottom:20px">Płatność zakończona pomyślnie. Dziękujemy za wsparcie!</p>
<a href="index.php" class="btn-primary">
<i class="fas fa-arrow-left"></i> Powrót na stronę główną
</a>
</div>
<?php endif; ?>
<div class="footer">
<p class="countdown">Automatyczny powrót za <span id="cd">30</span> s</p>
<p style="margin-top:8px">© <?php echo date('Y'); ?> <?php echo htmlspecialchars($siteTitle); ?></p>
</div>
</div>
<script>
let t = 30;
const el = document.getElementById('cd');
const interval = setInterval(() => {
t--;
if (el) el.textContent = t;
if (t <= 0) {
clearInterval(interval);
window.location.href = 'index.php';
}
}, 1000);
</script>
</body>
</html>