<?php
session_start(); 
$u_uname = '';
if (isset($_COOKIE['auth_token'])) {
    $u_uname = $_COOKIE['auth_token'];
} else {
    header("location:login.php");
    exit; 
}
?>

<?php include 'include/header.php'; ?>
<?php include 'include/aside.php'; ?>
<?php include 'include/connection.php'; ?>

<!--start page wrapper -->
	<div class="page-wrapper">
			<div class="page-content">
                    <div class="row row-cols-1 row-cols-lg-3">
                        <?php
     $package_id= $_GET['package_id'];                   
$sql8 = "SELECT * FROM webhosting where package_id ='$package_id' ";
$result8 = mysqli_query($selecter, $sql8);

if ($result8 && $result8->num_rows > 0) {
    while($row8 = $result8->fetch_assoc()){
    $package_name = mysqli_real_escape_string($selecter, $row8['package_name']);
    $domain = mysqli_real_escape_string($selecter, $row8['domain']);
    $montly_price = mysqli_real_escape_string($selecter, $row8['montly_price']);
    $visit = mysqli_real_escape_string($selecter, $row8['visit']);
    $ssd = mysqli_real_escape_string($selecter, $row8['ssd']);
    $ssl_certificate = mysqli_real_escape_string($selecter, $row8['ssl_certificate']);
    $email_account = mysqli_real_escape_string($selecter, $row8['email_account']);
    $bandwidth = mysqli_real_escape_string($selecter, $row8['bandwidth']);
    $ip = mysqli_real_escape_string($selecter, $row8['ip']);
    $support = mysqli_real_escape_string($selecter, $row8['support']);
    $package_id = mysqli_real_escape_string($selecter, $row8['package_id']);
    $date = mysqli_real_escape_string($selecter, $row8['date']);
    $status	 = mysqli_real_escape_string($selecter, $row8['status']);
}
}
                        ?>
                        <div class="col">
							<div class="card mb-5 mb-lg-0">
								<div class="card-header bg-primary py-3">
									<h5 class="card-title text-white text-uppercase text-center"><?php echo $package_name ?></h5>
									
									<h3 class="card-price text-white text-center"><span class="term" style="font-size: large;">₹ &nbsp</span><?php echo $montly_price ?><span class="term" style="font-size: large;">/month</span></h3>
								</div>
								<div class="card-body">
									<ul class="list-group list-group-flush">
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $domain ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $visit ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $ssd ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $ssl_certificate ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $email_account ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $bandwidth ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $ip ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $support ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $package_id ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $date ?></li>
										<li class="list-group-item"><i class="bx bx-check me-2 font-18"></i><?php echo $status ?></li>
									</ul>
									
									</div>
								</div>
							</div>
						</div>
						
						
								<!-- Popup Modal -->
<div id="popupModal" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; background: #fff; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);">
  <h5>Enter Project Name</h5>
  <form id="popupForm" method="POST" action="order_now.php">
    <input type="hidden" name="package_id" value="<?php echo $package_id; ?>">
    <div>
      <input type="text" name="project_name" placeholder="Project Name" required style="width: 100%; padding: 10px; margin-top: 10px;">
    </div>
    <div style="margin-top: 15px;">
      <button type="submit" class="btn btn-success">Submit</button>
      <button type="button" class="btn btn-secondary" onclick="closePopup()">Cancel</button>
    </div>
  </form>
</div>

						
					
				</div>
			
			</div>
		</div>
		

<!-- Overlay -->
<div id="overlay" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 9998;" onclick="closePopup()"></div>

<!-- JavaScript -->
<script>
function openPopup() {
  document.getElementById('popupModal').style.display = 'block';
  document.getElementById('overlay').style.display = 'block';
}

function closePopup() {
  document.getElementById('popupModal').style.display = 'none';
  document.getElementById('overlay').style.display = 'none';
}
</script>
		<br>
		<br>
		<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<!--end page wrapper -->

<?php include 'include/footer.php'; ?>












