diff options
Diffstat (limited to 'productdetails.php')
| -rw-r--r-- | productdetails.php | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/productdetails.php b/productdetails.php new file mode 100644 index 0000000..f5f78f4 --- /dev/null +++ b/productdetails.php @@ -0,0 +1,75 @@ +<?php +use Base\ProductQuery; +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"> </div> + </form> + <div class="spacer"></div> + </div> + <footer>Copyright by SomeCompany Ltd.</footer> +</body> +</html> + + + +<?php +require_once('vendor.inc.php'); +?>
\ No newline at end of file |
