/
/
home
/
u523034047
/
domains
/
cbtfx.org
/
public_html
/
blog
Server: in-mum-web1112.main-hosting.eu (62.72.28.111)
You: 216.73.216.52
PHP 8.3.16
Dir:
/home/u523034047/domains/cbtfx.org/public_html/blog
Edit:
/home/u523034047/domains/cbtfx.org/public_html/blog/post.php
<?php include '../wa-link2.php'; ?> <?php require_once __DIR__ . '/../admin/conn.php'; // Get slug $slug = isset($_GET['slug']) ? trim($_GET['slug']) : ''; if ($slug === '') { header("Location: /blog/index.php"); exit; } // Prepare query $stmt = $conn->prepare("SELECT id, title, slug, summary, content, author, featured_image,tags, created_at FROM posts WHERE slug = ? AND status = 'published' LIMIT 1"); $stmt->bind_param("s", $slug); $stmt->execute(); $result = $stmt->get_result(); $post = $result->fetch_assoc(); $stmt->close(); // If not found if (!$post) { http_response_code(404); echo "Post not found."; exit; } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title><?php echo htmlspecialchars($post['title']); ?> - Cbtf Blog</title> <meta name="description" content="<?php echo htmlspecialchars(mb_strimwidth(strip_tags($post['summary'] ?: $post['content']), 0, 150, '...')); ?>"> <link rel="canonical" href="<?php echo (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>"> <style> .blog-tags { margin-top:10px; } .blog-tags .tag { display:inline-block; background:#1b1f24; color:#ffb84d; padding:6px 14px; margin:5px 6px 0 0; border-radius:20px; font-size:13px; text-decoration:none; transition:0.3s; } .blog-tags .tag:hover { background:#ff8c00; color:#000; } :root{ --primary:#7b2ff7; --secondary:#c94bff; --bg:#070b1a; --card:#0f142e; --border:#242a55; --text:#eef0ff; --muted:#9aa4d6; --accent:#25D366; } *{box-sizing:border-box} body{ margin:0; font-family:'Segoe UI',Inter,Arial,sans-serif; background:linear-gradient(180deg,#050817,#0a0f2c); color:var(--text); } /* CONTAINER */ .container{ max-width:1100px; margin:40px auto; padding:0 16px; } /* LOGO */ .container h1 img{ height:48px; } /* TITLE */ h1{ color:#fff; font-size:30px; margin:12px 0 6px; } h1 + h1{ background:linear-gradient(135deg,var(--primary),var(--secondary)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; } /* META */ .meta{ color:var(--muted); font-size:14px; margin-bottom:16px; } /* FEATURE IMAGE */ .img-watermark{ margin-bottom:16px; } .img-watermark img{ width:100%; border-radius:14px; box-shadow:0 20px 40px rgba(123,47,247,.35); } .img-watermark::after{ content:"CBTF"; font-size:28px; letter-spacing:2px; } /* CONTENT CARD */ .content{ background:linear-gradient(145deg,#10163d,#0b102e); padding:22px; border-radius:16px; border:1px solid var(--border); line-height:1.8; font-size:16px; } /* CONTENT LINKS */ .content a{ color:var(--primary); font-weight:600; } .content a:hover{ text-decoration:underline; } /* CTA BUTTON (JOIN) */ .join-game-btn, .join-btn{ display:inline-block; padding:14px 34px; background:linear-gradient(135deg,var(--primary),var(--secondary)); color:#fff; border-radius:40px; font-size:17px; font-weight:700; text-decoration:none; box-shadow:0 12px 30px rgba(123,47,247,.45); transition:.35s; } .join-game-btn:hover, .join-btn:hover{ transform:translateY(-4px) scale(1.05); } /* LAYOUT GRID */ .grid{ display:grid; grid-template-columns:2.4fr 1fr; gap:24px; margin-top:28px; } @media(max-width:900px){ .grid{grid-template-columns:1fr} } /* ASIDE CARD */ .card{ background:linear-gradient(145deg,#0f1435,#0a0f2a); padding:18px; border-radius:16px; border:1px solid var(--border); box-shadow:0 10px 28px rgba(0,0,0,.5); } /* RELATED POSTS */ .related-item{ display:flex; align-items:center; gap:12px; margin-bottom:14px; } .related-item img{ width:60px; height:60px; border-radius:10px; object-fit:cover; } .related-item span{ color:#fff; font-weight:500; } .related-item a{ display:flex; gap:12px; text-decoration:none; } .related-item a:hover span{ color:var(--secondary); } /* LIST */ .list{ padding-left:18px; color:var(--muted); } .list li{ margin-bottom:8px; } /* FLOATING WHATSAPP */ .floating-whatsapp{ position:fixed; right:22px; bottom:22px; width:62px; height:62px; border-radius:50%; background:linear-gradient(135deg,#25D366,#1fa857); display:flex; align-items:center; justify-content:center; box-shadow:0 14px 34px rgba(37,211,102,.45); z-index:9999; animation:pulse 2s infinite; } .floating-whatsapp img{ width:32px; } @keyframes pulse{ 0%{box-shadow:0 0 0 0 rgba(37,211,102,.5)} 70%{box-shadow:0 0 0 22px rgba(37,211,102,0)} 100%{box-shadow:0 0 0 0 rgba(37,211,102,0)} } </style> </head> <body> <div class="container"> <h1> <a href="index.php"><img fetchpriority="high" width="150" height="50" src="../img/cbtf_com-logo.png" class="attachment-full size-full wp-image-634" alt="Cbtf Gaming Logo" sizes="(max-width: 200px) 100vw, 150px" /></a> </h1> <h1 style="color:#ff8c00"><?php echo htmlspecialchars($post['title']); ?></h1> <div class="meta">By <?php echo htmlspecialchars($post['author']); ?> • <?php echo date('M d, Y', strtotime($post['created_at'])); ?></div> <?php if(!empty($post['featured_image'])): ?> <div class="img-watermark"> <img src="/admin/uploads/<?php echo htmlspecialchars($post['featured_image']); ?>" class="feature" alt="Featured Image"> </div> <?php endif; ?> <div class="content"> <?php include '../wa-link2.php'; // $wa_url = your WhatsApp link $content = str_replace("{wa_link}", $wa_url, $post['content']); echo $content; ?> </div> <?php if(!empty($post['tags'])): ?> <?php $tags = array_map('trim', explode(',', $post['tags'])); ?> <div class="card" style="margin-top:15px"> <strong style="color:#ff8c00">Tags:</strong> <div class="blog-tags"> <?php foreach($tags as $tag): ?> <a href="/blog/tag/<?php echo urlencode(strtolower(str_replace(' ','-',$tag))); ?>" class="tag"> #<?php echo htmlspecialchars($tag); ?> </a> <?php endforeach; ?> </div> </div> <?php endif; ?> <aside> <?php // Fetch 5 random related posts except current one $stmt_rel = $conn->prepare(" SELECT title, slug, featured_image FROM posts WHERE status = 'published' AND slug != ? ORDER BY RAND() LIMIT 5 "); $stmt_rel->bind_param("s", $slug); $stmt_rel->execute(); $related = $stmt_rel->get_result(); ?> <div class="card related"> <h3 style="margin:0 0 12px;color:var(--accent)">Related Guides</h3> <?php while ($r = $related->fetch_assoc()): ?> <div class="related-item"> <a href="/blog/post.php?slug=<?php echo htmlspecialchars($r['slug']); ?>"> <img src="/admin/uploads/<?php echo htmlspecialchars($r['featured_image']); ?>" alt=""> <span><?php echo htmlspecialchars($r['title']); ?></span> </a> </div> <?php endwhile; ?> </div> <div class="card" style="margin-top:14px"> <h3 style="margin:0 0 8px;color:var(--accent)">Quick Tips</h3> <ul class="list small"> <li>Start small — protect your bankroll</li> <li>Verify your account for faster withdrawals</li> <li>Follow stats, avoid emotional bets</li> </ul> </div> </aside> </div> <a href="<?php echo $wa_url; ?>" class="floating-whatsapp" target="_blank"> <img src="https://cdn-icons-png.flaticon.com/512/3536/3536445.png" alt="WhatsApp"> </a> <style> .floating-whatsapp { position: fixed; bottom: 20px; right: 20px; background: #25D366; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 9999; transition: 0.3s; } .floating-whatsapp img { width: 32px; height: 32px; } .floating-whatsapp:hover { transform: scale(1.12); background: #1fa857; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } } .floating-whatsapp { animation: bounce 2s infinite; } </style> </body> </html>
Ukuran: 8.2 KB