forked from robinrawat/bidding-website
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
154 lines (121 loc) · 4.48 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
143
144
145
146
147
148
149
150
151
152
153
154
<?php
SESSION_START();
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="donkeybanks.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div style="background-color:grey"><font style=" color:white; font-family:comic sans ms; margin-left:50%;">Welcome
<?php
$con=mysqli_connect('localhost','root','robinrawat');
mysqli_select_db($con,'auction');
$c=$_SESSION['user'];
$sql=("SELECT * FROM login where email='".$c."';");
$records=mysqli_query($con,$sql);
$employ=mysqli_fetch_assoc($records);
echo '<font style="background-color:blue;">';
echo "\t".$employ['username'];
echo '</font>'
?>
</font></div>
<div id="container" style="margin-top:20px;height:20px;">
<header id="border">
<div id="logo"><a herf="#">GEU AUCTION</a></div>
<ul>
<li><a href="index.php"><font face="Comic sans MS"><i class="fa fa-home" style="font-size:40px;"></i></font></a></li>
<li><a href="search.php"><font face="Comic sans MS">Search <i class="fa fa-search"></i></font></a>
</li>
<li><a href="about_us.php"><font face="Comic sans MS">About Us</i></font></a>
</li>
<li><a href="contact.php"><font face="Comic sans MS">☎ Contact Us</font></a></li>
<li><a href="index1.php"><font face="Comic sans MS">Log Out</font></a>
</li>
</ul>
</div>
<form id="search" method="get" action="http://www.google.com/search">
<input type="text" name=q size=31 maxlength=255 placeholder="search web">
<button><i class="fa fa-search"></i></button>
</form>
<hr></hr>
</header>
<article>
<div id="box1"style="margin-top:50px;"><a href="upload_item.php">upload item</a></div>
<div id="box2"><a href="#"></a></div>
<div id="box5"><a href="#"></a></div>
<div id="box3"><a href="#"></a></div>
<div id="box4"><a href="#"></a></div>
<div id="box5"><a href="#"></a></div>
<div id="box6" style="margin-top:-610px; height:2000px;">
<h1>ITEM ON AUCTION</h1>
<?php
//$_SESSION['user']=$_POST['uemail'];
$con=mysqli_connect('localhost','root','robinrawat','auction');
$sql=("SELECT * FROM image ");
$records=mysqli_query($con,$sql);
while($employ=mysqli_fetch_assoc($records))
{
$id=$employ['item_id'];
$value=$employ['img'];
$p_name=$employ['iname'];
$base_price=$employ['b_amount'];
echo '<tr>
<td><a href="bid.php?idd='.$id.'">'.'<img src="images/'.$value.'" width="150" height="170" padding:"1px" border:"1px">'.' '.'</img>'.'</a></td>
</tr>';
echo " <br>";
$query=("select MAX(bid) AS max from bidder_table WHERE item_id=$id");
$result=mysqli_query($con,$query);
if($result === FALSE) {
die(mysqli_error($con));
}
$row=mysqli_fetch_assoc($result);
$largestbid=$row['max'];
echo "<div id='rightdiv' style='margin-bottom:50px;'>";
echo " <label >";
echo " NAME: $p_name";
echo " </label>";
echo "<br>";
echo "<label >";
echo " BASE PRICE: $base_price";
echo "</label>";
echo "<br>";
echo "<label >";
echo " HIGHEST BID: $largestbid";
echo " </label>";
echo "<br>";
echo "</div>";
}
?>
</div>
</article>
<br>
<br>
<br>
<footer style="margin-top:2000px;">
<table align="center">
<tr>
<th>CONTACT US</th>
<th>QUICK LINKS</th>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>☎ +918390784614</br>for BIDDING PROBLEM</td>
<td><a href="faq.php">FAQ</a></td>
</tr>
<tr>
<td>☎ +918390784615<br>for OTHER QUERY</td>
<td><a href="terms.php">Terms & Conditions</a></td>
</tr>
</table>
<div id="image1"><img src="img4.png"></div>
<pre>
</pre>
<hr></hr>
<p>Copyright © 2017 -All rights reserved-<br/>Developed by ROBIN AND RISHAB</p>
</footer>
</body>
</html>