ok

Mini Shell

Direktori : /proc/thread-self/root/home2/selectio/www/wedding-info-new/
Upload File :
Current File : //proc/thread-self/root/home2/selectio/www/wedding-info-new/plans.php

<?php
    include'header.php';
    
    $statement = $pdo->prepare("SELECT a.status as status, c.name AS category_name, b.plan_name AS plans, a.* FROM tbl_plans AS a 
        LEFT JOIN plan_name AS b ON b.plan_id = a.plan_name
        LEFT JOIN categories AS c ON c.id = a.category 
        WHERE  a.category = 1");
    $statement->execute();
    $plans = $statement->fetchAll(PDO::FETCH_ASSOC);
?>


  <div class="divider t-12 b-20"></div>
  <div class='row' >
      <?php foreach ($plans as $plan) { ?>
      <div class='col-6' >
            <div class="card-deck mb-3 text-center">
             <div class="card mb-4 box-shadow">
               <div class="card-header">
                 <h4 class="my-0 font-weight-normal"><?=$plan['plans']?></h4>
               </div>
               <div class="card-body">
                 <h1 class="card-title pricing-card-title">Rs.<?=$plan['price']?> <strike><?=$plan['max_price']?></strike> <br>
                 <small class="text-muted">month</small></h1>
                 <ul class="list-unstyled mt-3 mb-4">
                   <li><?=$plan['content']?></li><br>
                 </ul>
                   <button type="button" class="btn btn-lg btn-block btn-outline-primary buy-btn" data-plan="<?= $plan['id'] ?>" data-price="<?= $plan['price'] ?>">Buy</button>
               </div>
             </div>
          </div>
      </div>
      <?php } ?>
  </div>
  <script>
  $(document).ready(function() {
    $('.buy-btn').click(function() {
      var plan = $(this).data('plan');
      var price = $(this).data('price');
      window.location.href = 'payment.php?plan=' + encodeURIComponent(plan) + '&price=' + encodeURIComponent(price);
    });
  });
</script>

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

Zerion Mini Shell 1.0