/
/
home
/
u523034047
/
domains
/
badshacric.com
/
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/badshacric.com/public_html/blog
Edit:
/home/u523034047/domains/badshacric.com/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']); ?> - Badshahcric 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; } .img-watermark { position: relative; display: inline-block; } .img-watermark img { width: 100%; border-radius: 8px; } /* Watermark text */ .img-watermark::after { content: "Badshahcric"; position: absolute; bottom: 10px; right: 10px; font-size: 24px; font-weight: 700; opacity: 0.22; color: white; text-shadow: 2px 2px 8px rgba(0,0,0,0.7); pointer-events: none; } .card.related { background:#0f1316; padding:15px; border-radius:10px; } .related-item { display:flex; align-items:center; margin-bottom:10px; gap:10px; } .related-item img { width:55px; height:55px; object-fit:cover; border-radius:6px; } .related-item a { color:#ffb84d; text-decoration:none; font-weight:500; } .related-item a:hover { text-decoration:underline; } :root{--bg:#06121a;--card:#0f1720;--accent:#ff8c00;--muted:#9aa4b2;--text:#e6eef8;--maxw:1100px} *{box-sizing:border-box} body{margin:0;font-family:Inter,Arial,Helvetica,sans-serif;background:linear-gradient(180deg,#041017 0%,#071423 100%);color:var(--text);-webkit-font-smoothing:antialiased} .wrap{max-width:var(--maxw);margin:36px auto;padding:24px} .header{display:flex;flex-direction:column;gap:8px} .h-badge{background:var(--accent);color:#000;padding:6px 10px;border-radius:999px;font-weight:700;width:max-content} h1{margin:6px 0 8px;color:var(--accent);font-size:28px} .lead{color:var(--muted);margin-bottom:16px} .card{background:var(--card);padding:20px;border-radius:12px;box-shadow:0 8px 30px rgba(0,0,0,0.5)} .grid{display:grid;grid-template-columns:2fr 320px;gap:20px;margin-top:18px} @media(max-width:960px){.grid{grid-template-columns:1fr}} .section h2{color:#fff;margin-top:0} .small{color:var(--muted);font-size:14px} .cta{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:14px 0} .join-btn{background:linear-gradient(135deg,#25D366,#128C7E);color:#fff;padding:12px 20px;border-radius:999px;text-decoration:none;font-weight:700;box-shadow:0 8px 22px rgba(18,140,126,0.18)} .join-btn:hover{transform:translateY(-3px)} .list{color:var(--muted);padding-left:18px} .feature{width:100%;border-radius:8px;margin-bottom:12px} .meta{color:var(--muted);font-size:13px;margin-bottom:10px} .related{display:flex;flex-direction:column;gap:12px} .related a{color:var(--accent);text-decoration:none} .footer-note{color:var(--muted);font-size:13px;margin-top:18px} </style> <style> body{font-family:Arial;padding:20px;background:#0b0c10;color:#eee} .container{max-width:900px;margin:auto} img.feature{width:100%;height:auto;border-radius:8px} .meta{color:#9aa4b2;font-size:13px;margin-bottom:10px} .content{background:#0f1316;padding:18px;border-radius:10px} .join-game-btn { display: inline-block; padding: 12px 32px; background: linear-gradient(45deg, #ff0059, #ff7a00); color: #fff; font-size: 18px; font-weight: 600; border-radius: 50px; text-decoration: none; box-shadow: 0 5px 15px rgba(255, 0, 90, 0.4); transition: 0.3s ease; } .join-game-btn:hover { box-shadow: 0 8px 22px rgba(255, 0, 90, 0.6); transform: scale(1.07); } </style> </head> <body> <div class="container"> <h1> <a href="index.php"><img fetchpriority="high" width="150" height="50" src="../badshah.webp" class="attachment-full size-full wp-image-634" alt="PlayBro 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