summaryrefslogtreecommitdiffstats
path: root/productdetails.php
blob: c840421039b959232a185ab6a273957a41bcfa9b (plain)
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
<?php
if(isset($_GET['id']))
{
	$id = $_GET['id'];
}
else
{
	header('Location: categories.php');
}
require_once('vendor.inc.php');

$product = ProductQuery::create()->findOneById($id);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Productdetails</title>
<link rel="stylesheet" type="text/css" href="styles/style.css">
</head>
<body>
	<header><h1><?php echo $product->getName(); ?></h1></header>
	<nav>
		<dl>
			<dt><a href="contact.html">Contact us</a></dt>
			<dt><a href=".">Home</a></dt>
			<dt><a href="categories.php">Categories</a></dt>
			<dt><a href="login.html">Login</a></dt>
		</dl>
	</nav>
	<div id="content">
		<form>
			<div class="row">
				<label for="name"><u>N</u>ame:</label>
				<input class="formw" type="text"
					placeholder="Name" id="name" name="name" accesskey="n"
					maxlength="100" readonly value="<?php echo $product->getName(); ?>">
			</div>
			<div class="row">
				<label for="price"><u>P</u>rice (Euro):</label>
				<input class="formw" type="text"
					placeholder="Price (Euro)" id="price" name="price" accesskey="p"
					maxlength="13" readonly value="<?php echo $product->getPrice(); ?>">
			</div>
			<div class="row">
				<label for="width"><u>W</u>idth (mm):</label>
				<input class="formw" type="text"
					placeholder="Width (mm)" id="width" name="width" accesskey="w"
					maxlength="11" readonly value="<?php echo $product->getWidth(); ?>">
			</div>
			<div class="row">
				<label for="height"><u>H</u>eight (mm):</label>
				<input class="formw" type="text"
					placeholder="Height (mm)" id="height" name="height" accesskey="h"
					maxlength="11" readonly value="<?php echo $product->getHeight(); ?>">
			</div>
			<div class="row">
				<label for="desc"><u>D</u>escription:</label>
				<textarea class="formw" placeholder="Description" id="desc" name="desc"
					accesskey="d" maxlength="1000" readonly rows="5"><?php echo $product->getDescription(); ?></textarea>
			</div>
			<div class="spacer">&nbsp;</div>
		</form>
		<div class="spacer"></div>
	</div>
	<footer>Copyright by SomeCompany Ltd.</footer>
</body>
</html>



<?php
require_once('vendor.inc.php');
?>