Sindbad~EG File Manager
<?php
// Include database connection
include 'conn.php';
?>
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- SEO Meta Tags -->
<title>SnackonCrumbs - Delicious Cakes & Snacks Delivered to Your Doorstep</title>
<meta name="description" content="SnackonCrumbs offers fresh and delicious cakes, snacks, and desserts delivered right to your door. Enjoy mouth-watering treats with the best quality and service. Order now!">
<meta name="keywords" content="cakes, snacks, desserts, online cake delivery, snack delivery, fresh cakes, sweet treats, home delivery, bakery">
<meta name="author" content="SnackonCrumbs">
<!-- Open Graph Meta Tags for Social Media Sharing -->
<meta property="og:title" content="SnackonCrumbs - Delicious Cakes & Snacks Delivered to Your Doorstep">
<meta property="og:description" content="Enjoy the convenience of fresh and delicious cakes, snacks, and desserts delivered right to your door. Order now and indulge in the best treats!">
<meta property="og:image" content="https://www.snackoncrumbs.com/assets/img/logo.png"> <!-- Replace with your image URL -->
<meta property="og:url" content="https://www.snackoncrumbs.com">
<meta property="og:type" content="website">
<!-- Twitter Meta Tags for Social Media Sharing -->
<meta name="twitter:title" content="SnackonCrumbs - Delicious Cakes & Snacks Delivered to Your Doorstep">
<meta name="twitter:description" content="Get fresh cakes, snacks, and delicious desserts delivered to your doorstep. Quality snacks with an easy online order experience.">
<meta name="twitter:image" content="https://www.snackoncrumbs.com/assets/img/logo.png"> <!-- Replace with your image URL -->
<meta name="twitter:card" content="summary_large_image">
<!-- Favicon -->
<link rel="icon" href="https://www.snackoncrumbs.com/assets/img/favicon.ico" type="image/x-icon">
<!-- Canonical Link to avoid duplicate content -->
<link rel="canonical" href="https://www.snackoncrumbs.com">
<!-- ===============================================-->
<!-- Stylesheets-->
<!-- ===============================================-->
<link href="assets/css/theme.css" rel="stylesheet" />
</head>
<body>
<main class="main" id="top">
<?php include 'nav.php'?>
<!-- Section with Carousel -->
<section class="py-5">
<div class="container">
<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<?php
// Fetch data from the slider table
$sql_slider = "SELECT * FROM slider ORDER BY id ASC";
$result_slider = $conn->query($sql_slider);
$active = true; // Set the first item as active
if ($result_slider->num_rows > 0) :
while($row_slider = $result_slider->fetch_assoc()) :
?>
<!-- Carousel Item -->
<div class="carousel-item <?= $active ? 'active' : ''; ?>">
<a href="<?= htmlspecialchars($row_slider['url']) ?>">
<img src="<?= htmlspecialchars($row_slider['image']) ?>" class="d-block w-100 rounded" alt="<?= htmlspecialchars($row_slider['title']) ?>">
</a>
</div>
<?php
// After first item, set active to false
$active = false;
endwhile;
else:
?>
<p class="text-center">No slider images found.</p>
<?php endif; ?>
</div>
<!-- Carousel Controls -->
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</section>
<?php
$sql = "SELECT * FROM categories ORDER BY category_id DESC LIMIT 6";
$result = $conn->query($sql);
?>
<section class="py-5 overflow-hidden">
<div class="container">
<div class="row flex-center mb-2">
<div class="col-lg-8">
<h3 class="fw-bold lh-sm text-center text-lg-start">Categories</h3>
</div>
<div class="col-lg-4 text-lg-end text-center">
<a class="btn btn-lg text-800 me-0" href="#" role="button">VIEW ALL
<svg class="svg-inline--fa fa-chevron-right fa-w-10 ms-2" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" data-fa-i2svg="">
<path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>
</svg>
</a>
</div>
</div>
<div class="row">
<?php if ($result->num_rows > 0): ?>
<?php while($row = $result->fetch_assoc()): ?>
<div class="col-6 col-sm-4 col-md-3 col-lg-2 mb-4">
<div class="card card-span h-100">
<!-- Link to the products page with the category_id as a query parameter -->
<a href="products.php?category_id=<?= htmlspecialchars($row['category_id']) ?>">
<img class="img-fluid " src="<?= htmlspecialchars($row['image_url']) ?>" alt="<?= htmlspecialchars($row['name']) ?>">
<div class="card-body ps-0">
<h5 class="text-center fw-bold text-1000 text-truncate mb-2"><?= htmlspecialchars($row['name']) ?></h5>
</div>
</a>
</div>
</div>
<?php endwhile; ?>
<?php else: ?>
<p class="text-center">No categories found.</p>
<?php endif; ?>
</div>
</div>
</section>
<?php
$sql = "SELECT * FROM menu_items ORDER BY item_id DESC LIMIT 4";
$result = $conn->query($sql);
?>
<section class="py-4 overflow-hidden">
<div class="container">
<div class="row flex-center mb-2">
<div class="col-lg-8">
<h3 class="fw-bold lh-sm text-center text-lg-start">Products </h3>
</div>
<div class="col-lg-4 text-lg-end text-center">
<a class="btn btn-lg text-800 me-0" href="#" role="button">VIEW ALL
<svg class="svg-inline--fa fa-chevron-right fa-w-10 ms-2" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" data-fa-i2svg="">
<path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>
</svg>
</a>
</div>
</div>
<div class="row h-100">
<div class="col-12">
<div class="row gx-3 h-100 align-items-center">
<?php if ($result->num_rows > 0): ?>
<?php while($row = $result->fetch_assoc()): ?>
<div class="col-sm-6 col-md-3 mb-5">
<form class="product-form">
<input type="hidden" name="item_id" value="<?= htmlspecialchars($row['item_id']) ?>">
<div class="card card-span h-100 rounded-3">
<img class="img-fluid rounded-3 h-100" src="<?= htmlspecialchars($row['image_url']) ?>" alt="<?= htmlspecialchars($row['name']) ?>" />
<div class="card-body ps-0">
<h5 class="fsz-20 fw-bold text-1000 text-truncate mb-1"><?= htmlspecialchars($row['name']) ?></h5>
<div class="new-price fw-bold text-danger mb-2">₹<?= number_format($row['price'], 2) ?></div>
</div>
</div>
<?php if ($row['availability'] === 'available'): ?>
<div class="d-grid">
<button type="button" class="btn btn-lg btn-danger mt-2 add-to-cart-btn w-100" data-item-id="<?= htmlspecialchars($row['item_id']) ?>">Order Now</button>
</div>
<?php else: ?>
<button type="button" class="btn btn-lg btn-danger mt-2 add-to-cart-btn w-100" disabled="">Not Available</button>
<?php endif; ?>
</form>
</div>
<?php endwhile; ?>
<?php else: ?>
<p>No menu items found.</p>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<!-- ============================================-->
<!-- CTA Section: Call-To-Action -->
<section class="py-0">
<div class="bg-holder" style="background-image:url(assets/img/gallery/cta-two-bg.png);background-position:center;background-size:cover;">
</div><!--/.bg-holder-->
<div class="container">
<div class="row flex-center">
<div class="col-xxl-9 py-7 text-center">
<h1 class="fw-bold mb-4 text-white fs-6">Ready to place your order ?</h1>
<p class="text-white mb-5 fs-4">Browse our menu and choose the perfect cakes and desserts for your celebration.</p>
<a class="btn btn-danger btn-lg" href="#!">Contact Now <i class="fas fa-chevron-right ms-2"></i></a>
</div>
</div>
</div>
</section>
<!-- ============================================-->
<?php include 'footer.php'?>
</main>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists