-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplay.php
More file actions
103 lines (93 loc) · 3.1 KB
/
display.php
File metadata and controls
103 lines (93 loc) · 3.1 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
<!DOCTYPE html>
<html>
<head>
<title>6x6 Mixer Trucks - BrownEquipment - Brown Equipment llc</title>
<?php
require("header.php");
?>
<link href="admin/adminstyles.css" type="text/css" rel="stylesheet" />
</head>
<?php //connect to database
require('admin/connection.php');
?>
<?php
require('nav.php');
?>
<?php
require('files/formatter.php');
?>
<div class="content-wrap">
<div class="container">
<div class="main-wrap skinny">
<div id='wsite-content' class='wsite-elements wsite-not-footer'>
<?php
$sql = $conn->prepare('SELECT item.*, locations.State FROM item, locations WHERE Subtype="aluminum" AND item.Location=locations.ID');
$sql = $conn->prepare('SELECT item.*, locations.State FROM item, locations WHERE item.ID=? AND item.Location=locations.ID');
$sql->bind_param("i", $_GET["id"]);
if(!$sql->execute()){
echo $sql->error;
}
$result = $sql->get_result();
$row = $result->fetch_assoc();
?>
<?php
echo '<table class="tableElements displayTable">';
echo '<tr>';
echo '<th>';
echo 'Quantity';
echo '</th>';
echo '<th>';
echo 'Name';
echo '</th>';
echo '<th>';
echo 'Description';
echo '</th>';
echo '<th>';
echo 'Price';
echo '</th>';
echo '<th>';
echo 'State';
echo '</th>';
echo '</tr>';
echo '<tr class="tableRowDark">';
echo '<td>';
echo $row['Quantity'];
echo '</td>';
echo '<td>';
echo $row['Year'] . " " . $row['Make'] . " " . $row['Model'];
echo '</td>';
echo '<td style="text-align: left;">';
echo $row['Description'];
echo '</td>';
echo '<td>';
echo format_to_money($row['Price']);
echo '</td>';
echo '<td>';
echo $row['State'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan=5>';
echo '<img class="display_img" src="' . "uploads/" . ((file_exists("uploads/" . $row["Picture_URL"]) && ($row["Picture_URL"] != ""))? $row["Picture_URL"] : "BrownEquipmentDefault.png") . '" />';
echo '</td>';
echo '</tr>';
// echo '<ul style="float: left;">';
// if($row["Type"] != ''){ echo '<li>Type: ' . $row["Type"] . '</li>'; }
// if($row["Subtype"] != ''){ echo '<li>Subtype: ' . $row["Subtype"] . '</li>'; }
// if($row["Make"] != ''){ echo '<li>Make: ' . $row["Make"] . '</li>'; }
// if($row["Model"] != ''){ echo '<li>Model: ' . $row["Model"] . '</li>'; }
// if($row["Price"] != ''){ echo '<li>Price: $' . $row["Price"] . '</li>'; }
// if($row["Description"] != ''){ echo '<li>Description: ' . $row["Description"] . '</li>'; }
// echo '</ul>';
echo '</table>';
?>
</div>
</div>
</div>
<!-- end container -->
</div>
<!-- end main-wrap -->
<?php
require('footer.php');
?>
<html>