-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheckout.php
More file actions
165 lines (131 loc) · 6.32 KB
/
checkout.php
File metadata and controls
165 lines (131 loc) · 6.32 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
// Uit deze php bestanden gebruiken wij functies of variabelen:
include_once("app/authentication.php"); // Accounts en login
include_once("app/vendor.php"); // wordt gebruikt voor website beschrijving
include_once("app/database.php"); // wordt gebruikt voor database connectie
include_once("app/model/categorie.php"); // wordt gebruikt voor categorieen ophalen uit DB
include_once("app/model/product.php"); // wordt gebruikt voor producten ophalen uit DB
include_once("app/mediaportal.php"); // wordt gebruikt voor categorie foto's
include_once("app/constants.php");
?>
<!doctype html>
<html lang="en">
<head>
<?php
include ("tpl/head-tag-template.php");
?>
</head>
<body>
<!-- Onze website werkt niet met Internet Explorer 9 en lager-->
<!--[if IE]>
<div id="warning" class="fixed-top"><p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please upgrade your browser to improve your experience and security.</p></div>
<![endif]-->
<!-- Hierin -->
<div id="pagina-container">
<header>
<!-- Dit gedeelte van de header komt in een lijn te staan met de body content -->
<div id="header-inline" class="responsive-container">
<div id="promotie">
<a href="index.php">
<img src="img/logo/small-250x90.png" alt="Logo">
</a>
</div>
</div>
</header>
<div class="content-container-home">
<div class="contact-info">
<form id="contact-info-form" method="post" action="ideal-testomgeving.php">
<?php
$winkelmandjeSet = false;
$inputArray = array( "FirstName" => "Voornaam",
"MiddleName" => "Tussenvoegsel",
"LastName" => "Achternaam",
"AddressStreet" => "Straatnaam",
"AddressNumber" => "Huisnummer",
"AddressPostalCode" => "Postcode",
"AddressCity" => "Woonplaats",
"Email" => "Email"
);
/*if (Authentication::isLoggedIn()) {
extract((Account::get(Database::getConnection(), Authentication::getEmail()))->fetch(PDO::FETCH_ASSOC));
}*/
foreach (Cart::get() as $item => $aantal) {
$winkelmandjeSet = true;
}
if ($winkelmandjeSet) {
foreach($inputArray as $index => $value) {
?>
<div class="row">
<div class="col-3 FormLabels">
<?php print($value); ?>:
</div>
<div class="col-9">
<!-- hij maakt voor elke waarde in input array een input aan, als het mail is, maakt hij er een type="mail" van-->
<input type="<?php
if ($value === "Email") {
print("email");
} else {
print("text");
}
?>"
name="<?php print($value); ?>"
<?php
if (!IS_DEBUGGING_ENABLED) {
print("placeholder='$value'");
if (isset(${$value})) {
print(${$value});
}
} else {
print("value='test@test'");
}
if ($value != "Tussenvoegsel") {
print("required='required'");
}
?>
>
</div>
</div>
<br>
<?php
}
?>
<div class="row lineTop">
<div class="col-4">
<a href="order-overview.php">
Terug naar overzicht
</a>
</div>
<input type="hidden"
name="csrf_token"
value="<?php print($csrf_token);?>"
/>
<div class="col-2">
<input type="submit"
value="Betalen >"
class="ContinueButton"
/>
</div>
</div>
<?php
} else {
//Als er niks in het winkelmandje zit word je verzocht om terug te gaan naar de index pagina
?>
Je hebt niks in je winkelmandje, ga terug naar de startpagina
<br>
<button class="Big-button" onclick="location.href='index.php'">
Verder met shoppen
</button>
<?php
}
?>
</form>
</div>
</div>
</div>
<footer>
<?php
// include("tpl/footer_template.php");
?>
</footer>
</body>
</html>