-
Notifications
You must be signed in to change notification settings - Fork 2
/
planinfo.php
243 lines (197 loc) · 6.71 KB
/
planinfo.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<?php
session_start();
if (!isset($_SESSION['email']))
{
header("location:index.php");
}
require_once 'config.php'
;?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Home</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link href="vendor/simple-line-icons/css/simple-line-icons.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/style.min.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
<style type="text/css">
.razorpay-payment-button
{
background-image: linear-gradient(45deg,#5489ff,#8e60ff);
color: white;
padding: 12px 40px;
margin: 20px;
border-radius: 4px;
border: none;
}
</style>
</head>
<?php
//session_start();
require("head.php");
require("connection.php");
$sql="SELECT name,cost,id,description from plans where id=2";
$res = $pdo->query($sql);
$row = $res->fetch();
?>
<!-- Header -->
<section class="hero space-md">
<div class="container">
<div class="row d-flex align-items-center justify-content-center text-center">
<div class="col-md-10">
<div class="title-content-warpper">
<h1><?php echo $row['name'] ?> : $<?php echo $row['cost']; ?> </h1>
</div>
<h4 class="mt-3 mb-3"> <?php echo $row['description']; ?> </h4>
<?php
if (isset($_SESSION['email']))
{
echo "<p><a href=\"login/index.php\" class=\"btn btn-lg btn-gradient\" >Pay for Subscription!</a></p>";
?>
<form action="payment.php" method="POST">
<script
src="https://checkout.razorpay.com/v1/checkout.js"
data-key="rzp_test_nM5VWM1iiyUfvS"
data-amount="<?php echo $row['cost']; ?>00"
data-currency="INR"
//data-buttontext="Pay"
data-name="<?php echo $row['name']; ?>"
data-description="<?php echo $row['description']; ?>"
data-prefill.name="rounak"
data-prefill.email="<?php echo $_SESSION['email']; ?>"
data-theme.color="#F37254"
></script>
<input type="hidden" custom="Hidden Element" name="hidden">
</form>
<?php
}
?>
</div>
</div>
</div>
</section>
<section class="text-center w-90 border-bottom border-left border-right">
<div class="container">
<div class="row">
</div>
<!--end of container-->
</section>
<!-- Pricing section -->
<div class="space-md" id="pricing">
<div class="container">
<div class="row">
<?php
// $i=1;
// function printResultSet(&$rowset, $i)
// {
// $key=0;
// foreach ($rowset as $row)
// {
// $count=1;
// echo "<div class=\"col-md-4\">
// <div class=\"card pricing-v3 p-md-5 p-sm-3 text-center\">
// <div class=\"v3-row\">";
// foreach ($row as $col)
// {
// if($count==1)
// {
// echo "<p class=\"mb-3\">".$col."</p>";
// $count++;
// continue;
// }
// if($count==2)
// {
// echo "<h3 class=\"display-3 font-weight-bold\">$".$col."</h3></div>";
// $count++;
// echo "<a class=\"btn btn-outline-primary\" href=\"#\">Start Free Trial</a>";
// continue;
// }
// if($count==3)
// {
// if(isset($_SESSION['email']))
// {
// echo "<a class=\"btn btn-outline-primary\" href=\"planinfo.php?id=".$col."\">Start Free Trial</a>";
// }
// if(!isset($_SESSION['email']))
// {
// echo "<a class=\"btn btn-outline-primary\" href=\"login/index.php\">Start Free Trial</a>";
// }
// $count++;
// continue;
// }
// if($count==4)
// {
// echo "<div class=\"mt-4\"><p class=\"\">".$col."</p></div></div></div>";
// continue;
// }
// }
// echo "</a>";
// }
// }
// try
// {
// $i=0;
// require("connection.php");
// $sql="SELECT name,cost,id,description from plans where status=1";
// $stmt = $pdo->query($sql);
// do
// {
// $rowset = $stmt->fetchAll(PDO::FETCH_NUM);
// if ($rowset)
// {
// printResultSet($rowset, $i);
// echo $i;
// }
// $i++;
// }
// while ($stmt->nextRowset());
// }
// catch(Exception $e)
// {
// echo $e;
// }
?>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="pt-5 pb-1 bg-dark">
<div class="container">
<div class="row">
<div class="col-12">
<hr class="my-2">
</div>
<div class="col-lg-auto mt-4">
<h5 class="mb-4 text-white"><a href="http://www.paperplant.in/">paperplant.in</a></h5>
</div>
<div class="col-lg-auto ml-lg-auto mt-4"><a class="d-inline-block mb-3 mr-4 text-light" href="#pricing">Pricing</a><a class="d-inline-block mb-3 mr-4 text-light" href="#">About</a>
<a class="color-4 mr-4" href="#"></a>
</div>
</div>
<!--/.row-->
</div>
<!--/.container-->
</footer>
<!-- Footer -->
<!-- <footer class="footer text-center">
<div class="container"> </div>
</footer> -->
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for this template -->
<script src="js/style.min.js"></script>
</body>
</html>