-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathrl2.php
208 lines (184 loc) · 10.2 KB
/
rl2.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
<?php
session_start();
?>
<?php
if($_SESSION['login']==0) {
header("Location: https://localhost/#.html");
}
else{
// header("Location: https://localhost/register.php");
}?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- <meta charset="utf-8"> -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Shop Homepage - Start Bootstrap Template</title>
<!-- Bootstrap Core CSS -->
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./css/bootstrap-material-design.css">
<!-- Custom CSS -->
<link href="./css/shop-homepage.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<div class="navbar navbar-default navbar-fixed-top navtrans">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://localhost/home.html">WD</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://localhost/rl1.php">Buy </a></li>
<li><a href="https://localhost/register.php">Sell </a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Account
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://localhost/#.html">Login</a></li>
<li><a href="https://localhost/#.html">#</a></li>
<li><a href="https://localhost/php/logout.php">LogOut</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<?php
include 'rl.php';
$id = $_POST['id1'];
$sql= mysql_query("SELECT Image_Right,Image_Front,Image_Left,Image_Rear,Image_Inside,maker,model,state,price,year,kms,vid,phone_number,fuel FROM vehicles WHERE ( vid = '$id' )");
$row = mysql_fetch_row($sql);
$recc=mysql_query("SELECT Image_Right,maker,model,state,price,year,kms,vid FROM vehicles WHERE state like '%{$row[7]}%' AND price<='$row[8]' AND vid!= '$row[11]' order by price desc limit 3");
?>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="row carousel-holder">
<div class="col-md-12 thumbnail">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
</ol>
<div class="carousel-inner" style="height: 360px;">
<div class="item active">
<?php echo '<img class="slide-image" src="./uploads/'.$row[0].'.jpg" alt="">';?>
<!-- <img class="slide-image" src="<?php //echo './uploads/'.$row[0].'';?>" alt=""> -->
</div>
<div class="item">
<?php echo '<img class="slide-image" src="./uploads/'.$row[1].'.jpg" alt="">';?>
<!-- <img class="slide-image" src="<?php //echo './uploads/'.$row[1].'';?>" alt=""> -->
</div>
<div class="item">
<?php echo '<img class="slide-image" src="./uploads/'.$row[2].'.jpg" alt="">';?>
<!-- <img class="slide-image" src="<?php //echo './uploads/'.$row[2].'';?>" alt=""> -->
</div>
<div class="item">
<?php echo '<img class="slide-image" src="./uploads/'.$row[3].'.jpg" alt="">';?>
<!-- <img class="slide-image" src="<?php //echo './uploads/'.$row[3].'';?>" alt=""> -->
</div>
<div class="item">
<?php echo '<img class="slide-image" src="./uploads/'.$row[4].'.jpg" alt="">';?>
<!-- <img class="slide-image" src="<?php //echo './uploads/'.$row[4].'';?>" alt=""> -->
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
<br><br>
<center><h2><?php echo $row[5]; echo ' ';
echo $row[6];?></h2>
<h4>Price: <b><?php echo $row[8];?></b></h4></center><hr>
<center><h2>Seller's Details: </h2>
<h4>User id:<b><?php echo $row[7];?></b></h4>
<h4><b>Phone no:<?php echo $row[12];?></b></h4></center><hr>
<center><div class="col-md-3"><span class="glyphicon glyphicon-scale btn-lg" aria-hidden="true"></span><br>Fuel:<br><?php echo $row[13];?></div></center>
<center><div class="col-md-3"><span class="glyphicon glyphicon-calendar btn-lg" aria-hidden="true"></span><br>Year of Purchase:<br><?php echo $row[9];?></div></center>
<center><div class="col-md-3"><span class="glyphicon glyphicon-road btn-lg" aria-hidden="true"></span><br>Kms. driven:<br><?php echo $row[10];?></div></center>
<center><div class="col-md-3"><span class="glyphicon glyphicon-map-marker btn-lg" aria-hidden="true"></span><br>Location:<br><?php echo $row[7];?></div></center>
</div>
<br><br>
</div>
</div><div class="col-md-1"></div>
<div class="col-md-3">
<div class="row">
<?php
while($recrows = mysql_fetch_array($recc))
{
echo '
<div class="thumbnail">
<img src="./uploads/'.$recrows[0].'.jpg" alt=""class="cropper1 img-responsive" style="height: 150px; ">
<div class="caption">';
echo '<h4 class="pull-right">';
echo $recrows[4];
echo '</h4>';
echo '<h4>';
echo $recrows[1];echo ' ';
echo $recrows[2];
echo '</h4><br>';
echo '<center><div class="col-md-3"><span class="glyphicon glyphicon-scale" aria-hidden="true"></span><br>';
echo 'fuel';
echo '</div></center>';
echo '<center><div class="col-md-3"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span><br>';
echo $recrows[5];
echo '</div></center>';
echo '<center><div class="col-md-3"><span class="glyphicon glyphicon-road" aria-hidden="true"></span><br>';
echo $recrows[6];
echo '</div></center>';
echo '<center><div class="col-md-3"><span class="glyphicon glyphicon-map-marker" aria-hidden="true"></span><br>';
echo $recrows[3];
echo '</div></center>';
echo '</div>
</div>';
}?>
</div>
</div>
</div>
<!-- /.container -->
<div class="container">
<hr>
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<p>Copyright © Your Website 2014</p>
</div>
</div>
</footer>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!--<script src="./js/jquery.js"></script>-->
<script src="./js/material.min.js"></script>
<script src="./js/ripples.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="./js/bootstrap.min.js"></script>
<script type="text/javascript">
$("#carousel-example-generic").carousel();
</script>
</body>
</html>