-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathandroid.php
More file actions
459 lines (418 loc) · 22.2 KB
/
Copy pathandroid.php
File metadata and controls
459 lines (418 loc) · 22.2 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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
<?php
/**
* Android APK 下载页面
* Google Play Store 风格 - Material Design
* 支持中文/英语/马来语三语言
*/
// 确保从app.php调用
if (!isset($_preloadedApp)) {
header('Location: /');
exit;
}
$app = $_preloadedApp;
// ========== 语言检测 ==========
function detectLanguage() {
if (isset($_GET['lang'])) {
$lang = strtolower($_GET['lang']);
if (in_array($lang, ['zh', 'en', 'ms'])) return $lang;
}
$acceptLang = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '';
if (empty($acceptLang)) return 'en';
$langCode = strtolower(explode('-', explode(',', $acceptLang)[0])[0]);
if ($langCode === 'zh') return 'zh';
if ($langCode === 'ms' || $langCode === 'my') return 'ms';
return 'en';
}
$currentLang = detectLanguage();
$langTexts = [
'zh' => [
'download_btn' => '下载安装',
'no_apk' => '暂无Android版本',
'step1' => '点击下载按钮,等待APK下载完成',
'step2' => '打开下载的APK文件进行安装',
'step3' => '如提示"未知来源",请在设置中允许安装',
'no_apk_notice' => '该应用暂未提供Android版本',
'ios_link' => '点击这里',
'ios_download' => '下载iOS版本',
'if_iphone' => '如果您使用的是iPhone,请',
'version' => '版本',
'size' => '大小',
'downloads' => '下载',
'install_tips' => '安装提示',
'safe' => '已验证',
'free' => '免费',
],
'en' => [
'download_btn' => 'Download APK',
'no_apk' => 'No Android Version',
'step1' => 'Click download and wait for the APK to finish',
'step2' => 'Open the downloaded APK file to install',
'step3' => 'If prompted "Unknown source", allow it in settings',
'no_apk_notice' => 'This app is not yet available for Android',
'ios_link' => 'click here',
'ios_download' => 'to download iOS version',
'if_iphone' => 'If you are using an iPhone,',
'version' => 'Version',
'size' => 'Size',
'downloads' => 'Downloads',
'install_tips' => 'Install Tips',
'safe' => 'Verified',
'free' => 'Free',
],
'ms' => [
'download_btn' => 'Muat Turun APK',
'no_apk' => 'Tiada Versi Android',
'step1' => 'Klik muat turun dan tunggu APK selesai',
'step2' => 'Buka fail APK untuk memasang',
'step3' => 'Jika diminta "Sumber tidak diketahui", benarkan dalam tetapan',
'no_apk_notice' => 'Aplikasi ini belum tersedia untuk Android',
'ios_link' => 'klik di sini',
'ios_download' => 'untuk muat turun versi iOS',
'if_iphone' => 'Jika anda menggunakan iPhone,',
'version' => 'Versi',
'size' => 'Saiz',
'downloads' => 'Muat turun',
'install_tips' => 'Tip Pemasangan',
'safe' => 'Selamat',
'free' => 'Percuma',
],
];
$texts = $langTexts[$currentLang];
$hasApk = (!empty($app['apk_file']) && file_exists(APK_PATH . $app['apk_file'])) || !empty($app['apk_download_url'] ?? '');
$hasIpa = !empty($app['ipa_file']);
$appName = !empty($app['app_title']) ? $app['app_title'] : $app['name'];
$appSubtitle = !empty($app['app_subtitle']) ? $app['app_subtitle'] : '';
$appSlogan = !empty($app['app_slogan']) ? $app['app_slogan'] : '';
$footerText = !empty($app['app_footer_text']) ? $app['app_footer_text'] : '© 2025';
$footerContact = !empty($app['app_footer_contact']) ? $app['app_footer_contact'] : '';
$apkVersion = !empty($app['apk_version']) ? $app['apk_version'] : $app['version'];
$apkSize = $app['apk_size'] > 0 ? formatSize($app['apk_size']) : '--';
$downloadCount = $app['apk_download_count'] ?? 0;
$downloadDisplay = $downloadCount;
if (isset($app['download_display_mode']) && $app['download_display_mode'] === 'fixed' && !empty($app['download_fixed_value'])) {
$downloadDisplay = $app['download_fixed_value'];
}
$iconUrl = !empty($app['icon']) ? SITE_URL . '/uploads/' . $app['icon'] : SITE_URL . '/uploads/default_icon.png';
if (!empty($app['apk_download_url'])) {
$downloadUrl = $app['apk_download_url'];
} else {
$downloadUrl = SITE_URL . '/download.php?type=apk&id=' . $app['id'];
}
$currentSlug = $app['slug'] ?? '';
$baseUrl = "?slug=" . urlencode($currentSlug) . "&platform=android";
?>
<!DOCTYPE html>
<html lang="<?php echo $currentLang; ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="theme-color" content="#121212">
<title><?php echo htmlspecialchars($appName); ?> - Android</title>
<link rel="icon" type="image/png" href="<?php echo $iconUrl; ?>">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
background: #121212;
min-height: 100vh;
color: #e3e3e3;
}
/* Google 彩色顶条 */
.top-bar { height: 3px; background: linear-gradient(90deg, #4285f4 25%, #ea4335 25%, #ea4335 50%, #fbbc04 50%, #fbbc04 75%, #34a853 75%); }
.container {
min-height: calc(100vh - 3px);
display: flex;
flex-direction: column;
max-width: 460px;
margin: 0 auto;
padding: 0 20px;
}
/* 语言栏 */
.lang-bar { display: flex; justify-content: flex-end; gap: 2px; padding: 12px 0 0; }
.lang-btn {
padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 500;
text-decoration: none; color: #888; transition: all 0.2s;
}
.lang-btn:hover { color: #ccc; }
.lang-btn.active { background: rgba(138,180,248,0.12); color: #8ab4f8; }
/* 应用头部 - 类 Play Store 布局 */
.app-header {
display: flex; align-items: flex-start; gap: 16px; padding: 24px 0 20px;
animation: fadeUp 0.4s ease-out;
}
.app-icon {
width: 72px; height: 72px; border-radius: 16px; flex-shrink: 0;
overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-meta { flex: 1; min-width: 0; }
.app-name { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 3px; }
.app-dev { font-size: 13px; color: #8ab4f8; margin-bottom: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
display: inline-flex; align-items: center; gap: 3px;
font-size: 11px; padding: 2px 8px; border-radius: 4px;
background: rgba(255,255,255,0.07); color: #999;
}
.chip svg { width: 11px; height: 11px; }
.chip.green { color: #81c995; background: rgba(52,168,83,0.12); }
/* 数据栏 */
.stats {
display: flex; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a;
margin-bottom: 20px;
animation: fadeUp 0.4s ease-out 0.06s both;
}
.stat { flex: 1; text-align: center; padding: 14px 0; }
.stat + .stat { border-left: 1px solid #2a2a2a; }
.stat-val { font-size: 14px; font-weight: 700; color: #e8e8e8; }
.stat-lbl { font-size: 11px; color: #777; margin-top: 2px; }
/* 下载按钮 */
.dl-wrap { animation: fadeUp 0.4s ease-out 0.12s both; }
.dl-btn {
display: flex; align-items: center; justify-content: center; gap: 10px;
width: 100%; padding: 14px; background: #34a853; border: none; border-radius: 10px;
color: #fff; font-family: inherit; font-size: 15px; font-weight: 600;
cursor: pointer; text-decoration: none; transition: all 0.15s; position: relative; overflow: hidden;
}
.dl-btn:active { transform: scale(0.98); background: #2d9249; }
.dl-btn svg { width: 18px; height: 18px; }
.dl-btn.disabled { background: #2a2a2a; color: #666; cursor: not-allowed; }
.dl-btn.disabled:active { transform: none; }
/* 下载中动画 */
.dl-btn.loading { background: #2d9249; pointer-events: none; }
.dl-btn.loading::after {
content: ''; position: absolute; bottom: 0; left: 0; height: 3px;
background: #81c995; animation: prog 2s ease-out forwards;
}
@keyframes prog { from { width: 0; } to { width: 100%; } }
/* 标语 */
.slogan { text-align: center; font-size: 13px; color: #666; padding: 16px 0 0; }
/* 应用描述 */
.desc-section {
margin-top: 20px; padding: 18px; background: #1e1e1e; border-radius: 12px;
animation: fadeUp 0.4s ease-out 0.18s both;
}
.desc-title { font-size: 14px; font-weight: 600; color: #ccc; margin-bottom: 8px; }
.desc-text { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 16px; }
.features {
display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.feat {
display: flex; align-items: center; gap: 10px; padding: 10px 12px;
background: rgba(255,255,255,0.04); border-radius: 10px;
font-size: 12px; color: #aaa;
}
.feat-icon {
width: 32px; height: 32px; border-radius: 8px;
background: rgba(52,168,83,0.1);
display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feat-icon svg { width: 16px; height: 16px; color: #81c995; }
/* 兼容信息 */
.compat {
margin-top: 12px; padding: 14px 16px; background: #1e1e1e; border-radius: 12px;
animation: fadeUp 0.4s ease-out 0.22s both;
}
.compat-row {
display: flex; align-items: center; gap: 10px; padding: 5px 0;
font-size: 12px; color: #777;
}
.compat-row svg { width: 16px; height: 16px; color: #666; flex-shrink: 0; }
/* 安装提示 - 可折叠 */
.tips {
margin-top: 12px; background: #1e1e1e; border-radius: 12px; overflow: hidden;
animation: fadeUp 0.4s ease-out 0.26s both;
}
.tips-hd {
display: flex; align-items: center; justify-content: space-between;
padding: 13px 16px; cursor: pointer; user-select: none;
}
.tips-hd:active { background: #252525; }
.tips-tt { font-size: 13px; font-weight: 500; color: #aaa; display: flex; align-items: center; gap: 8px; }
.tips-tt svg { width: 16px; height: 16px; color: #8ab4f8; }
.arrow { width: 18px; height: 18px; color: #666; transition: transform 0.25s; }
.arrow.open { transform: rotate(180deg); }
.tips-bd { padding: 0 16px 14px; display: none; }
.tips-bd.open { display: block; }
.tip { display: flex; gap: 10px; padding: 6px 0; font-size: 12px; color: #888; line-height: 1.5; }
.tip-n {
width: 18px; height: 18px; background: rgba(138,180,248,0.1); border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 10px; font-weight: 700; color: #8ab4f8; flex-shrink: 0;
}
/* 无APK */
.no-apk {
margin-top: 16px; padding: 14px 16px; background: rgba(251,188,4,0.06);
border-radius: 10px; font-size: 12px; color: #fdd663; line-height: 1.7;
}
.no-apk a { color: #8ab4f8; text-decoration: none; }
/* 页脚 */
.footer { margin-top: auto; padding: 28px 0 16px; text-align: center; }
.footer p { font-size: 11px; color: #444; margin-bottom: 2px; }
@keyframes fadeUp {
from { opacity: 0; transform: translateY(14px); }
to { opacity: 1; transform: translateY(0); }
}
</style>
</head>
<body>
<div class="top-bar"></div>
<div class="container">
<!-- 语言 -->
<div class="lang-bar">
<a href="<?php echo $baseUrl; ?>&lang=zh" class="lang-btn <?php echo $currentLang === 'zh' ? 'active' : ''; ?>">中文</a>
<a href="<?php echo $baseUrl; ?>&lang=en" class="lang-btn <?php echo $currentLang === 'en' ? 'active' : ''; ?>">EN</a>
<a href="<?php echo $baseUrl; ?>&lang=ms" class="lang-btn <?php echo $currentLang === 'ms' ? 'active' : ''; ?>">BM</a>
</div>
<!-- 应用信息 -->
<div class="app-header">
<div class="app-icon">
<img src="<?php echo $iconUrl; ?>" alt="<?php echo htmlspecialchars($appName); ?>"
onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect fill=%22%2334a853%22 width=%22100%22 height=%22100%22 rx=%2220%22/><text x=%2250%22 y=%2265%22 text-anchor=%22middle%22 fill=%22white%22 font-size=%2240%22>📱</text></svg>'">
</div>
<div class="app-meta">
<h1 class="app-name"><?php echo htmlspecialchars($appName); ?></h1>
<?php if (!empty($appSubtitle)): ?>
<div class="app-dev"><?php echo htmlspecialchars($appSubtitle); ?></div>
<?php endif; ?>
<div class="chips">
<span class="chip green">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></svg>
<?php echo $texts['safe']; ?>
</span>
<span class="chip"><?php echo $texts['free']; ?></span>
<span class="chip">APK</span>
</div>
</div>
</div>
<!-- 数据 -->
<div class="stats">
<div class="stat">
<div class="stat-val"><?php echo htmlspecialchars($apkVersion); ?></div>
<div class="stat-lbl"><?php echo $texts['version']; ?></div>
</div>
<div class="stat">
<div class="stat-val"><?php echo $apkSize; ?></div>
<div class="stat-lbl"><?php echo $texts['size']; ?></div>
</div>
<div class="stat">
<div class="stat-val"><?php echo $downloadDisplay; ?></div>
<div class="stat-lbl"><?php echo $texts['downloads']; ?></div>
</div>
</div>
<!-- 下载 -->
<div class="dl-wrap">
<?php if ($hasApk): ?>
<a href="<?php echo $downloadUrl; ?>" class="dl-btn" id="dlBtn">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>
<?php echo $texts['download_btn']; ?>
</a>
<?php if (!empty($appSlogan)): ?>
<div class="slogan"><?php echo htmlspecialchars($appSlogan); ?></div>
<?php endif; ?>
<!-- 应用描述 -->
<div class="desc-section">
<div class="desc-title"><?php echo $currentLang === 'zh' ? '关于此应用' : ($currentLang === 'ms' ? 'Tentang aplikasi ini' : 'About this app'); ?></div>
<div class="desc-text">
<?php if (!empty($appSlogan)): ?>
<?php echo htmlspecialchars($appSlogan); ?>
<?php else: ?>
<?php echo htmlspecialchars($appName); ?>
<?php endif; ?>
</div>
<!-- 特色标签 -->
<div class="features">
<div class="feat">
<div class="feat-icon">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></svg>
</div>
<span><?php echo $currentLang === 'zh' ? '安全无毒' : ($currentLang === 'ms' ? 'Selamat' : 'Safe & Secure'); ?></span>
</div>
<div class="feat">
<div class="feat-icon">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M13 2.05v2.02c3.95.49 7 3.85 7 7.93 0 1.45-.39 2.81-1.06 3.98l1.73 1c.83-1.44 1.33-3.1 1.33-4.98 0-5.18-3.95-9.45-9-9.95zM12 19c-3.87 0-7-3.13-7-7 0-3.53 2.61-6.43 6-6.92V3.03c-4.06.5-7.18 3.91-7.18 7.97 0 4.08 3.05 7.44 7 7.93v2.02c5.05-.5 9-4.76 9-9.95h-2c0 3.87-3.13 7-7 7z"/></svg>
</div>
<span><?php echo $currentLang === 'zh' ? '极速下载' : ($currentLang === 'ms' ? 'Muat turun pantas' : 'Fast Download'); ?></span>
</div>
<div class="feat">
<div class="feat-icon">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></svg>
</div>
<span><?php echo $currentLang === 'zh' ? '适配全机型' : ($currentLang === 'ms' ? 'Serasi semua' : 'All Devices'); ?></span>
</div>
<div class="feat">
<div class="feat-icon">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
</div>
<span><?php echo $currentLang === 'zh' ? '免费使用' : ($currentLang === 'ms' ? 'Percuma' : 'Free to Use'); ?></span>
</div>
</div>
</div>
<!-- 兼容信息 -->
<div class="compat">
<div class="compat-row">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M17.6 9.48l1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-1.4-.59-2.96-.92-4.47-.92s-3.07.33-4.47.92L5.65 5.67c-.19-.29-.54-.38-.83-.22-.31.16-.43.54-.27.85L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52zM7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25zm10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25z"/></svg>
<span><?php echo $currentLang === 'zh' ? '系统要求:Android 6.0 及以上' : ($currentLang === 'ms' ? 'Keperluan: Android 6.0 ke atas' : 'Requires: Android 6.0+'); ?></span>
</div>
<div class="compat-row">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg>
<span><?php echo $currentLang === 'zh' ? '支持语言:中文 / English / BM' : ($currentLang === 'ms' ? 'Bahasa: 中文 / English / BM' : 'Languages: 中文 / English / BM'); ?></span>
</div>
</div>
<!-- 安装提示 -->
<div class="tips">
<div class="tips-hd" onclick="toggleTips()">
<span class="tips-tt">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>
<?php echo $texts['install_tips']; ?>
</span>
<svg class="arrow open" id="arrow" viewBox="0 0 24 24" fill="currentColor"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>
</div>
<div class="tips-bd open" id="tipsBd">
<div class="tip"><span class="tip-n">1</span><span><?php echo $texts['step1']; ?></span></div>
<div class="tip"><span class="tip-n">2</span><span><?php echo $texts['step2']; ?></span></div>
<div class="tip"><span class="tip-n">3</span><span><?php echo $texts['step3']; ?></span></div>
</div>
</div>
<?php else: ?>
<button class="dl-btn disabled" disabled>
<?php echo $texts['no_apk']; ?>
</button>
<div class="no-apk">
⚠️ <?php echo $texts['no_apk_notice']; ?>
<?php if ($hasIpa): ?><br>
<?php echo $texts['if_iphone']; ?> <a href="?slug=<?php echo urlencode($app['slug']); ?>&platform=ios&lang=<?php echo $currentLang; ?>"><?php echo $texts['ios_link']; ?></a> <?php echo $texts['ios_download']; ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<!-- 页脚 -->
<div class="footer">
<p><?php echo htmlspecialchars($footerText); ?></p>
<?php if (!empty($footerContact)): ?>
<p><?php echo htmlspecialchars($footerContact); ?></p>
<?php endif; ?>
</div>
</div>
<script>
function toggleTips() {
document.getElementById('tipsBd').classList.toggle('open');
document.getElementById('arrow').classList.toggle('open');
}
var dlBtn = document.getElementById('dlBtn');
if (dlBtn) {
dlBtn.addEventListener('click', function() {
var b = this;
b.classList.add('loading');
b.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg> Downloading...';
setTimeout(function() {
b.classList.remove('loading');
b.innerHTML = '<svg viewBox="0 0 24 24" fill="currentColor"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg> <?php echo $texts["download_btn"]; ?>';
}, 2500);
});
}
</script>
</body>
</html>