From d99d91293fe9e9ad683bbd079848df4031f0a77a Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 13 May 2023 14:35:04 +0200 Subject: add links to admin pages + more login --- public/admin-category.php | 15 +++++++++++++++ public/admin-product.php | 15 +++++++++++++++ public/cart.php | 2 +- public/global.css | 6 ++++++ public/login.php | 9 +++------ public/nav.css | 14 +++++++++++--- public/navbar.php | 16 ++++++++++++---- public/products.php | 14 ++++++++++++++ 8 files changed, 77 insertions(+), 14 deletions(-) create mode 100644 public/admin-category.php create mode 100644 public/admin-product.php (limited to 'public') diff --git a/public/admin-category.php b/public/admin-category.php new file mode 100644 index 0000000..d65fc9e --- /dev/null +++ b/public/admin-category.php @@ -0,0 +1,15 @@ + + + + + + super secret admin page + + + +
+

admin

+
+ + + diff --git a/public/admin-product.php b/public/admin-product.php new file mode 100644 index 0000000..d65fc9e --- /dev/null +++ b/public/admin-product.php @@ -0,0 +1,15 @@ + + + + + + super secret admin page + + + +
+

admin

+
+ + + diff --git a/public/cart.php b/public/cart.php index f953880..34cccbb 100644 --- a/public/cart.php +++ b/public/cart.php @@ -48,7 +48,7 @@ EOF;
prepare("select product.id, product.name, product.price, product.image, cart.count from cart join customer on customer.id = cart.customer join product on product.id = cart.product where customer.name = ?"); + $statement = $cursor->prepare("select product.id, product.name, product.price, product.image, cart.count from cart join user on user.id = cart.user join product on product.id = cart.product where user.name = ?"); $statement->bind_param("s", $username); if (!$statement->execute()) break; $res = $statement->get_result(); diff --git a/public/global.css b/public/global.css index e3fcea0..4add154 100644 --- a/public/global.css +++ b/public/global.css @@ -73,3 +73,9 @@ body, html { font-weight: bold; cursor: pointer; } + +.center { + text-align: center; +} + +.d-ib { display: inline-block; } diff --git a/public/login.php b/public/login.php index a8a1021..19d9d17 100644 --- a/public/login.php +++ b/public/login.php @@ -4,12 +4,9 @@ diff --git a/public/nav.css b/public/nav.css index 11815c1..d5f2de3 100644 --- a/public/nav.css +++ b/public/nav.css @@ -3,9 +3,6 @@ nav { border-bottom: 2px dashed currentColor; } -nav span { vertical-align: middle; } -nav a { margin-right: 16px; } - nav .site-icon { height: 48px; display: inline-block; @@ -22,3 +19,14 @@ nav .site-icon .icon svg { width: 24px; height: 24px; } + +nav .adminmode { opacity: .7; } + +nav .nav-item { + display: inline-flex; + height: 48px; + vertical-align: top; + align-items: center; + margin-right: 16px; +} + diff --git a/public/navbar.php b/public/navbar.php index a157c76..03f9ca3 100644 --- a/public/navbar.php +++ b/public/navbar.php @@ -1,18 +1,26 @@
diff --git a/public/products.php b/public/products.php index 433475f..da337ad 100644 --- a/public/products.php +++ b/public/products.php @@ -1,5 +1,6 @@ + image ? "/img/product/$product->id-thumb.jpg" : "/img/placeholder.png"; @@ -22,6 +23,19 @@ EOF;

lijst met producten:

+ +
+ +
+
+ +
+
+ EOF; + } while (false); ?>
query("select id, image, price, name from webs.product"); -- cgit v1.2.3