-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPackage.php
88 lines (80 loc) · 3.18 KB
/
Package.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
$menu = "package";
$is_package_form = true;
include("header.php");
$package = new Package();
/*$packageVeriations = array();
$packageVeriations[] = new PackageRow("Basic","350","Basic details",["Text Dummy 1","Text Dummy 2","Text Dummy 3"]);
$package->addPackage(20,30,10,$packageVeriations);*/
?>
<section class="banner-rs-bottom py-lg-5 py-3">
<?php ?>
<div class="container py-lg-4 py-3">
<div class="card-deck text-center row">
<?php
if(isset($_REQUEST['from']) && isset($_REQUEST['to']) && isset($_REQUEST['days'])){
$tempDate = $_REQUEST['year'].'-'.$_REQUEST['month'];
$packageFound = $package->searchPackage($_REQUEST['from'],$_REQUEST['to'],$_REQUEST['days'],$tempDate);
if($packageFound){
$modal_id = "";
while ( $row = $packageFound->fetch_assoc() ) {
?>
<div class="price-info-grid col-lg-3">
<div class="price-inner mb-3">
<div class="price-header">
<h4><?php echo $row['name']; ?></h4>
</div>
<div class="price-body">
<h5 class="pricing-title">
<span class="align-top">$</span><?php echo $row['price']; ?>
</h5>
<ul class="list-unstyled mt-3 mb-4" style="text-align:left;">
<li class="py-2 border-bottom"><strong>Days</strong> <?php echo $row['days']; ?></li>
<li class="py-2 border-bottom"><strong>Date</strong> <?php echo $row['date']; ?></li>
<li class="py-2 border-bottom"><strong>Type</strong> <?php echo $row['type']; ?></li>
</ul>
<a href="package-details.php?package=<?php echo $row['id']; ?>" class="btn btn-block btn-outline-primary py-2">Book Now</a>
</div>
</div>
</div>
<?php
}
}else{
echo '<div class="col-xs-12 col-sm-12"><h2>Package not found.</h2></div>';
}
}else{
$packageFound = $package->Get();
if($packageFound){
$modal_id = "";
while ( $row = $packageFound->fetch_assoc() ) {
?>
<div class="price-info-grid col-lg-3">
<div class="price-inner mb-3">
<div class="price-header">
<h4><?php echo $row['name']; ?></h4>
</div>
<div class="price-body">
<h5 class="pricing-title">
<?php echo $row['price']; ?><span class="align-top">TK</span>
</h5>
<ul class="list-unstyled mt-3 mb-4" style="text-align:left;">
<li class="py-2 border-bottom"><strong>Days</strong> <?php echo $row['days']; ?></li>
<li class="py-2 border-bottom"><strong>Date</strong> <?php echo $row['date']; ?></li>
<li class="py-2 border-bottom"><strong>Type</strong> <?php echo $row['type']; ?></li>
<li class="py-2 border-bottom" style="text-transform: capitalize;"><strong>Status</strong> <?php echo $row['status']; ?></li>
</ul>
<a href="package-details.php?package=<?php echo $row['id']; ?>" class="btn btn-block btn-outline-primary py-2">Book Now</a>
</div>
</div>
</div>
<?php
}
}
}
?>
</div>
</div>
</section>
<?php
include("footer.php");
?>