-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathviewsellvehicle.php
93 lines (82 loc) · 2.35 KB
/
viewsellvehicle.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
<?php
include("header.php");
include("sidebar.php");
include("dbconnection.php");
if(isset($_GET['delid']))
{
$result = mysql_query("delete from vehicle where sellno = '$_GET[delid]'");
}
$result= mysql_query("select * from vehicle");
?>
<div id="main">
<a name="TemplateInfo"></a>
<h1>Sell Vehicle</h1>
<?php
if($ctins == 1)
{
echo "<center><b>Employees account created successfully...</b></center><br>";
echo "<center><b><a href='emplogin.php'>Click here to Login.</a></b></center>";
}
else
{
?>
<form id="form1" name="form1" method="post" action="">
<table width="514" border="1">
<tr>
<th width="33" height="42" scope="col">SL <br />
No.</th>
<th width="102" scope="col">Image</th>
<th width="208" scope="col">Vehicle info</th>
<th width="55" scope="col">Other<br />
Info</th>
<th width="82" scope="col">Vehicle <br />
status</th>
<th width="120" scope="col">Actions</th>
</tr>
<?php
$i=1;
while($arrrec= mysql_fetch_array($result))
{
echo " <tr>
<td scope='col'> $i</td>
<td scope='col'> <img src='upload/$arrrec[images]' height='75' width='100' > </td>
<td scope='col'><b>Vehicle Name:</b> $arrrec[vehname]<br />
<b>Vehicle model:</b> $arrrec[model]<br />
<b> Brand:</b> $arrrec[brand]<br />
<b>Estimated price:</b> $arrrec[estmdprice]<br />
</td>
<td scope='col'><a href='viewsellvehiclemore.php?vehicleid=$arrrec[sellno]'>More</a></td>
<td scope='col'> $arrrec[status]</td>
<td scope='col'>";
if($arrrec[status] == 'Pending')
{
?>
<?php echo "<a href='sellvehicle.php?updtid=$arrrec[sellno]'>Update</a>|<a href='viewsellvehicle.php?delid=$arrrec[sellno]'>Delete</a>";
}
else if($arrrec[status] == 'Accepted')
{
?>
<?php echo "Purchased</td>";
}
else
{
echo "Rejected";
}
?>
<?php "</tr>";
$i++;
}
?>
</table>
</form>
<?php
}
?>
<p> </p>
<br />
</div>
<!-- wrap ends here -->
</div>
<?php
include("footer.php");
?>