From cda96d31939c7ea727c114b162f43bb4d18314a2 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 8 May 2023 17:08:54 +0200 Subject: more website --- public/cart.php | 2 ++ public/global.css | 11 +++++++++++ public/img/product/1-thumb.jpg | Bin 0 -> 20762 bytes public/img/product/2-thumb.jpg | Bin 0 -> 16579 bytes public/img/product/3-thumb.jpg | Bin 0 -> 22837 bytes public/img/product/4-thumb.jpg | Bin 0 -> 23308 bytes public/index.php | 10 +++++++--- public/login.css | 25 +++++++++++++++++++++++++ public/login.php | 39 +++++++++++++++++++++++++++++++++++++++ public/product.css | 9 +++++++++ public/product.php | 33 ++++++++++++++++++++++++++++----- public/products.css | 10 +--------- public/products.php | 5 +++-- public/register.php | 38 ++++++++++++++++++++++++++++++++++++++ 14 files changed, 163 insertions(+), 19 deletions(-) create mode 100644 public/img/product/1-thumb.jpg create mode 100644 public/img/product/2-thumb.jpg create mode 100644 public/img/product/3-thumb.jpg create mode 100644 public/img/product/4-thumb.jpg create mode 100644 public/login.css create mode 100644 public/login.php create mode 100644 public/product.css create mode 100644 public/register.php (limited to 'public') diff --git a/public/cart.php b/public/cart.php index 1ad48cd..e1c7907 100644 --- a/public/cart.php +++ b/public/cart.php @@ -1,4 +1,6 @@ + + diff --git a/public/global.css b/public/global.css index 82dc446..c813911 100644 --- a/public/global.css +++ b/public/global.css @@ -20,3 +20,14 @@ body, html { text-decoration: none !important; color: currentColor; } + +.main { + margin-top: 2rem; +} + +.price::before { + content: "\20ac"; + margin-right: 0.3ex; + font-size: 80%; +} + diff --git a/public/img/product/1-thumb.jpg b/public/img/product/1-thumb.jpg new file mode 100644 index 0000000..ef1de8b Binary files /dev/null and b/public/img/product/1-thumb.jpg differ diff --git a/public/img/product/2-thumb.jpg b/public/img/product/2-thumb.jpg new file mode 100644 index 0000000..dc8de24 Binary files /dev/null and b/public/img/product/2-thumb.jpg differ diff --git a/public/img/product/3-thumb.jpg b/public/img/product/3-thumb.jpg new file mode 100644 index 0000000..e6a0b47 Binary files /dev/null and b/public/img/product/3-thumb.jpg differ diff --git a/public/img/product/4-thumb.jpg b/public/img/product/4-thumb.jpg new file mode 100644 index 0000000..2295dc2 Binary files /dev/null and b/public/img/product/4-thumb.jpg differ diff --git a/public/index.php b/public/index.php index 0f268cb..653962c 100644 --- a/public/index.php +++ b/public/index.php @@ -1,4 +1,5 @@ + @@ -11,9 +12,12 @@

hier zijn de aanbiedingen

diff --git a/public/login.css b/public/login.css new file mode 100644 index 0000000..c4826e2 --- /dev/null +++ b/public/login.css @@ -0,0 +1,25 @@ +.modal { + max-width: 300px; + margin: 0 auto; +} + +.modal form { + display: grid; + margin-block-end: 0; +} + +.modal input { + margin-bottom: 16px; + padding: 6px 8px; + border-radius: 8px; + border: 2px solid canvastext; + background-color: transparent; +} + +.modal input[type="submit"] { + background-color: canvastext; + color: canvas; + font-size: 1rem; + font-weight: bold; + cursor: pointer; +} diff --git a/public/login.php b/public/login.php new file mode 100644 index 0000000..22ac164 --- /dev/null +++ b/public/login.php @@ -0,0 +1,39 @@ + + + + + + + + login + + + + +
+

Inloggen

+ +
+ + + diff --git a/public/product.css b/public/product.css new file mode 100644 index 0000000..5b718c9 --- /dev/null +++ b/public/product.css @@ -0,0 +1,9 @@ +.twocolumn { + display: grid; + grid-template-columns: 200px 1fr; + gap: 16px; +} + +.twocolumn .left { + text-align: center; +} diff --git a/public/product.php b/public/product.php index 8733562..3e6a89f 100644 --- a/public/product.php +++ b/public/product.php @@ -1,17 +1,40 @@ + +prepare("select ID as id, image, price, name, description from webs.product where ID = ?"); +$statement->bind_param("i", $_GET['id']); +if (!$statement->execute()) refuse(); +$res = $statement->get_result(); +if (!mysqli_num_rows($res)) refuse(); +$product = $res->fetch_object(); +?> dit is product +
-

yeah product

- - 3,45 - courgette - Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla dignissimos laboriosam voluptatem facilis tempore quos, asperiores eos molestiae voluptates commodi animi enim quae deleniti? Ratione optio eligendi rem eveniet reiciendis. +
+
+ id."-thumb.jpg" ?>" alt=""> +
+
+

name ?>

+ price ?> + description ?> +
+ +
+
+
diff --git a/public/products.css b/public/products.css index 7a4f3ab..4d7342f 100644 --- a/public/products.css +++ b/public/products.css @@ -21,12 +21,4 @@ } .product span { display: block; } - -.product .price::before { - content: "\20ac"; - margin-right: 0.3ex; - font-size: 80%; -} -.product .price { - font-size: 1.5rem; -} +.product .price { font-size: 1.5rem; } diff --git a/public/products.php b/public/products.php index e9c7cdf..bffaeb0 100644 --- a/public/products.php +++ b/public/products.php @@ -2,9 +2,10 @@ img ? "/img/product/$product->id-thumb.jpg" : "/img/placeholder.png"; echo <<<"EOF" - + $product->price $product->name @@ -23,7 +24,7 @@ EOF;

lijst met producten:

query("select ID as id, image_path as img, price, name from webs.product"); + $res = $cursor->query("select ID as id, image as img, price, name from webs.product"); while ($product = $res->fetch_object()) product_template($product); ?>
diff --git a/public/register.php b/public/register.php new file mode 100644 index 0000000..9f04b1c --- /dev/null +++ b/public/register.php @@ -0,0 +1,38 @@ + + + + + + + registeren + + + + +
+

Registreren

+ +
+ + + -- cgit v1.2.3