-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjaaroverzicht.php
executable file
·196 lines (176 loc) · 7.95 KB
/
jaaroverzicht.php
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?php
// ini_set('display_startup_errors',1);
// ini_set('display_errors',1);
// error_reporting(-1);
include('functions.php');
if (!isset($_GET['pass']) || $_GET['pass'] != 'Gebruiker127!') {
header("Location: /ggd/");
}
$back = '/ggd/orders.php?pass=Gebruiker127!';
$back = '<a href="' . $back . '" class="waves-effect waves-light btn col s6 offset-s6"><i class="material-icons left">arrow_back</i>Terug</a>';
$year = $_GET['year'];
$orders = getOrders();
$overzichten = getOverzicht($orders, $year);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>GGD Online Bestellen - Orders</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style type="text/css">
table caption {
margin-bottom: 1rem;
}
table caption button {
float: left;
}
.scroll_overflow {
width: 100%;
overflow-x: scroll;
}
td, th {
white-space: nowrap;
}
table td, table th {
border-left: 1px solid rgba(0, 0, 0, 0.87);;
border-right: 1px solid rgba(0, 0, 0, 0.87);;
}
table td:first-child, table th:first-child {
border-left: none;
}
table td:last-child, table th:last-child {
border-right: none;
}
</style>
<script src="save.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/TableExport/3.3.13/js/tableexport.js"></script>
<script>
$( document ).ready(function() {
$("table").tableExport({
formats: ["csv"],
fileName: $(this).attr('id')
});
});
</script>
</head>
<body>
<nav style="margin-bottom: 30px;">
<div class="nav-wrapper black">
<div class="container">
<a href="/ggd/" class="brand-logo">Teewes</a>
<?php if (isset($_GET['pass']) && $_GET['pass'] == 'Gebruiker127!') : ?>
<ul class="right">
<li><a href="/ggd/orders.php?pass=<?=$_GET['pass']?>"><i class="material-icons left">history</i>Orders</a></li>
<li><a href="/ggd/?pass=<?=$_GET['pass']?>&cart"><i class="material-icons left">shopping_cart</i>Winkelwagen</a></li>
</ul>
<?php endif; ?>
</div>
</div>
</nav>
<div class="container">
<h1>Jaaroverzicht <?= $year ?></h1>
<?php echo $back; ?>
<div class="row">
<h3>GGD</h3>
<div class="scroll_overflow">
<table id="GGD_<?= $year ?>">
<thead>
<tr>
<th>Besteldatum</th>
<th>Briefpapier</th>
<th>Briefpapier ZA</th>
<th>Envelop EA4 ZV</th>
<th>Envelop EA4 MV</th>
<th>Envelop EB4</th>
<th>Envelop EA5 ZV</th>
<th>Envelop EA5 MV</th>
<th>Envelop C4 ZV</th>
<th>Envelop C4 MV</th>
<th>Envelop C5 ZV</th>
<th>Envelop C5 MV</th>
<th>Antwoordenvelop Almere</th>
<th>Antwoordenvelop Emmeloord</th>
<th>Antwoordenvelop Lelystad</th>
<th>Visitekaartjes</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $i < count($overzichten['ggd']); $i++ ) {
$keys = array_keys($overzichten['ggd']);
echo "<tr>";
echo "<td>" . $keys[$i] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_bp'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_bp_zonderadres'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_220x312'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_220x312_metvenster'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_371x262'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_220x156'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_220x156_metvenster'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_229x324'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_229x324_metvenster'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_229x162'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_env_229x162_metvenster'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_antw_almere'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_antw_emmeloord'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_antw_lelystad'] . "</td>";
echo "<td>" . $overzichten['ggd'][$keys[$i]]['ggd_vk_front'] . "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
<div class="scroll_overflow">
<h3>JGZ</h3>
<table id="JGZ_<?= $year ?>">
<thead>
<tr>
<th>Besteldatum</th>
<th>Briefpapier</th>
<th>Briefpapier ZA</th>
<th>Envelop EB4</th>
<th>Envelop EA5 ZV</th>
<th>Envelop EA5 MV</th>
<th>Envelop C4 ZV</th>
<th>Envelop C4 MV</th>
<th>Antwoordenvelop</th>
<th>Visitekaartjes</th>
<th>Visitekaartjes ZA</th>
<th>Meet & Weegkaartje</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $i < count($overzichten['jgz']); $i++ ) {
$keys = array_keys($overzichten['jgz']);
echo "<tr>";
echo "<td>" . $keys[$i] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_bp'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_bp_zonderadres'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_env_371x262'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_env_220x156'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_env_220x156_metvenster'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_env_229x324'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_env_229x324_metvenster'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_antw'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_vk_front'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_vk_zonderadres_front'] . "</td>";
echo "<td>" . $overzichten['jgz'][$keys[$i]]['jgz_mw_front'] . "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>