-
Notifications
You must be signed in to change notification settings - Fork 2
/
try1.php
158 lines (138 loc) · 4.8 KB
/
try1.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
<!DOCTYPE html>
<html>
<title>PaperPlant</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 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">
<link rel="stylesheet" href="css/mycss.css">
<?php
session_start();
require("head.php");
?>
<!-- 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\">";
//<a href=\"plandetail.php?id=".$key."\">
foreach ($row as $col)
{
if($count==1)
{
echo "<div class=\"mt-4\"><img src='admin/plantimage/".$col."' height=\"200\" width=\"200\"></div>";
$count++;
continue;
}
if($count==2)
{
echo "<p class=\"mb-3\">".$col."</p>";
$count++;
continue;
}
if($count==3)
{
echo "<h3><b>Rs. ".$col." per plant</b></h6>";
// echo "<a class=\"btn btn-outline-primary\" href=\"#\">Start Free Trial</a>";
$count++;
continue;
}
if($count==4)
{
echo "<p class=\"mb-3\">".$col." plant</p></div></div></div>";
// echo "<a class=\"btn btn-outline-primary\" href=\"#\">Start Free Trial</a>";
continue;
}
}
//echo "</a>";
}
}
try
{
// $i=0;
require("connection.php");
$sql="SELECT image, Name, Sell_Price, Location from plant 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>
<!-- Footer -->
<footer id="footer">
<div class="pp-row pp-black">
<div class="pp-third" style="font-size:1.5vw">
Download The App Now
<br>
<a href="#"><img src="Images/gplay.png" width="25%"></a>
<a href="#"><img src="Images/astore.png" width="22%"></a>
</div>
<div class="pp-third pp-center" style="font-size:1.5vw">
<a href="#" style="color:#FFFFFF">About Us</a>
<br>
<a href="#" style="color:#FFFFFF">Privacy Policies</a>
<br>
<a href="#" style="color:#FFFFFF">Careers</a>
<br>
<a href="#" style="color:#FFFFFF">Advertise With Us</a>
</div>
<div class="pp-third" style="font-size:1.5vw">
                      
                    Join Us <br>
<a href="#" ><img src="Images/google.png" width="15%" style="float:right"></a>
<a href="#"><img src="Images/twitter.png" width="15%" style="float:right"></a>
<a href="#"><img src="Images/facebook.png" width="15%" style="float:right"></a>
</div>
</div>
</footer>
<div style=" background-color:#dd4b39; color:white ;font-size:14px;">
<div style="text-align:center;">© - Paper Plant Technologies</div>
</div>
</body>
</html>
if($count==3)
{
if(isset($_SESSION['email']))
{
echo "<a class=\"btn btn-outline-primary\" href=\"planinfo.php?id=".$col."\">Sell</a>";
// echo "<a class=\"btn btn-outline-primary\" href=\"planinfo.php?id=".$col."\">Details</a>";
}
if(!isset($_SESSION['email']))
{
echo "<a class=\"btn btn-outline-primary\" href=\"login/index.php\">Sell</a>";
}
$count++;
//$key=$col;
continue;
}