aboutsummaryrefslogtreecommitdiff
path: root/public/order-complete.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/order-complete.php')
-rw-r--r--public/order-complete.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/public/order-complete.php b/public/order-complete.php
new file mode 100644
index 0000000..a455048
--- /dev/null
+++ b/public/order-complete.php
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<?php require "../lib/db.php" ?>
+<?php require "../lib/login.php" ?>
+<?php if_logged_in(false, "/login.php", true) ?>
+<?php do {
+ if ($_SERVER['REQUEST_METHOD'] !== 'POST') break;
+
+ $cart_id = 0;
+
+ $statement = $cursor->prepare("select cart(?) as cart_id");
+ $statement->bind_param("i", $user_id);
+ if (!$statement->execute()) break;
+ $res = $statement->get_result();
+ if (!mysqli_num_rows($res)) break;
+ $cart_id = $res->fetch_object()->cart_id;
+
+ $statement = $cursor->prepare("select id from orderproduct where `order` = ?");
+ $statement->bind_param("i", $cart_id);
+ if (!$statement->execute()) break;
+ $res = $statement->get_result();
+ if (!mysqli_num_rows($res)) break;
+
+ $statement = $cursor->prepare("update `order` set status = 2 where id = ?");
+ $statement->bind_param("i", $cart_id);
+ if (!$statement->execute()) break;
+ $cart_count = get_cart_count();
+} while (false); ?>
+<html>
+<head>
+ <?php include 'head.php' ?>
+ <title>bestelling afgerond</title>
+</head>
+<body>
+ <?php include 'navbar.php' ?>
+ <div class="main limwidth">
+ <h2>Bestelling succesvol afgerond</h2>
+ <p>nu krijg je weer zo'n vervelende e-mail waarin staat wat je net hebt gedaan alsof je het gelijk vergeten bent</p>
+ <p>bedankt hè</p>
+ </div>
+ <?php include 'footer.php' ?>
+</body>
+</html>