	<?php
		session_start();
		include "../connection.php"; 


		if (!isset($_SESSION['userid'])) {
			// Check if the cookie exists
			if (isset($_COOKIE['userid'])) {
				$_SESSION['userid'] = $_COOKIE['userid'];
			} else {
				header("Location: ../login.php");
				exit();
			}
		}

	?>
	
	<?php include 'header-link.php' ?>

 <main>
    <section>
        <div class="container mt-5">
            <div class="row justify-content-center">
                <div class="col-md-6">
                    <div class="card custom-card">
                        <div class="card-body">
                            <h5 class="card-title text-center fw-bold"> ড্রাইভ অফার সমূহ  </h5>

                            <div class="mb-3">
                                <select class="form-control" name="SelectSim" id="categorySelect">
                                    <option> সিম সিলেক্ট করুন </option>
                                    <option>Category 1</option>
                                    <option>Category 2</option>
                                    <option>Category 3</option>
                                </select>
                            </div>

                            <input type="text" class="form-control mb-4" id="searchInput" placeholder=" অফার খুঁজুন... ">

                            <div class="offer-list">
								
								<div class="offer-card mb-3 bg-light p-2">
                                    <div class="row">
										<div class="col">
										  <small class="fw-bold">  অফার :  <?php echo $row['offer_name']?>  </small><br>
                                            <small>মেয়াদ:  <?php echo $row['offer_meyad']?> </small><br>
                                            <small>সিম: <?php echo $row['offer_sim']?> </small> 
										</div>
										<div class="col text-end">
										  <small class="fw-bold"> মূল্য: <?php echo $row['offer_amount']?>  </small><br>
                                            <small> কমিশন: <?php echo $row['offer_commision']?> </small><br>
                                            <small> বিভাগ:  <?php echo $row['offer_area']?> </small>
										</div>
									</div>
									<div class="d-grid">
										<a href="drive-view.php" class="btn custom-button w-50 mx-auto"> ক্রয় করুন </a>
									</div>
                                </div>

                               
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</main>




    
</body>
</html>
