-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlookup.php
139 lines (95 loc) · 4.93 KB
/
lookup.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
<?php
Session_start();
?>
<!DOCTYPE html>
<head>
<title>Argjentina Bike Sklep</title>
<link rel="SHORTCUT ICON" href="images/favicon.png" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="eng-GB" />
<meta http-equiv="Cache-control" content="private" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta name="robots" content="all" />
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
background-color: #101010;
}
.style2 {font-size: 12}
.style3 {
font-size: 10px;
font-style: italic;
}
-->
</style></head>
<body>
<!-- Banner settings -->
<center><table width="951" border="1">
<thead>
<tr>
<th height="202" colspan="2" rules="all" background="images/logo.png"></th>
</tr>
</thead>
<tfoot>
<tr>
<!-- Footer settings - Left side -->
<th height="100" colspan="2" background="images/footer.png" >
<div align="left"> <font color="white">Powered by</font> <font color="CornflowerBlue">R</font><font color="white">eday</font></a></div>
<div align="left"> <font color="white">Theme by</font> <font color="CornflowerBlue">J</font><font color="white">acek</font></a></div><br><br>
<!-- Footer settings - Right side -->
<div align="right"><a style="text-decoration:none;" href="backdoor.html"><font
color="CornflowerBlue">A</font><font color="white">dmin</font> <font color="CornflowerBlue">P</font><font color="white">anel</font></a>
</tr>
</tfoot>
<tbody>
<!-- Horizontal navigation - Left side -->
<tr>
<th height="30" colspan="1" background="images/nav_background.jpg">
<div align="left"><a style="text-decoration:none;" href="index.php"><font color="CornflowerBlue">H</font><font color="white">ome</font></a> -
<a style="text-decoration:none;" href="mailto:[email protected]"><font color="CornflowerBlue">C</font><font color="white">ontact</font></a> -
<a style="text-decoration:none;" href="Products.php"><font color="CornflowerBlue">P</font><font color="white">roducts <font color="CornflowerBlue">B</font>ikes</font></a> -
<!-- Horizontal navigation - Right side -->
<th><div align="center"><a style="text-decoration:none;" href="basket.html"><font color="CornflowerBlue">B</font><font color="white">asket</font></a> -
<a style="text-decoration:none;" href="login_register.html"><font color="CornflowerBlue">L</font><font color="white">ogin </font><font color="white">/ </font><font color="CornflowerBlue">R</font><font color="white">egister</font></a>
- <a style="text-decoration:none;" href="logout.php"><font color="CornflowerBlue">L</font><font color="white">ogout</font></a>
</div>
</th>
</tr>
<tr>
<!-- Body page -->
<td width="711" valign="top" style="background-color: #FFFFFF" >
<?php
//Connection to DB
$mongoClient = new MongoClient();
$db = $mongoClient->Products;
$collection = $db->catalog;
//Recieve Data
$search_data = filter_input(INPUT_GET, 'search_field', FILTER_SANITIZE_STRING);
//Save query
$query = array('name' => $search_data);
$count = $collection -> findOne($query);?>
</br>
<strong><?php echo $count['name'] ?></strong><br>
<img src="<?php echo $count['image_url'] ?>" height="316" width="500"><br>
<strong>Stock: <?php echo $count['stock_count'] ?></strong><br><br>
<strong>About this product</strong>
<p><?php echo $count['description'] ?></p><br><br>
<strong>Delivery</strong> - Fast and Free<br><br>
<strong>Price</strong> - £<?php echo $count['price'] ?><br><br>
<br><br><br>
</td>
<!-- Vertical Navigation -->
<td width="240" valign="top" background="images/nav_background.jpg">
<center>
<span style="color: CornflowerBlue"><b> ------</b></span> <span style="color: CornflowerBlue"><b>R</b></span><span style="color: white"><b>ecommended</b></span> <span style="color: CornflowerBlue"><b>B</b></span><span style="color: white"><b>ikes</b></span> <span style="color: CornflowerBlue"><b>------ </b></span><br><br>
<br>
<br>
</center>
</td>
</tr>
</tbody>
</table></center>
</body>
</html>