<?php
// templates/landing3.php
$site_settings = get_site_settings($pdo);
$landing_title = $site_settings['landing_title'] ?? 'UTAMU';
$favicon = $site_settings['site_favicon'] ?? 'assets/images/favicon.png';

if (!$featured && !empty($videos)) {
    $featured = $videos[0];
}
?>
<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from wekapolepole.tanzaniahub.click/ by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 18 Mar 2026 16:15:12 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= htmlspecialchars($landing_title) ?> | Premium</title>
    <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&amp;display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"><!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WFSQPTZZLJ"></script>

    <style>
        :root {
            --accent: #9d50ff;
            --accent-glow: rgba(157, 80, 255, 0.5);
            --bg-dark: #000000;
            --surface: #121214;
            --text: #ffffff;
            --text-muted: #a1a1aa;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Outfit', sans-serif;
            background: var(--bg-dark);
            color: var(--text);
            padding-bottom: 80px;
            /* Space for bottom nav */
        }

        /* --- Custom Scrollbar --- */
        ::-webkit-scrollbar {
            width: 0px;
        }

        /* --- Header / Top Bar --- */
        header {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 100;
        }

        .brand {
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: -1px;
            background: linear-gradient(to right, #fff, var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* --- Stories / Hot Tags --- */
        .stories-container {
            display: flex;
            gap: 15px;
            overflow-x: auto;
            padding: 10px 20px 20px;
        }

        .story-circle {
            min-width: 70px;
            height: 70px;
            border-radius: 50%;
            padding: 3px;
            background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
            position: relative;
        }

        .story-circle img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid #000;
        }

        .story-label {
            font-size: 0.65rem;
            text-align: center;
            margin-top: 5px;
            color: var(--text-muted);
            font-weight: 600;
        }

        /* --- The Feed (Masonry Style) --- */
        .feed-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            padding: 0 15px;
        }

        .post-card {
            background: var(--surface);
            border-radius: 20px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        }

        /* Vertical "TikTok" aspect ratio */
        .post-thumb {
            width: 100%;
            aspect-ratio: 9/14;
            position: relative;
        }

        .post-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .post-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 40%);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 12px;
        }

        .post-title {
            font-size: 0.85rem;
            font-weight: 600;
            line-height: 1.2;
            margin-bottom: 5px;
        }

        .post-stats {
            font-size: 0.7rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .floating-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--accent);
            padding: 4px 10px;
            border-radius: 50px;
            font-size: 0.6rem;
            font-weight: 800;
            box-shadow: 0 0 15px var(--accent-glow);
        }

        .price-chip {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(0, 0, 0, 0.7);
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 0.65rem;
            font-weight: 700;
            color: #ffd700;
            border: 1px solid #ffd700;
        }

        /* --- Bottom Navigation --- */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 70px;
            background: rgba(18, 18, 20, 0.95);
            backdrop-filter: blur(20px);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid #27272a;
            z-index: 1000;
        }

        .nav-item {
            color: var(--text-muted);
            font-size: 1.2rem;
            cursor: pointer;
            transition: 0.3s;
            position: relative;
        }

        .nav-item.active {
            color: var(--accent);
        }

        .nav-item.active::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 4px;
            background: var(--accent);
            border-radius: 50%;
        }

        .nav-center {
            width: 50px;
            height: 50px;
            background: var(--accent);
            border-radius: 15px;
            display: grid;
            place-items: center;
            color: #fff;
            transform: translateY(-20px);
            box-shadow: 0 10px 20px var(--accent-glow);
        }

        /* --- Modal (Modern Sheet Style) --- */
        .modal-overlay {
            position: fixed;
            bottom: -100%;
            left: 0;
            right: 0;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 2000;
            transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: flex-end;
        }

        .modal-overlay.open {
            bottom: 0;
        }

        .modal-sheet {
            width: 100%;
            background: var(--surface);
            border-radius: 30px 30px 0 0;
            padding: 30px 20px;
            border-top: 2px solid var(--accent);
        }

        .pay-btn {
            width: 100%;
            padding: 18px;
            background: var(--accent);
            border: none;
            border-radius: 18px;
            color: white;
            font-size: 1rem;
            font-weight: 800;
            margin-top: 20px;
            box-shadow: 0 10px 20px var(--accent-glow);
        }

        @media (min-width: 1024px) {
            .feed-container {
                grid-template-columns: repeat(4, 1fr);
                max-width: 1200px;
                margin: 0 auto;
            }
        }
    </style>
</head>

<body>

    <header>
        <div class="brand">UTAMU.LIVE</div>
        <div style="display: flex; gap: 20px; align-items: center;">
            <i class="fas fa-bell"></i>
            <div style="width: 35px; height: 35px; border-radius: 10px; background: #333;"></div>
        </div>
    </header>

    <div class="stories-container">
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-47-27.jpg" alt="">
            </div>
            <div class="story-label">Mamuu Mtamu</div>
        </div>
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-47-56.jpg" alt="">
            </div>
            <div class="story-label">Ashaa</div>
        </div>
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-47-50.jpg" alt="">
            </div>
            <div class="story-label">Boss Lady</div>
        </div>
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-48-44.jpg" alt="">
            </div>
            <div class="story-label">Dalali Kidoti</div>
        </div>
    </div>

    <main class="feed-container">
            <?php foreach ($videos as $vid): ?>
            <div class="post-card" onclick="openPaymentSheet('<?= (int)$vid['price'] ?>', '<?= htmlspecialchars($vid['id']) ?>')">
                <div class="post-thumb">
                    <img src="<?= htmlspecialchars($vid['thumbnail_url'] ?: SITE_URL.'/assets/placeholder.jpg') ?>" alt="">
                    <span class="price-chip">TSH <?= number_format($vid['price']) ?></span>
                    <span class="floating-badge"><i class="fas fa-lock"></i></span>
                    <div class="post-overlay">
                        <h3 class="post-title"><?= htmlspecialchars($vid['title']) ?></h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> <?= number_format($vid['views'] ?? rand(500, 5000)) ?></span>
                            <span><i class="fas fa-heart"></i> <?= rand(50, 500) ?></span>
                        </div>
                    </div>
                </div>
            </div>
            <?php endforeach; ?>
        </main>
<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from wekapolepole.tanzaniahub.click/ by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 18 Mar 2026 16:15:12 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= htmlspecialchars($landing_title) ?> | Premium</title>
    <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&amp;display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"><!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WFSQPTZZLJ"></script>

    <style>
        :root {
            --accent: #9d50ff;
            --accent-glow: rgba(157, 80, 255, 0.5);
            --bg-dark: #000000;
            --surface: #121214;
            --text: #ffffff;
            --text-muted: #a1a1aa;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Outfit', sans-serif;
            background: var(--bg-dark);
            color: var(--text);
            padding-bottom: 80px;
            /* Space for bottom nav */
        }

        /* --- Custom Scrollbar --- */
        ::-webkit-scrollbar {
            width: 0px;
        }

        /* --- Header / Top Bar --- */
        header {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 100;
        }

        .brand {
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: -1px;
            background: linear-gradient(to right, #fff, var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* --- Stories / Hot Tags --- */
        .stories-container {
            display: flex;
            gap: 15px;
            overflow-x: auto;
            padding: 10px 20px 20px;
        }

        .story-circle {
            min-width: 70px;
            height: 70px;
            border-radius: 50%;
            padding: 3px;
            background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
            position: relative;
        }

        .story-circle img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid #000;
        }

        .story-label {
            font-size: 0.65rem;
            text-align: center;
            margin-top: 5px;
            color: var(--text-muted);
            font-weight: 600;
        }

        /* --- The Feed (Masonry Style) --- */
        .feed-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            padding: 0 15px;
        }

        .post-card {
            background: var(--surface);
            border-radius: 20px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        }

        /* Vertical "TikTok" aspect ratio */
        .post-thumb {
            width: 100%;
            aspect-ratio: 9/14;
            position: relative;
        }

        .post-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .post-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 40%);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 12px;
        }

        .post-title {
            font-size: 0.85rem;
            font-weight: 600;
            line-height: 1.2;
            margin-bottom: 5px;
        }

        .post-stats {
            font-size: 0.7rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .floating-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--accent);
            padding: 4px 10px;
            border-radius: 50px;
            font-size: 0.6rem;
            font-weight: 800;
            box-shadow: 0 0 15px var(--accent-glow);
        }

        .price-chip {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(0, 0, 0, 0.7);
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 0.65rem;
            font-weight: 700;
            color: #ffd700;
            border: 1px solid #ffd700;
        }

        /* --- Bottom Navigation --- */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 70px;
            background: rgba(18, 18, 20, 0.95);
            backdrop-filter: blur(20px);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid #27272a;
            z-index: 1000;
        }

        .nav-item {
            color: var(--text-muted);
            font-size: 1.2rem;
            cursor: pointer;
            transition: 0.3s;
            position: relative;
        }

        .nav-item.active {
            color: var(--accent);
        }

        .nav-item.active::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 4px;
            background: var(--accent);
            border-radius: 50%;
        }

        .nav-center {
            width: 50px;
            height: 50px;
            background: var(--accent);
            border-radius: 15px;
            display: grid;
            place-items: center;
            color: #fff;
            transform: translateY(-20px);
            box-shadow: 0 10px 20px var(--accent-glow);
        }

        /* --- Modal (Modern Sheet Style) --- */
        .modal-overlay {
            position: fixed;
            bottom: -100%;
            left: 0;
            right: 0;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 2000;
            transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: flex-end;
        }

        .modal-overlay.open {
            bottom: 0;
        }

        .modal-sheet {
            width: 100%;
            background: var(--surface);
            border-radius: 30px 30px 0 0;
            padding: 30px 20px;
            border-top: 2px solid var(--accent);
        }

        .pay-btn {
            width: 100%;
            padding: 18px;
            background: var(--accent);
            border: none;
            border-radius: 18px;
            color: white;
            font-size: 1rem;
            font-weight: 800;
            margin-top: 20px;
            box-shadow: 0 10px 20px var(--accent-glow);
        }

        @media (min-width: 1024px) {
            .feed-container {
                grid-template-columns: repeat(4, 1fr);
                max-width: 1200px;
                margin: 0 auto;
            }
        }
    </style>
</head>

<body>

    <header>
        <div class="brand">UTAMU.LIVE</div>
        <div style="display: flex; gap: 20px; align-items: center;">
            <i class="fas fa-bell"></i>
            <div style="width: 35px; height: 35px; border-radius: 10px; background: #333;"></div>
        </div>
    </header>

    <div class="stories-container">
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-47-27.jpg" alt="">
            </div>
            <div class="story-label">Mamuu Mtamu</div>
        </div>
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-47-56.jpg" alt="">
            </div>
            <div class="story-label">Ashaa</div>
        </div>
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-47-50.jpg" alt="">
            </div>
            <div class="story-label">Boss Lady</div>
        </div>
        <div class="story-item">
            <div class="story-circle"><img src="assets/photo_2026-01-15_06-48-44.jpg" alt="">
            </div>
            <div class="story-label">Dalali Kidoti</div>
        </div>
    </div>

    <main class="feed-container">
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1024&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/f0b3ca7b-b582-484d-9ec0-070a71f692fe/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">MJUZI WA MAMBO</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 991.8K</span>
                            <span><i class="fas fa-heart"></i> 207</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1025&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/8f0efb2e-bc4f-4e48-82e6-03e44815f95e/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">KITOTO CHA 2000 KINAVYONYWA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 346.9K</span>
                            <span><i class="fas fa-heart"></i> 670</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1026&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/35df91c4-cda5-47c3-a731-3978883fd716/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">BARMAID KITAMBAA CHEUPE KABANANISHWA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 897.7K</span>
                            <span><i class="fas fa-heart"></i> 585</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1027&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/cfb7d568-c493-4ec9-971f-91636c778021/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">Connection ya mwaka 🔥🔥🔥</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 757K</span>
                            <span><i class="fas fa-heart"></i> 695</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1028&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/91ae17d4-1402-4c5e-b219-6e9e054315c1/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">KAPELEKEWA MOTO MWINGI MPAKA KAZIMA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 876.7K</span>
                            <span><i class="fas fa-heart"></i> 436</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1029&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/654f5911-e615-4f7d-91aa-2f0eabf6eeec/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">Connection mpya ya ZUchu</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 1.8M</span>
                            <span><i class="fas fa-heart"></i> 774</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1030&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/0ba641ce-f738-4521-a0c9-f7985e0c63c5/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">MTOTO ANAKUNWA VIZURI INAPOINGIA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 569.2K</span>
                            <span><i class="fas fa-heart"></i> 133</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1031&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/847b599a-eac4-44eb-9741-2a7423d2ae78/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">KAJISAHAU SIJUI IMEINGIA WAPI</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 4.7M</span>
                            <span><i class="fas fa-heart"></i> 155</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1032&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/99d190d0-8b47-4345-894e-891bbd825f17/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">NIENDELEE KUKUWEKA HIVI HVI</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 143.7K</span>
                            <span><i class="fas fa-heart"></i> 814</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1033&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/9e12894d-9a9c-4819-8bee-b86201799fe5/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">MFANYAKAZI BANK CRDB NA BODA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 365.9K</span>
                            <span><i class="fas fa-heart"></i> 636</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1034&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/e0b42ebc-7595-4def-b67a-231a5964a136/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">HII KONEKSHENI FUNGA KAZI</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 877K</span>
                            <span><i class="fas fa-heart"></i> 828</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1621&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/2f569bb8-822d-4ecd-9424-3b8731d330d9/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">USINIINGIZIE HIVYO NAUMIA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 2.4M</span>
                            <span><i class="fas fa-heart"></i> 847</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;2134&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/e2517688-23f4-4c82-b72b-dd3d70d0dc1e/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">CHOMEKA YOOTE IINGIE MPAKA TUMBONI</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 4.9M</span>
                            <span><i class="fas fa-heart"></i> 323</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;2135&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/eb9a13b6-9953-42b7-87c9-1a359cf834ee/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">LEO NINA HAMU NA TANGO NATAKA UNILE MNOO</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 2.3M</span>
                            <span><i class="fas fa-heart"></i> 467</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;2136&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/cdd83bc0-ea5f-460f-9c82-7d382261133a/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">NAPENDA UNAVYOTOMBA WE MKAKA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 1.7M</span>
                            <span><i class="fas fa-heart"></i> 303</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;2138&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/cd139ba0-e0e6-4c57-bfd9-b3ed36088db9/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">KAMPA MSELE AICHAPE KWA NYUMA ILA UTAMU UKAMZIDIA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 1.4M</span>
                            <span><i class="fas fa-heart"></i> 595</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1015&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/bf033440-cdfb-4f08-b3e4-f28b5870faa5/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">JAMANI TARATIBU BASI WE KAKA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 765.7K</span>
                            <span><i class="fas fa-heart"></i> 606</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1016&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/916be264-03ab-46c0-9dec-af877bdac3bf/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">KIUNO NYIGU VITU VYA MAANA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 234.6K</span>
                            <span><i class="fas fa-heart"></i> 731</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1017&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/b7e9998d-3f02-455d-9005-b888473d710d/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">MKAMIO KAMA HATOIONA TENA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 987.7K</span>
                            <span><i class="fas fa-heart"></i> 896</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1018&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/e051a7ee-e84d-42c9-83db-6e659bdb5149/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">Malaya Wa Kutomba Kama wote</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 456.6K</span>
                            <span><i class="fas fa-heart"></i> 913</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1019&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/d3581773-3f67-48db-bdc2-e2d40ba40e60/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">MKAMIO KAMA HATOIONA TENA</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 1.8M</span>
                            <span><i class="fas fa-heart"></i> 134</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1020&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/133ba5a8-9bdf-457e-b38c-991e29cdecd8/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">IZUNGUSHE BABE</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 216.8K</span>
                            <span><i class="fas fa-heart"></i> 558</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1021&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/129edf6c-2626-4e6d-9201-b42d0f3663cc/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">MISHANGAZI KAENI PEMBENI MTOTO WA 2009 NICHEZEE MOTO</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 568K</span>
                            <span><i class="fas fa-heart"></i> 724</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1022&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/21d77608-1c9f-4692-bc1f-b02ccce41856/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">NATAKA IWE YANGU PEKEANGU</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 434.7K</span>
                            <span><i class="fas fa-heart"></i> 307</span>
                        </div>
                    </div>
                </div>
            </div>
                    
            <div class="post-card"
                onclick="openPaymentSheet(&#039;1000&#039;, &#039;1023&#039;)">
                <div class="post-thumb">
                    <img src="../cdn.tanzaniahub.click/videos/96745708-b60b-41a6-a6f6-efb8b2121b53/preview.jpg" alt="">

                                            <span class="price-chip">TSH 1000</span>
                    
                    <span class="floating-badge">
                        <i class="fas fa-lock"></i>
                    </span>

                    <div class="post-overlay">
                        <h3 class="post-title">ALAMBAH HAAM</h3>
                        <div class="post-stats">
                            <span><i class="fas fa-eye"></i> 4.5M</span>
                            <span><i class="fas fa-heart"></i> 952</span>
                        </div>
                    </div>
                </div>
            </div>
            </main>

    <nav class="bottom-nav">
        <div class="nav-item active"><i class="fas fa-home"></i></div>
        <div class="nav-item"><i class="fas fa-compass"></i></div>
        <div class="nav-center"><i class="fas fa-crown"></i></div>
        <div class="nav-item"><i class="fas fa-search"></i></div>
        <div class="nav-item"><i class="fas fa-user"></i></div>
    </nav>

    <div class="modal-overlay" id="paymentModal">
        <div class="modal-sheet">
            <div style="width: 40px; height: 5px; background: #333; border-radius: 10px; margin: 0 auto 20px;"></div>

            <div style="text-align: center;">
                <h2 style="font-size: 1.5rem; margin-bottom: 5px;">Unlock Content</h2>
                <p style="color: var(--text-muted); font-size: 0.9rem;">Join the premium club to watch this full video.
                </p>

                <div
                    style="margin: 25px 0; background: rgba(157, 80, 255, 0.1); padding: 20px; border-radius: 20px; border: 1px dashed var(--accent);">
                    <span
                        style="display: block; font-size: 0.8rem; color: var(--accent); font-weight: 800; margin-bottom: 5px;">TOTAL
                        AMOUNT</span>
                    <h1 id="modalPrice" style="font-size: 2.5rem;">TSH 0</h1>
                </div>
            </div>

            <div
                style="background: #1d1d21; padding: 15px; border-radius: 15px; display: flex; align-items: center; gap: 15px;">
                <i class="fas fa-mobile-alt" style="color: var(--accent); font-size: 1.5rem;"></i>
                <input type="tel" id="phoneNumber" placeholder="Enter Mobile Number"
                    style="background: transparent; border: none; color: #fff; font-size: 1rem; outline: none; width: 100%;">
            </div>

            <input type="hidden" id="videoID">
            <button class="pay-btn" onclick="processPayment()">CONFIRM & PAY</button>
            <p onclick="closePaymentSheet()"
                style="text-align: center; margin-top: 15px; font-size: 0.8rem; color: var(--text-muted); cursor: pointer;">
                Not now, take me back</p>
        </div>
    </div>

    

</body>


<!-- Mirrored from wekapolepole.tanzaniahub.click/ by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 18 Mar 2026 16:15:19 GMT -->
</html>


<script>
const SITE = '<?= SITE_URL ?>';
let paymentCheckInterval = null;
let customModalId = ''; 
window.currentCheckoutId = null;
window.currentCheckoutTitle = 'Customer';
window.currentCheckoutPrice = 0;
window.originalBtnHtml = '';

function openPaymentModal(event, price, id) {
    if (event && event.preventDefault) event.preventDefault();
    customModalId = 'paymentModal';
    document.getElementById(customModalId).style.display = 'flex';
    setupModalData(price, id, '');
}
function openPaymentSheet(price, id) {
    customModalId = 'paymentModal';
    document.getElementById(customModalId).classList.add('open');
    setupModalData(price, id, '');
}
function openCyberModal(price, id) {
    customModalId = 'paymentModal';
    document.getElementById(customModalId).style.display = 'grid';
    setupModalData(price, id, '');
}
function openSheet(price, id) {
    customModalId = 'sheet';
    document.getElementById(customModalId).classList.add('show');
    document.getElementById('overlay').style.display = 'block';
    setupModalData(price, id, '');
}
function handleVideoClick(el, isPaid, url) { 
    if(isPaid) { window.location.href = url; return; }
    customModalId = 'paymentModal';
    document.getElementById(customModalId).classList.add('active');
    setupModalData(el.getAttribute('data-price'), el.getAttribute('data-id'), el.getAttribute('data-title'));
}

function closeCyberModal() { closeModalUniversal(); }
function closeSheet() { closeModalUniversal(); }
function closePaymentModal() { closeModalUniversal(); }
function closeModal() { closeModalUniversal(); }

function closeModalUniversal() {
    if(!customModalId) customModalId = 'paymentModal';
    const m = document.getElementById(customModalId);
    if(m) {
        m.style.display = 'none';
        m.classList.remove('open', 'active', 'show');
    }
    const sheet = document.getElementById('sheet');
    if(sheet) Object.assign(sheet.style, {bottom: '-100%'}) || sheet.classList.remove('show');
    
    const overlay = document.getElementById('overlay');
    if(overlay) overlay.style.display = 'none';
    if(paymentCheckInterval) clearInterval(paymentCheckInterval);
    resetPayButtonUniversal();
}

function setupModalData(price, id, title) {
    const vidInput = document.getElementById('videoID');
    if(vidInput) vidInput.value = id;
    
    window.currentCheckoutId = id;
    window.currentCheckoutTitle = title || 'Customer';
    window.currentCheckoutPrice = price;

    const priceEl = document.getElementById('modalPrice') || document.querySelector('.price-amount');
    if(priceEl) {
        if (priceEl.innerText.includes('TSH')) {
            priceEl.innerText = 'TSH ' + parseInt(price).toLocaleString();
        } else {
            priceEl.innerText = parseInt(price).toLocaleString();
        }
    }
}

async function processPayment() { 
    const phoneInput = document.querySelector('input[type="tel"]') || document.getElementById('phoneInput') || document.getElementById('phoneNumber');
    let phone = phoneInput ? phoneInput.value.replace(/[\s-]/g, '') : '';
    
    if (phone.length === 9 && !phone.startsWith('0')) phone = '0' + phone; 

    if (!phone || phone.length < 10) {
        alert("Weka namba sahihi ya simu, ianzie na 0");
        return;
    }

    const amount = window.currentCheckoutPrice;
    const videoID = window.currentCheckoutId || (document.getElementById('videoID') ? document.getElementById('videoID').value : null);
    
    const payBtn = document.querySelector('.btn-full') || document.querySelector('.btn-neon') || document.querySelector('.pay-btn-final') || document.getElementById('payBtn') || document.querySelector('.pay-btn');
    
    if(!window.originalBtnHtml) window.originalBtnHtml = payBtn.innerHTML;
    payBtn.innerHTML = 'INACHAKATA...';
    payBtn.disabled = true;

    try {
        const response = await fetch(SITE.replace(/\/+$/, '') + '/api/pay.php', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
            body: JSON.stringify({
                phone: phone,
                amount: parseInt(amount),
                videoID: videoID,
                name: window.currentCheckoutTitle,
                token: <?= json_encode($store_api_key) ?> || ''
            })
        });

        const data = await response.json();
        if (data.success) {
            payBtn.innerHTML = 'ANGALIA SIMU YAKO...';
            pollStatus(data.transaction_id);
        } else {
            alert(data.message || 'Hitilafu imetokea.');
            resetPayButtonUniversal();
        }
    } catch (e) {
        alert('Kuna tatizo la mtandao.');
        resetPayButtonUniversal();
    }
}

function submitPayment() { processPayment(); } 

function pollStatus(transactionId) {
    if (paymentCheckInterval) clearInterval(paymentCheckInterval);
    const payBtn = document.querySelector('.btn-full') || document.querySelector('.btn-neon') || document.querySelector('.pay-btn-final') || document.getElementById('payBtn') || document.querySelector('.pay-btn');
    
    paymentCheckInterval = setInterval(async () => {
        try {
            const token = <?= json_encode($store_api_key) ?> || '';
            const query = new URLSearchParams({ tran_id: transactionId, token: token, _: new Date().getTime() }).toString();
            const res = await fetch(SITE.replace(/\/+$/, '') + '/api/check_status.php?' + query);
            const data = await res.json();
            
            const s = (data.status || '').toLowerCase();
            const rs = (data.raw_status || '').toLowerCase();

            if (s === 'success' || s === 'completed' || rs === 'success' || rs === 'completed') {
                clearInterval(paymentCheckInterval);
                payBtn.innerHTML = 'IMEKUBALIWA! INAFUNGUA...';
                setTimeout(() => {
                    window.location.href = <?= json_encode($store_redirect_url) ?>; 
                }, 1500);
            } else if (s === 'failed' || s === 'cancelled') {
                clearInterval(paymentCheckInterval);
                alert('Malipo yameshindwa (' + (data.raw_status || s) + ')');
                resetPayButtonUniversal();
            }
        } catch(e) {}
    }, 5000);
}

function resetPayButtonUniversal() {
    const payBtn = document.querySelector('.btn-full') || document.querySelector('.btn-neon') || document.querySelector('.pay-btn-final') || document.getElementById('payBtn') || document.querySelector('.pay-btn');
    if(payBtn && window.originalBtnHtml) {
        payBtn.innerHTML = window.originalBtnHtml;
        payBtn.disabled = false;
    }
}

document.querySelectorAll('.modal-close, .fa-times').forEach(el => {
    el.addEventListener('click', closeModalUniversal);
});
</script>
</body>
</html>