38451-vm/app.php
2026-02-18 14:58:53 +00:00

370 lines
14 KiB
PHP

<?php
require_once __DIR__ . '/includes/lang.php';
require_once __DIR__ . '/includes/header.php';
// Smart Download Redirection Logic
if (isset($_GET['action']) && $_GET['action'] === 'download') {
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$isIos = (strpos($ua, 'iphone') !== false || strpos($ua, 'ipad') !== false || strpos($ua, 'ipod') !== false);
$isAndroid = (strpos($ua, 'android') !== false);
if ($isIos) {
$url = getSetting('ios_download_url', '#');
} elseif ($isAndroid) {
$url = getSetting('apk_download_url', getSetting('android_download_url', '#'));
} else {
$url = getSetting('android_download_url', '#');
}
if ($url && $url !== '#') {
header("Location: $url");
exit;
} else {
// Fallback to page if no URL set
header("Location: /app.php");
exit;
}
}
?>
<main class="app-page-wrapper">
<!-- Hero Section -->
<section class="app-hero py-5">
<div class="container py-lg-5">
<div class="row align-items-center g-5">
<div class="col-lg-6 text-center text-lg-start animate__animated animate__fadeInLeft">
<h1 class="display-4 fw-bold text-white mb-4 line-height-1-2">
<?= __('support_anywhere') ?>
</h1>
<p class="lead text-white-50 mb-5 fs-5">
<?= __('app_mockup_desc') ?>
</p>
<div class="download-section mb-5">
<div class="row g-3 justify-content-center justify-content-lg-start">
<div class="col-12 mb-2 d-lg-none">
<a href="?action=download" class="download-btn-modern smart-download w-100">
<i class="bi bi-download"></i>
<div class="text">
<span><?= __('get_started') ?></span>
<div class="store"><?= __('app_download') ?></div>
</div>
</a>
</div>
<div class="col-6 col-md-4">
<a href="<?= getSetting('ios_download_url', '#') ?>" class="download-btn-modern ios">
<i class="bi bi-apple"></i>
<div class="text">
<span><?= __('download_on') ?></span>
<div class="store"><?= __('app_store') ?></div>
</div>
</a>
</div>
<div class="col-6 col-md-4">
<a href="<?= getSetting('android_download_url', '#') ?>" class="download-btn-modern android">
<i class="bi bi-google-play"></i>
<div class="text">
<span><?= __('get_it_on') ?></span>
<div class="store"><?= __('google_play') ?></div>
</div>
</a>
</div>
<div class="col-12 col-md-4">
<a href="<?= getSetting('apk_download_url', '#') ?>" class="download-btn-modern apk">
<i class="bi bi-android2"></i>
<div class="text">
<span><?= __('download_on') ?></span>
<div class="store"><?= __('android_apk') ?></div>
</div>
</a>
</div>
</div>
</div>
<div class="qr-container d-inline-flex align-items-center p-3 rounded-4 bg-white bg-opacity-5 border border-secondary shadow-lg">
<div class="qr-code p-2 bg-white rounded-3">
<?php
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';
$download_url = $protocol . '://' . $_SERVER['HTTP_HOST'] . '/app.php?action=download';
?>
<img src="https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=<?= urlencode($download_url) ?>" alt="QR" width="120" height="120">
</div>
<div class="ms-4 text-start">
<h5 class="text-white fw-bold mb-1"><?= __('scan_download') ?></h5>
<p class="text-white-50 small mb-0"><?= __('scan_qr_to_download') ?></p>
</div>
</div>
</div>
<div class="col-lg-6 text-center position-relative animate__animated animate__fadeInRight">
<div class="mockup-container">
<!-- CSS Based Mockup for better performance and reliability -->
<div class="iphone-mockup">
<div class="screen">
<iframe src="/binary.php?symbol=BTC" frameborder="0" style="width: 100%; height: 100%; border: none;"></iframe>
</div>
<div class="home-bar"></div>
<div class="notch"></div>
</div>
<!-- Floating elements for depth -->
<div class="floating-icon icon-1"><i class="bi bi-currency-bitcoin text-warning"></i></div>
<div class="floating-icon icon-2"><i class="bi bi-shield-lock-fill text-primary"></i></div>
<div class="floating-icon icon-3"><i class="bi bi-lightning-fill text-info"></i></div>
</div>
</div>
</div>
</div>
</section>
<!-- Installation Guide -->
<section class="py-5 bg-black bg-opacity-20">
<div class="container">
<div class="text-center mb-5">
<h2 class="text-white fw-bold"><?= __('kyc_steps') ?></h2>
<p class="text-white-50"><?= __('recharge_steps') ?></p>
</div>
<div class="row g-4">
<div class="col-md-4">
<div class="guide-card p-4 rounded-4 bg-surface border border-secondary h-100">
<div class="step-num mb-3">01</div>
<h4 class="text-white mb-3"><?= __('scan_download') ?></h4>
<p class="text-white-50 small mb-0"><?= __('app_guide_step1') ?></p>
</div>
</div>
<div class="col-md-4">
<div class="guide-card p-4 rounded-4 bg-surface border border-secondary h-100">
<div class="step-num mb-3">02</div>
<h4 class="text-white mb-3"><?= __('app_install_auth') ?></h4>
<p class="text-white-50 small mb-0"><?= __('app_guide_step2') ?></p>
</div>
</div>
<div class="col-md-4">
<div class="guide-card p-4 rounded-4 bg-surface border border-secondary h-100">
<div class="step-num mb-3">03</div>
<h4 class="text-white mb-3"><?= __('app_experience_now') ?></h4>
<p class="text-white-50 small mb-0"><?= __('app_guide_step3') ?></p>
</div>
</div>
</div>
</div>
</section>
<!-- Features -->
<section class="py-5 bg-black bg-opacity-30 border-top border-secondary">
<div class="container">
<div class="row g-4">
<div class="col-md-4">
<div class="feature-item p-4 text-center">
<div class="icon-circle bg-primary bg-opacity-10 text-primary mb-3 mx-auto">
<i class="bi bi-graph-up-arrow fs-2"></i>
</div>
<h4 class="text-white fw-bold"><?= __('real_time_alerts') ?></h4>
<p class="text-white-50"><?= __('full_trading_features') ?></p>
</div>
</div>
<div class="col-md-4">
<div class="feature-item p-4 text-center">
<div class="icon-circle bg-success bg-opacity-10 text-success mb-3 mx-auto">
<i class="bi bi-safe2 fs-2"></i>
</div>
<h4 class="text-white fw-bold"><?= __('two_fa_security') ?></h4>
<p class="text-white-50"><?= __('inst_security_desc') ?></p>
</div>
</div>
<div class="col-md-4">
<div class="feature-item p-4 text-center">
<div class="icon-circle bg-info bg-opacity-10 text-info mb-3 mx-auto">
<i class="bi bi-chat-dots fs-2"></i>
</div>
<h4 class="text-white fw-bold"><?= __('live_chat_247') ?></h4>
<p class="text-white-50"><?= __('support_247') ?></p>
</div>
</div>
</div>
</div>
</section>
</main>
<script>
document.addEventListener('DOMContentLoaded', function() {
const ua = navigator.userAgent.toLowerCase();
const isIos = /iphone|ipad|ipod/.test(ua);
const isAndroid = /android/.test(ua);
if (isIos) {
document.querySelector('.download-btn-modern.ios').classList.add('highlight-pulse');
} else if (isAndroid) {
document.querySelector('.download-btn-modern.android').classList.add('highlight-pulse');
}
});
</script>
<style>
.guide-card {
transition: all 0.3s ease;
}
.guide-card:hover {
transform: translateY(-5px);
border-color: var(--primary) !important;
}
.step-num {
font-size: 32px;
font-weight: 900;
color: var(--primary);
opacity: 0.5;
font-family: 'Inter', sans-serif;
}
.smart-download {
background: var(--primary) !important;
border-color: var(--primary) !important;
}
.smart-download i {
color: #fff !important;
}
.smart-download .text .store {
color: #fff !important;
}
.smart-download .text span {
color: rgba(255,255,255,0.8) !important;
}
.highlight-pulse {
border-color: var(--primary) !important;
box-shadow: 0 0 15px rgba(0, 98, 255, 0.4);
animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
0% { box-shadow: 0 0 0 0 rgba(0, 98, 255, 0.4); }
70% { box-shadow: 0 0 0 10px rgba(0, 98, 255, 0); }
100% { box-shadow: 0 0 0 0 rgba(0, 98, 255, 0); }
}
.app-page-wrapper {
background: #0b0e11;
overflow-x: hidden;
}
.download-btn-modern {
display: flex;
align-items: center;
padding: 12px 15px;
background: #1e2329;
border: 1px solid #2b3139;
border-radius: 12px;
text-decoration: none;
transition: all 0.3s ease;
height: 100%;
}
.download-btn-modern:hover {
background: #2b3139;
border-color: var(--primary);
transform: translateY(-3px);
}
.download-btn-modern i {
font-size: 24px;
margin-right: 12px;
color: #fff;
}
.download-btn-modern .text {
text-align: left;
}
.download-btn-modern .text span {
display: block;
font-size: 10px;
color: #848e9c;
text-transform: uppercase;
}
.download-btn-modern .text .store {
font-size: 14px;
font-weight: 700;
color: #fff;
}
/* Mockup CSS */
.mockup-container {
position: relative;
padding: 20px;
}
.iphone-mockup {
width: 300px;
height: 600px;
background: #2b3139;
border-radius: 40px;
border: 12px solid #1e2329;
position: relative;
margin: 0 auto;
box-shadow: 0 50px 100px rgba(0,0,0,0.5);
overflow: hidden;
}
.iphone-mockup .screen {
width: 100%;
height: 100%;
background: #0b0e11;
border-radius: 28px;
overflow: hidden;
}
.iphone-mockup .notch {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 150px;
height: 25px;
background: #1e2329;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
z-index: 10;
}
.iphone-mockup .home-bar {
position: absolute;
bottom: 8px;
left: 50%;
transform: translateX(-50%);
width: 100px;
height: 4px;
background: rgba(255,255,255,0.2);
border-radius: 2px;
z-index: 10;
}
.floating-icon {
position: absolute;
width: 60px;
height: 60px;
background: #1e2329;
border: 1px solid #2b3139;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
animation: float 4s ease-in-out infinite;
z-index: 5;
}
.icon-1 { top: 10%; right: 10%; animation-delay: 0s; }
.icon-2 { bottom: 20%; left: 10%; animation-delay: 1s; }
.icon-3 { top: 40%; left: -5%; animation-delay: 2s; }
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-20px); }
}
.icon-circle {
width: 70px;
height: 70px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
@media (max-width: 991px) {
.iphone-mockup {
width: 260px;
height: 520px;
}
}
</style>
<?php require_once __DIR__ . '/includes/footer.php'; ?>