-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
142 lines (115 loc) · 4.13 KB
/
index.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
session_start();
error_reporting(0);
include 'include/config.php';
$uid=$_SESSION['uid'];
if(isset($_POST['submit']))
{
$pid=$_POST['pid'];
$sql="INSERT INTO tblbooking (package_id,userid) Values(:pid,:uid)";
$query = $dbh -> prepare($sql);
$query->bindParam(':pid',$pid,PDO::PARAM_STR);
$query->bindParam(':uid',$uid,PDO::PARAM_STR);
$query -> execute();
echo "<script>alert('Package has been booked.');</script>";
echo "<script>window.location.href='booking-history.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Yoga Management System</title>
<meta charset="UTF-8">
<meta name="description" content="Ahana Yoga HTML Template">
<meta name="keywords" content="yoga, html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Stylesheets -->
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/font-awesome.min.css"/>
<link rel="stylesheet" href="css/owl.carousel.min.css"/>
<link rel="stylesheet" href="css/nice-select.css"/>
<link rel="stylesheet" href="css/magnific-popup.css"/>
<link rel="stylesheet" href="css/slicknav.min.css"/>
<link rel="stylesheet" href="css/animate.css"/>
<!-- Main Stylesheets -->
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<!-- Page Preloder -->
<!-- Header Section -->
<?php include 'include/header.php';?>
<!-- Header Section end -->
<!-- Page top Section -->
<section class="page-top-section set-bg" data-setbg="img/page-top-bg.jpg">
<div class="container">
<div class="row">
<div class="col-lg-7 m-auto text-white">
<h2>Home</h2>
<p>Physical Activity can improve Your Health</p>
</div>
</div>
</div>
</section>
<!-- Pricing Section -->
<section class="pricing-section spad">
<div class="container">
<div class="section-title text-center">
<img src="img/icons/logo-icon.png" alt="">
<h2>Pricing plans</h2>
<p>Practice Yoga to perfect physical beauty, take care of your soul and enjoy life more fully!</p>
</div>
<div class="row">
<?php
$sql ="SELECT id, category, titlename, PackageType, PackageDuratiobn, Price, uploadphoto, Description, create_date from tbladdpackage";
$query= $dbh -> prepare($sql);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{
?>
<div class="col-lg-3 col-sm-6">
<div class="pricing-item begginer">
<div class="pi-top">
<h4><?php echo $result->titlename;?></h4>
</div>
<div class="pi-price">
<h3><?php echo htmlentities($result->Price);?></h3>
<p> <?php echo $result->PackageDuratiobn;?></p>
</div>
<ul>
<?php echo $result->Description;?>
</ul>
<?php if(strlen($_SESSION['uid'])==0): ?>
<a href="login.php" class="site-btn sb-line-gradient">Booking Now</a>
<?php else :?>
<!-- <a href="#" class="site-btn sb-line-gradient">Booking Now</a> -->
<form method='post'>
<input type='hidden' name='pid' value='<?php echo htmlentities($result->id);?>'>
<input class='site-btn sb-line-gradient' type='submit' name='submit' value='Booking Now' onclick="return confirm('Do you really want to book this package.');">
</form>
<?php endif;?>
</div>
</div>
<?php $cnt=$cnt+1; } } ?>
</div>
</div>
</section>
<!-- Footer Section -->
<?php include 'include/footer.php'; ?>
<!-- Footer Section end -->
<div class="back-to-top"><img src="img/icons/up-arrow.png" alt=""></div>
<!-- Search model end -->
<!--====== Javascripts & Jquery ======-->
<script src="js/vendor/jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.slicknav.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>