forked from rmzn17/Online-Bidding-System-PHP-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBidding.php
More file actions
142 lines (97 loc) · 2.88 KB
/
Bidding.php
File metadata and controls
142 lines (97 loc) · 2.88 KB
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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bidding System</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="CSS/Bidding.css">
<style>
body {
font-family: Agency FB;
}
</style>
<script type="text/javascript">
function bid(id)
{
if(confirm('Sure Participate ?'))
{
window.location='UserBid.php?bid='+id
}
}
</script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Kinbo.Com</a>
</div>
<ul class="nav navbar-nav">
<li><a href="UserProfile.php"><b>    Home</b></a></li>
<li><a href="UserPost.php"><b>Post</b></a></li>
<li><a href="MyPost.php"><b>MyPost</b></a></li>
<li><a href="MyBid.php"><b>MyBid</b></a></li>
<li><a href="UUpdate.php"><b>Update Profile</b></a></li>
<li class="active"><a href="Bidding.php"><b>Bidding</b></a></li>
<li><a href="UNotification.php"><b>Notification</b></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="ULogout.php"><span class="glyphicon glyphicon-user"></span> <b>Logout</b></a></li>
</ul>
</div>
</nav>
<div class="bodysection templete clear">
<div class="mainsection templete clear">
<table>
<?php
$Server="localhost";
$username="root";
$psrd="";
$dbname = "Bidding";
$connection= mysqli_connect($Server,$username,$psrd,$dbname);
$uname=$_SESSION['uname'];
$query="select * from product where ProductStatus='No' and UserName!='$uname'";
$Result=mysqli_query($connection,$query);
$break=0;
while ($row=mysqli_fetch_array($Result)) {
if($break==2){
echo "<tr>";
$break=0;
}
$datenow = date("Y-m-d");
$sdate = $row['StartDate'];
if($sdate<=$datenow){
echo'<td>';
echo"<img src='".$row['Image']."' width='200px' height='220px'>";
echo'</td>';
echo'<td>';
echo "<h1> Description</h1>";
echo "<h3>";
echo $row['ProductName'];
echo "</h3>";
echo $row['Description'];
echo "<br>";
echo "<b>";
echo "Price: ";
echo $row['Price'];
echo "</b>";
echo "<br><br>";
?>
<a href="javascript:bid(<?php echo $row[0]; ?>)"> <img src="Image/bidnow.png" width="50px" height="50px" alt="Bid" /> <span style="color: green;font-size: 20px"><b>Running</b></span> </a>
<?php
$break++;
echo'</td>';
}
}
?>
</table>
</div>
</div>
</body>
</html>