38751-vm/views/apk_detail.php
Flatlogic Bot 4f61082b27 Aslam vbru
2026-02-24 22:45:41 +00:00

120 lines
7.6 KiB
PHP

<?php include 'header.php'; ?>
<div class="container">
<nav aria-label="breadcrumb" class="mb-4">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="/" class="text-success text-decoration-none">Home</a></li>
<?php
$db = db_pdo();
$catName = $db->query("SELECT name FROM categories WHERE id = " . ($apk['category_id'] ?: 0))->fetchColumn();
?>
<li class="breadcrumb-item"><a href="/?category=<?php echo strtolower($catName); ?>" class="text-success text-decoration-none"><?php echo $catName ?: 'Apps'; ?></a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo $apk['title']; ?></li>
</ol>
</nav>
<div class="row g-5">
<div class="col-lg-8">
<div class="bg-white p-5 rounded-4 border-0 shadow-sm mb-5">
<div class="d-flex flex-column flex-md-row align-items-center align-items-md-start mb-5">
<?php
$icon = !empty($apk['icon_path']) ? '/'.$apk['icon_path'] : $apk['image_url'];
?>
<img src="<?php echo $icon; ?>" class="rounded-4 me-md-5 mb-4 mb-md-0 shadow-sm" width="160" height="160" alt="<?php echo $apk['title']; ?>" style="object-fit: cover;">
<div class="text-center text-md-start">
<h1 class="display-5 fw-bold mb-2"><?php echo $apk['title']; ?> <span class="badge bg-light text-dark fs-6 fw-normal align-middle">v<?php echo $apk['version']; ?></span></h1>
<p class="lead text-muted mb-4">Official and original version. Verified safe for Android device.</p>
<div class="d-flex flex-wrap gap-2 justify-content-center justify-content-md-start mb-4">
<span class="badge bg-success-subtle text-success px-3 py-2 rounded-pill fw-medium"><i class="bi bi-download me-1"></i> <?php echo number_format($apk['total_downloads']); ?> Downloads</span>
<span class="badge bg-info-subtle text-info px-3 py-2 rounded-pill fw-medium"><i class="bi bi-shield-check me-1"></i> Verified Safe</span>
<span class="badge bg-light text-dark px-3 py-2 rounded-pill fw-medium"><i class="bi bi-calendar3 me-1"></i> <?php echo date('M d, Y', strtotime($apk['created_at'])); ?></span>
<?php if ($apk['is_vip']): ?>
<span class="badge bg-warning-subtle text-warning px-3 py-2 rounded-pill fw-medium"><i class="bi bi-star-fill me-1"></i> VIP</span>
<?php endif; ?>
</div>
<a href="/download/<?php echo $apk['slug']; ?>" class="btn btn-success btn-lg px-5 rounded-pill shadow-sm py-3 fw-bold w-100 w-md-auto mb-3">
<i class="bi bi-download me-2"></i> Download Now
</a>
<p class="text-muted small">By clicking Download, you agree to our terms of service.</p>
</div>
</div>
<div class="mb-5">
<h4 class="fw-bold mb-4">Description</h4>
<p class="text-muted"><?php echo nl2br(htmlspecialchars($apk['description'])); ?></p>
</div>
<div class="row g-4 mb-5">
<div class="col-md-6">
<div class="p-4 rounded-4 bg-light border-0">
<h6 class="fw-bold mb-3">Main Features</h6>
<ul class="list-unstyled mb-0 text-muted small">
<li class="mb-2"><i class="bi bi-check-circle-fill text-success me-2"></i> Original APK from developer</li>
<li class="mb-2"><i class="bi bi-check-circle-fill text-success me-2"></i> No extra files needed</li>
<li class="mb-2"><i class="bi bi-check-circle-fill text-success me-2"></i> Fast and direct download</li>
<li><i class="bi bi-check-circle-fill text-success me-2"></i> Regular updates included</li>
</ul>
</div>
</div>
<div class="col-md-6">
<div class="p-4 rounded-4 bg-light border-0">
<h6 class="fw-bold mb-3">System Requirements</h6>
<ul class="list-unstyled mb-0 text-muted small">
<li class="mb-2"><i class="bi bi-info-circle me-2"></i> Android 6.0+ (Marshmallow)</li>
<li class="mb-2"><i class="bi bi-memory me-2"></i> 2GB RAM minimum recommended</li>
<li class="mb-2"><i class="bi bi-hdd-network me-2"></i> Stable internet connection</li>
<li><i class="bi bi-cpu me-2"></i> ARMv8 or newer processor</li>
</ul>
</div>
</div>
</div>
<div class="text-center p-4 rounded-4 bg-success bg-opacity-10">
<h6 class="fw-bold mb-3">Is this safe to download?</h6>
<p class="text-muted small mb-0">Yes, every app on ApkNusa is scanned and verified to ensure it is original and safe from the official developers.</p>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="position-sticky" style="top: 2rem;">
<div class="bg-white p-4 rounded-4 border-0 shadow-sm mb-4 text-center py-5">
<h5 class="fw-bold mb-3">Share & Earn</h5>
<p class="text-muted small mb-4">Share this link and earn <b>Rp 500</b> for every download!</p>
<div class="input-group mb-3">
<?php
$ref = isset($_SESSION['user_id']) ? $db->query("SELECT referral_code FROM users WHERE id = ".$_SESSION['user_id'])->fetchColumn() : '';
$shareLink = 'http://'.$_SERVER['HTTP_HOST'].'/apk/'.$apk['slug'].($ref ? '?ref='.$ref : '');
?>
<input type="text" class="form-control form-control-sm bg-light" id="shareLink" value="<?php echo $shareLink; ?>" readonly>
<button class="btn btn-outline-success btn-sm" type="button" onclick="copyShareLink()">Copy</button>
</div>
<?php if (!$ref): ?>
<a href="/login" class="small text-success text-decoration-none">Login to earn money</a>
<?php endif; ?>
</div>
<div class="bg-dark text-white p-4 rounded-4 border-0 shadow-sm text-center">
<i class="bi bi-trophy display-4 mb-3 text-success"></i>
<h5 class="fw-bold mb-3">Referral Program</h5>
<p class="small text-white-50 mb-4">Join our community, share APKs, and get paid directly to your e-wallet or bank account.</p>
<a href="/register" class="btn btn-success fw-bold w-100 rounded-pill py-2">Get Started</a>
</div>
</div>
</div>
</div>
</div>
<script>
function copyShareLink() {
var copyText = document.getElementById("shareLink");
copyText.select();
copyText.setSelectionRange(0, 99999);
navigator.clipboard.writeText(copyText.value);
alert("Share link copied! Send this to your friends to earn money.");
}
</script>
<?php include 'footer.php'; ?>