bedragen worden niet goed opgeteld
ik ben bezig met een factuur script heb alleen nu een probleem met het optellen van de bedragen in de orders
kan iemand hier iets mee
Code (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
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
<table cellspacing="1" class="tblBaseTblData" id="myScrollTable" width="1000">
<thead>
<tr NOWRAP>
<th> Factuur Nr</th>
<th> Bedrag Exc BTW</th>
<th> BTW Bedrag</th>
<th> Totaal Inc BTW</th>
<th> Voldaan</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC ";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr("$order1[zendingsnr]", 0, 6);
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1[fact]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3[km] * $order3[kmtarief];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
<tr class="oddRow">
<td> <a href=# rel="balloon<?php echo "$order1[fact]"; ?>"><?php echo "$newstr7rest.$order1[fact]"; ?></a></td>
<td> <?php echo "$bedrag2"; ?></td>
<td> <?php echo "$btw"; ?></td>
<td> <?php echo "$totaal"; ?></td>
<td> <?php echo "$order1[voldaan]"; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact3.php?fact=<?php echo "$order1[fact]"; ?>&userid=<?php echo "$order1[userid]"; ?> target=_blank>Print</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
</tfoot>
</table>
<script type="text/javascript">
var t = new ScrollableTable(document.getElementById('myScrollTable'), 32);
</script>
<thead>
<tr NOWRAP>
<th> Factuur Nr</th>
<th> Bedrag Exc BTW</th>
<th> BTW Bedrag</th>
<th> Totaal Inc BTW</th>
<th> Voldaan</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC ";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr("$order1[zendingsnr]", 0, 6);
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1[fact]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3[km] * $order3[kmtarief];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
<tr class="oddRow">
<td> <a href=# rel="balloon<?php echo "$order1[fact]"; ?>"><?php echo "$newstr7rest.$order1[fact]"; ?></a></td>
<td> <?php echo "$bedrag2"; ?></td>
<td> <?php echo "$btw"; ?></td>
<td> <?php echo "$totaal"; ?></td>
<td> <?php echo "$order1[voldaan]"; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact3.php?fact=<?php echo "$order1[fact]"; ?>&userid=<?php echo "$order1[userid]"; ?> target=_blank>Print</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
</tfoot>
</table>
<script type="text/javascript">
var t = new ScrollableTable(document.getElementById('myScrollTable'), 32);
</script>
Leer de juiste syntax:
vars buiten quotes en arraykeys tussen quotes.
Code (php)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
<?php
// dus niet
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr("$order1[zendingsnr]", 0, 6);
// maar zo
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
?>
// dus niet
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr("$order1[zendingsnr]", 0, 6);
// maar zo
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
?>
Zet dit eens bovenin je script:
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?php
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
//rest
?>
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
//rest
?>
Code (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
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
<table cellspacing="1" class="tblBaseTblData" id="myScrollTable" width="1000">
<thead>
<tr NOWRAP>
<th> Factuur Nr</th>
<th> Bedrag Exc BTW</th>
<th> BTW Bedrag</th>
<th> Totaal Inc BTW</th>
<th> Voldaan</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC ";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1["fact"]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3[km] * $order3[kmtarief];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
<tr class="oddRow">
<td> <a href=# rel="balloon<?php echo $order1["fact"]; ?>"><?php echo $newstr7rest.$order1["fact"]; ?></a></td>
<td> <?php echo "$bedrag2"; ?></td>
<td> <?php echo "$btw"; ?></td>
<td> <?php echo "$totaal"; ?></td>
<td> <?php echo $order1["voldaan"]; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact3.php?fact=<?php echo $order1["fact"]; ?>&userid=<?php echo $order1["userid"]; ?> target=_blank>Print</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
</tfoot>
</table>
<script type="text/javascript">
var t = new ScrollableTable(document.getElementById('myScrollTable'), 32);
</script>
maar zit nog steeds met het probleem dat de bedragen niet goed worden opgeteld
<thead>
<tr NOWRAP>
<th> Factuur Nr</th>
<th> Bedrag Exc BTW</th>
<th> BTW Bedrag</th>
<th> Totaal Inc BTW</th>
<th> Voldaan</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC ";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1["fact"]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3[km] * $order3[kmtarief];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
<tr class="oddRow">
<td> <a href=# rel="balloon<?php echo $order1["fact"]; ?>"><?php echo $newstr7rest.$order1["fact"]; ?></a></td>
<td> <?php echo "$bedrag2"; ?></td>
<td> <?php echo "$btw"; ?></td>
<td> <?php echo "$totaal"; ?></td>
<td> <?php echo $order1["voldaan"]; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact3.php?fact=<?php echo $order1["fact"]; ?>&userid=<?php echo $order1["userid"]; ?> target=_blank>Print</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
</tfoot>
</table>
<script type="text/javascript">
var t = new ScrollableTable(document.getElementById('myScrollTable'), 32);
</script>
maar zit nog steeds met het probleem dat de bedragen niet goed worden opgeteld
- SanThe - op 30/05/2011 15:41:18:
Zet dit eens bovenin je script:
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?php
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
//rest
?>
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
//rest
?>
Wat zijn de types van de velden in de database?
Gewijzigd op 30/05/2011 16:08:56 door - SanThe -
maar dan ben ik mijn hele scroll tabel kwijt
omdat hij dan vol staat met fouten
- SanThe - op 30/05/2011 16:07:06:
Wat zijn de types van de velden in de database?
Ga eerst eens al de foutjes er uit halen.
Code (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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
<?php
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
include("../configuratie.php");
$avant="Avant";
$avantver="Avant Browser";
$avantprevver="Avant Browser";
$chrome="Chrome/";
$chromever="Chrome/2.0.172.33";
$chromeprevver="Chrome/1.0.154.48";
$firefox="Firefox/";
$firefoxver="Firefox/3.0.11";
$firefoxprevver="Firefox/3.0.7";
$flock="Flock/";
$flockver="Flock/2.0";
$flockprevver="Flock/1.0";
$kmeleon="K-Meleon/";
$kmeleonver="K-Meleon/1.5.3";
$kmeleonprevver="K-Meleon/1.5.2";
$maxthon="MAXTHON ";
$maxthonver="MAXTHON 2.0";
$maxthonprevver="MAXTHON 1.0";
$ie="MSIE";
$iever="MSIE 8.0";
$ieprevver="MSIE 7.0";
$ns="Navigator/";
$nsver="Navigator/9.0.0.6";
$nsprevver="Navigator/9.0.0.5";
$opera="Opera/";
$operaver="Opera/9.64";
$operaprevver="Opera/9.63";
$safari="Safari/";
$safariver="Safari/528.17";
$safariprevver="Safari/528.16";
$deflang="en-";
$gbenglish="en-GB";
$usenglish="en-US";
$errmsg1="version not supported";
$errmsg2="JavaScript is disabled";
$browser=$_SERVER['HTTP_USER_AGENT'];
$pos=strpos($browser,$flock);
if ($pos>-1) {
//echo ("Flock version not supported");
} else {
$pos=strpos($browser,$ns);
if ($pos>-1) {
//echo ("Netscape version not supported");
} else {
$pos=strpos($browser,$firefox);
if ($pos>-1) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:998;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:998;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1128;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//echo ("Firefox version not supported");
} else {
$pos=strpos($browser,$opera);
if ($pos>-1) {
//echo ("Opera version not supported");
} else {
$pos=strpos($browser,$chrome);
if ($pos>-1) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:998;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:998;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1128;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//echo ("Chrome version not supported");
} else {
$pos=strpos($browser,$safari);
if ($pos>-1) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:998;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:998;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1128;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//echo ("Safari version not supported");
} else {
$pos=strpos($browser,$maxthon);
if ($pos>-1) {
//echo ("Maxthon version not supported");
} else {
$pos=strpos($browser,$kmeleon);
if ($pos>-1) {
//echo ("K-Meleon version not supported");
} else {
$pos=strpos($browser,$ie);
if ($pos>-1) {
//if (is_logged_in()) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:1003;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:1003;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1133;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//}
//echo ("IE version not supported");
} else {
//echo ("Unknown Browser");
}
}
}
}
}
}
}
}
}
//----------------------------------
?>
<html>
<head>
<style type="text/css">
.hiddenPic {display:none;}
BODY { overflow:scroll;overflow-x:hidden; }
/*not mine*/
table.tblBaseTblData{
padding:0px;
border-left:1px solid #c0c0c0;
border-top:1px solid #c0c0c0;
border-right:1px solid #c0c0c0;
border-bottom:1px solid #c0c0c0;
border-collapse:collapse;
valign:left;
}
table.tblBaseTblData thead, table.tblBaseTblData tfoot {
font-family:Calibri;
font-size:13px;
font-weight:bold;
background-color:#c0c0c0;
color:#4368AD;
height:22px;
}
table.tblBaseTblData th{
font-family:calibri;
font-size:13px;
font-weight:bold;
color:#4368AD;
padding:4px 2px 3px 2px;
height:18px;
border-bottom:1px solid #c0c0c0;
border-right-width:0px;
border-bottom-width:0px;
text-align: left;
}
table.tblBaseTblData td{
font-family:calibri;
font-size:13px;
font-weight:normal;
color:#4368AD;
padding:4px 2px 3px 2px;
height:18px;
border:1px solid #c0c0c0;
border-right-width:0px;
border-bottom-width:0px;
}
table.tblBaseTblData .1{
background-color:#f0f0f0;
}
table.tblBaseTblData .2{
background-color:#FFFFFF;
}
table.tblBaseTblDatab{
margin:0px;
padding:0px;
border-left:1px solid #c0c0c0;
border-top:1px solid #c0c0c0;
border-right:1px solid #c0c0c0;
border-bottom:1px solid #c0c0c0;
border-collapse:collapse;
text-valign:left;
}
table.tblBaseTblDatab tr{
font-family:calibri;
font-size:13px;
font-weight:normal;
color:#4368AD;
background-color:#c0c0c0;
padding:4px 4px 4px 4px;
height:21px;
border-collapse:collapse;
border:1px solid #c0c0c0;
text-align: left;
}
table.tblBaseTblDatab td{
font-family:calibri;
font-size:13px;
font-weight:normal;
color:#4368AD;
padding:4px 4px 4px 4px;
height:18px;
border-collapse:collapse;
text-align: left;
}
table.tblBaseTblDatab .oddRow{
background-color:#f0f0f0;
border-bottom:1px solid #c0c0c0;
}
table.tblBaseTblDatab .evenRow{
background-color:#FFFFFF;
border-bottom:1px solid #c0c0c0;
}
</style>
<meta name="google-site-verification" content="6rFo5eGu2zF6EYvKD4QmXz7yp1VzpL2k3z566Ul8fbo" />
<script type="text/javascript" src="../util-functions.js"></script>
<script type="text/javascript" src="../clear-default-text.js"></script>
<script type="text/javascript" src="../webtoolkit.scrollabletable.js"></script>
<link rel="stylesheet" type="text/css" href="balloontip3.css" />
<script type='text/javascript' src='balloontip.js'></script>
</head>
<title>HWS Koeriers - Landelijke Spoed Koerier voor Nationale en Internationale ritten / Huizen - Hilversum - Naarden - Eemnes - Laren - Bussum - Almere - Weesp - Muiden - Muiderberg</title>
<body leftmargin=130 rightmargin=0 link=#4368AD vlink=#4368AD hlink=#4368AD>
<img src=../images/koerier.png align=left style=position:absolute;top:13;left:13;>
<div style=position:absolute;top:88;right:260;><a href="http://twitter.com/share" class="twitter-share-button" data-text="HWS Koeriers - Spoed Koerier voor Huizen - Hilversum - Naarden - Eemnes - Laren - Bussum - Blaricum" data-count="none" data-via="hwskoeriers" title="Share HWS Koeriers on Twitter"></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<div style=position:absolute;top:87;right:234;><a href="http://www.twitter.com/hwskoeriers" target=_blank><img src="http://twitter-badges.s3.amazonaws.com/t_small-b.png" alt="Follow HWS Koeriers on Twitter"/ border=0></a></div>
<div style=position:absolute;top:87;right:209;><a href="http://www.facebook.com/pages/HWS-Koeriers/178698292182388?sk=wall" target=_blank><img src="../images/facebook.png" alt="Follow HWS Koeriers on Facebook"/ border=0></a></div>
<br><br><br><br><br>
<img src=../images/start.png border=0 style=position:absolute;top:115;left:0;>
<img src=../images/menuend.jpg border=0 style=position:absolute;top:115;right:0;width:700;height:5;>
<a href=../index.php><img src=../images/start1off.png border=0 style=position:absolute;top:115;left:71;></a>
<a href=../prijzen.php><img src=../images/start2off.png border=0 style=position:absolute;top:115;left:128;></a>
<a href=../offerte.php><img src=../images/start3off.png border=0 style=position:absolute;top:115;left:208;></a>
<a href=../koeriers.php><img src=../images/start6off.png border=0 style=position:absolute;top:115;left:288;></a>
<a href=../gps.php><img src=../images/start7off.png border=0 style=position:absolute;top:115;left:368;></a>
<a href=../bestellen.php><img src=../images/start4off.png border=0 style=position:absolute;top:115;left:425;></a>
<a href=../contact.php><img src=../images/start5off.png border=0 style=position:absolute;top:115;left:505;></a>
<a href=index.php><img src=../images/start8off.png border=0 style=position:absolute;top:115;left:670;></a>
<a href=facturen.php><img src=../images/start9.png border=0 style=position:absolute;top:115;left:750;></a>
<a href=account.php><img src=../images/start10off.png border=0 style=position:absolute;top:115;left:830;></a>
<img src=../images/menuend.jpg border=0 style=position:absolute;top:115;left:910;width:700;height:5;>
<br><br><br>
<?
if (!is_logged_in()) {
?>
<table border=0><tr>
<td border=0 bordercolor=#ffffff NOWRAP><div style="position:absolute;top:170;left:133;"><font face=calibri size=2 color=#4368AD><img src=../images/logobottom2.png><font face=calibri size=2 color=#4368AD> Welkom Admin, U bent niet ingelogd, Voer uw gebruikersnaam en wachtwoord in en klik op inloggen.<br><br>
</td></tr></table></div>
<form action="login.php?page=index" method="post">
<table style="position:absolute;left:500;top:220;"><tr><td NOWRAP>
<center><font face=calibri size=2 color=#4368AD>
<br><br>
<img src=../images/logobottom1.png> Gebruikersnaam : <br><br>
<input name="gebruikersnaam" size=22 value="Gebruikersnaam" class="cleardefault" style="color: #4368AD; font-style: normal; font-family: calibri; font-size: 12;"><br><br>
<img src=../images/logobottom1.png> Wachtwoord : <br><br>
<input name="wachtwoord" type="password" size=22 class="cleardefault" style="color: #4368AD; font-style: normal; font-family: calibri; font-size: 12;"><br><br>
<br> <input style="color: #4368AD; font-style: normal; font-family: calibri; font-size: 12;" type="submit" name="submit" value="Inloggen">
<br><br><br><br></td>
</td></tr></table></form></center>
<?
} else {
if ($id == '1'){
if ($save == '1'){
$time = time();
//$zendingsnr = $time / 10000;
$datum = date('d / m / Y' , $time);
$jaar = date('Y' , $time);
$user2 = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC";
$user2 = mysql_query($user2);
$user2 = mysql_fetch_array($user2);
$newstr7rest = substr("$user2[fact]", 5, 6);
$newstr8rest = substr("$user2[fact]", 0, 4);
if ($newstr8rest == $jaar){
$nr = $newstr7rest + 1;
$nrsave = "$jaar.$nr";
} else {
$nr = "1";
$nrsave = "$jaar.$nr";
}
$updatename1 = "UPDATE HWS_Orders SET fact = '$nrsave' WHERE userid = '$userid' AND fact = '0'";
$updatename1 = mysql_query($updatename1);
}
$save = 0;
?>
<table border=0><tr>
<td border=0 bordercolor=#ffffff NOWRAP><font face=calibri size=2 color=#4368AD>
<img src=../images/logobottom2.png> Welkom Admin, <B>(<?php echo "$HTTP_SESSION_VARS[contact]"; ?></B>), U bent ingelogd als <B><?php echo "$HTTP_SESSION_VARS[bedrijfsnaam]"; ?> </b>,<b> <a href=logout.php>Uitloggen</a></B>
</td></tr></table>
<br>
<table cellspacing="1" class="tblBaseTblData" id="myScrollTable1" width="1000">
<thead>
<tr NOWRAP>
<th> Orders Vanaf</th>
<th> Bedrijfsnaam</th>
<th> Adres</th>
<th> Postcode</th>
<th> Plaats</th>
<th> Land</th>
<th> Controleer</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact = '0' GROUP BY userid ORDER BY zendingsnr ASC";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$row = "1";
$user = "SELECT * FROM HWS_Users WHERE id = '$order1[userid]'";
$user = mysql_query($user);
$user = mysql_fetch_array($user);
?>
<tr class="<?php echo "$row"; ?>">
<td> <?php echo "$order1[datum3]"; ?></td>
<td> <?php echo "$user[bedrijfsnaam]"; ?></td>
<td> <?php echo "$user[adres]"; ?></td>
<td> <?php echo "$user[postcode]"; ?></td>
<td> <?php echo "$user[plaats]"; ?></td>
<td> <?php echo "$user[land]"; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact2.php?userid=<?php echo "$order1[userid]"; ?> target=_blank>Preview</a></td>
<td> <a href=facturen.php?save=1&userid=<?php echo "$order1[userid]"; ?>>Save</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
</tfoot>
</table>
<script type="text/javascript">
var t = new ScrollableTable(document.getElementById('myScrollTable1'), 11);
</script>
<br>
<table cellspacing="1" class="tblBaseTblData" id="myScrollTable" width="1000">
<thead>
<tr NOWRAP>
<th> Factuur Nr</th>
<th> Bedrag Exc BTW</th>
<th> BTW Bedrag</th>
<th> Totaal Inc BTW</th>
<th> Voldaan</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC ";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1[fact]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3['km'] * $order3['kmtarief'];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
<tr class="oddRow">
<td> <a href=# rel="balloon<?php echo $order1["fact"]; ?>"><?php echo $newstr7rest.$order1["fact"]; ?></a></td>
<td> <?php echo "$bedrag2"; ?></td>
<td> <?php echo " "; ?></td>
<td> <?php echo " "; ?></td>
<td> <?php echo " "; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact3.php?fact=<?php echo $order1["fact"]; ?>&userid=<?php echo $order1["userid"]; ?> target=_blank>Print</a></td>
</tr>
<?php
} // eind while
} else {
echo "<div style=position:absolute;top:170;left:150;><img src=../images/logobottom2.png> <font face=calibri size=2 color=#4368AD>U bent niet gemachtigd om deze pagina te bekijken, Klik <a href=logout.php>Hier</a> om in te loggen met een admin account.</div>";
} // eind userid
} //eind ifloggedin
?>
<div style=position:absolute;top:540;left:450;><center>
<font face=calibri size=2 color=#4368AD>
* Alle prijzen vermeld op de website zijn exclusief tolkosten en 19% BTW..
<br><br>
Copyright 2011 HWS Koeriers - www.hws-koeriers.nl
</font></center></div>
<img src=../images/logobottom.png border=0 style=position:absolute;top:560;left:1000;>
</body>
</html>
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
include("../configuratie.php");
$avant="Avant";
$avantver="Avant Browser";
$avantprevver="Avant Browser";
$chrome="Chrome/";
$chromever="Chrome/2.0.172.33";
$chromeprevver="Chrome/1.0.154.48";
$firefox="Firefox/";
$firefoxver="Firefox/3.0.11";
$firefoxprevver="Firefox/3.0.7";
$flock="Flock/";
$flockver="Flock/2.0";
$flockprevver="Flock/1.0";
$kmeleon="K-Meleon/";
$kmeleonver="K-Meleon/1.5.3";
$kmeleonprevver="K-Meleon/1.5.2";
$maxthon="MAXTHON ";
$maxthonver="MAXTHON 2.0";
$maxthonprevver="MAXTHON 1.0";
$ie="MSIE";
$iever="MSIE 8.0";
$ieprevver="MSIE 7.0";
$ns="Navigator/";
$nsver="Navigator/9.0.0.6";
$nsprevver="Navigator/9.0.0.5";
$opera="Opera/";
$operaver="Opera/9.64";
$operaprevver="Opera/9.63";
$safari="Safari/";
$safariver="Safari/528.17";
$safariprevver="Safari/528.16";
$deflang="en-";
$gbenglish="en-GB";
$usenglish="en-US";
$errmsg1="version not supported";
$errmsg2="JavaScript is disabled";
$browser=$_SERVER['HTTP_USER_AGENT'];
$pos=strpos($browser,$flock);
if ($pos>-1) {
//echo ("Flock version not supported");
} else {
$pos=strpos($browser,$ns);
if ($pos>-1) {
//echo ("Netscape version not supported");
} else {
$pos=strpos($browser,$firefox);
if ($pos>-1) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:998;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:998;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1128;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//echo ("Firefox version not supported");
} else {
$pos=strpos($browser,$opera);
if ($pos>-1) {
//echo ("Opera version not supported");
} else {
$pos=strpos($browser,$chrome);
if ($pos>-1) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:998;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:998;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1128;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//echo ("Chrome version not supported");
} else {
$pos=strpos($browser,$safari);
if ($pos>-1) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:998;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:998;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1128;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//echo ("Safari version not supported");
} else {
$pos=strpos($browser,$maxthon);
if ($pos>-1) {
//echo ("Maxthon version not supported");
} else {
$pos=strpos($browser,$kmeleon);
if ($pos>-1) {
//echo ("K-Meleon version not supported");
} else {
$pos=strpos($browser,$ie);
if ($pos>-1) {
//if (is_logged_in()) {
echo "<img src=../images/border.png border=0 style=position:absolute;top:223;left:130;width:1003;height:3;>";
echo "<img src=../images/border.png border=0 style=position:absolute;top:479;left:130;width:1003;height:3;>";
echo "<img src=../images/border1.png border=0 style=position:absolute;top:223;left:130;width:3;height:3;>";
echo "<img src=../images/border2.png border=0 style=position:absolute;top:477;left:130;width:3;height:3;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:1133;width:1;height:256;>";
echo "<img src=../images/border3.png border=0 style=position:absolute;top:223;left:130;width:1;height:256;>";
//}
//echo ("IE version not supported");
} else {
//echo ("Unknown Browser");
}
}
}
}
}
}
}
}
}
//----------------------------------
?>
<html>
<head>
<style type="text/css">
.hiddenPic {display:none;}
BODY { overflow:scroll;overflow-x:hidden; }
/*not mine*/
table.tblBaseTblData{
padding:0px;
border-left:1px solid #c0c0c0;
border-top:1px solid #c0c0c0;
border-right:1px solid #c0c0c0;
border-bottom:1px solid #c0c0c0;
border-collapse:collapse;
valign:left;
}
table.tblBaseTblData thead, table.tblBaseTblData tfoot {
font-family:Calibri;
font-size:13px;
font-weight:bold;
background-color:#c0c0c0;
color:#4368AD;
height:22px;
}
table.tblBaseTblData th{
font-family:calibri;
font-size:13px;
font-weight:bold;
color:#4368AD;
padding:4px 2px 3px 2px;
height:18px;
border-bottom:1px solid #c0c0c0;
border-right-width:0px;
border-bottom-width:0px;
text-align: left;
}
table.tblBaseTblData td{
font-family:calibri;
font-size:13px;
font-weight:normal;
color:#4368AD;
padding:4px 2px 3px 2px;
height:18px;
border:1px solid #c0c0c0;
border-right-width:0px;
border-bottom-width:0px;
}
table.tblBaseTblData .1{
background-color:#f0f0f0;
}
table.tblBaseTblData .2{
background-color:#FFFFFF;
}
table.tblBaseTblDatab{
margin:0px;
padding:0px;
border-left:1px solid #c0c0c0;
border-top:1px solid #c0c0c0;
border-right:1px solid #c0c0c0;
border-bottom:1px solid #c0c0c0;
border-collapse:collapse;
text-valign:left;
}
table.tblBaseTblDatab tr{
font-family:calibri;
font-size:13px;
font-weight:normal;
color:#4368AD;
background-color:#c0c0c0;
padding:4px 4px 4px 4px;
height:21px;
border-collapse:collapse;
border:1px solid #c0c0c0;
text-align: left;
}
table.tblBaseTblDatab td{
font-family:calibri;
font-size:13px;
font-weight:normal;
color:#4368AD;
padding:4px 4px 4px 4px;
height:18px;
border-collapse:collapse;
text-align: left;
}
table.tblBaseTblDatab .oddRow{
background-color:#f0f0f0;
border-bottom:1px solid #c0c0c0;
}
table.tblBaseTblDatab .evenRow{
background-color:#FFFFFF;
border-bottom:1px solid #c0c0c0;
}
</style>
<meta name="google-site-verification" content="6rFo5eGu2zF6EYvKD4QmXz7yp1VzpL2k3z566Ul8fbo" />
<script type="text/javascript" src="../util-functions.js"></script>
<script type="text/javascript" src="../clear-default-text.js"></script>
<script type="text/javascript" src="../webtoolkit.scrollabletable.js"></script>
<link rel="stylesheet" type="text/css" href="balloontip3.css" />
<script type='text/javascript' src='balloontip.js'></script>
</head>
<title>HWS Koeriers - Landelijke Spoed Koerier voor Nationale en Internationale ritten / Huizen - Hilversum - Naarden - Eemnes - Laren - Bussum - Almere - Weesp - Muiden - Muiderberg</title>
<body leftmargin=130 rightmargin=0 link=#4368AD vlink=#4368AD hlink=#4368AD>
<img src=../images/koerier.png align=left style=position:absolute;top:13;left:13;>
<div style=position:absolute;top:88;right:260;><a href="http://twitter.com/share" class="twitter-share-button" data-text="HWS Koeriers - Spoed Koerier voor Huizen - Hilversum - Naarden - Eemnes - Laren - Bussum - Blaricum" data-count="none" data-via="hwskoeriers" title="Share HWS Koeriers on Twitter"></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<div style=position:absolute;top:87;right:234;><a href="http://www.twitter.com/hwskoeriers" target=_blank><img src="http://twitter-badges.s3.amazonaws.com/t_small-b.png" alt="Follow HWS Koeriers on Twitter"/ border=0></a></div>
<div style=position:absolute;top:87;right:209;><a href="http://www.facebook.com/pages/HWS-Koeriers/178698292182388?sk=wall" target=_blank><img src="../images/facebook.png" alt="Follow HWS Koeriers on Facebook"/ border=0></a></div>
<br><br><br><br><br>
<img src=../images/start.png border=0 style=position:absolute;top:115;left:0;>
<img src=../images/menuend.jpg border=0 style=position:absolute;top:115;right:0;width:700;height:5;>
<a href=../index.php><img src=../images/start1off.png border=0 style=position:absolute;top:115;left:71;></a>
<a href=../prijzen.php><img src=../images/start2off.png border=0 style=position:absolute;top:115;left:128;></a>
<a href=../offerte.php><img src=../images/start3off.png border=0 style=position:absolute;top:115;left:208;></a>
<a href=../koeriers.php><img src=../images/start6off.png border=0 style=position:absolute;top:115;left:288;></a>
<a href=../gps.php><img src=../images/start7off.png border=0 style=position:absolute;top:115;left:368;></a>
<a href=../bestellen.php><img src=../images/start4off.png border=0 style=position:absolute;top:115;left:425;></a>
<a href=../contact.php><img src=../images/start5off.png border=0 style=position:absolute;top:115;left:505;></a>
<a href=index.php><img src=../images/start8off.png border=0 style=position:absolute;top:115;left:670;></a>
<a href=facturen.php><img src=../images/start9.png border=0 style=position:absolute;top:115;left:750;></a>
<a href=account.php><img src=../images/start10off.png border=0 style=position:absolute;top:115;left:830;></a>
<img src=../images/menuend.jpg border=0 style=position:absolute;top:115;left:910;width:700;height:5;>
<br><br><br>
<?
if (!is_logged_in()) {
?>
<table border=0><tr>
<td border=0 bordercolor=#ffffff NOWRAP><div style="position:absolute;top:170;left:133;"><font face=calibri size=2 color=#4368AD><img src=../images/logobottom2.png><font face=calibri size=2 color=#4368AD> Welkom Admin, U bent niet ingelogd, Voer uw gebruikersnaam en wachtwoord in en klik op inloggen.<br><br>
</td></tr></table></div>
<form action="login.php?page=index" method="post">
<table style="position:absolute;left:500;top:220;"><tr><td NOWRAP>
<center><font face=calibri size=2 color=#4368AD>
<br><br>
<img src=../images/logobottom1.png> Gebruikersnaam : <br><br>
<input name="gebruikersnaam" size=22 value="Gebruikersnaam" class="cleardefault" style="color: #4368AD; font-style: normal; font-family: calibri; font-size: 12;"><br><br>
<img src=../images/logobottom1.png> Wachtwoord : <br><br>
<input name="wachtwoord" type="password" size=22 class="cleardefault" style="color: #4368AD; font-style: normal; font-family: calibri; font-size: 12;"><br><br>
<br> <input style="color: #4368AD; font-style: normal; font-family: calibri; font-size: 12;" type="submit" name="submit" value="Inloggen">
<br><br><br><br></td>
</td></tr></table></form></center>
<?
} else {
if ($id == '1'){
if ($save == '1'){
$time = time();
//$zendingsnr = $time / 10000;
$datum = date('d / m / Y' , $time);
$jaar = date('Y' , $time);
$user2 = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC";
$user2 = mysql_query($user2);
$user2 = mysql_fetch_array($user2);
$newstr7rest = substr("$user2[fact]", 5, 6);
$newstr8rest = substr("$user2[fact]", 0, 4);
if ($newstr8rest == $jaar){
$nr = $newstr7rest + 1;
$nrsave = "$jaar.$nr";
} else {
$nr = "1";
$nrsave = "$jaar.$nr";
}
$updatename1 = "UPDATE HWS_Orders SET fact = '$nrsave' WHERE userid = '$userid' AND fact = '0'";
$updatename1 = mysql_query($updatename1);
}
$save = 0;
?>
<table border=0><tr>
<td border=0 bordercolor=#ffffff NOWRAP><font face=calibri size=2 color=#4368AD>
<img src=../images/logobottom2.png> Welkom Admin, <B>(<?php echo "$HTTP_SESSION_VARS[contact]"; ?></B>), U bent ingelogd als <B><?php echo "$HTTP_SESSION_VARS[bedrijfsnaam]"; ?> </b>,<b> <a href=logout.php>Uitloggen</a></B>
</td></tr></table>
<br>
<table cellspacing="1" class="tblBaseTblData" id="myScrollTable1" width="1000">
<thead>
<tr NOWRAP>
<th> Orders Vanaf</th>
<th> Bedrijfsnaam</th>
<th> Adres</th>
<th> Postcode</th>
<th> Plaats</th>
<th> Land</th>
<th> Controleer</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact = '0' GROUP BY userid ORDER BY zendingsnr ASC";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$row = "1";
$user = "SELECT * FROM HWS_Users WHERE id = '$order1[userid]'";
$user = mysql_query($user);
$user = mysql_fetch_array($user);
?>
<tr class="<?php echo "$row"; ?>">
<td> <?php echo "$order1[datum3]"; ?></td>
<td> <?php echo "$user[bedrijfsnaam]"; ?></td>
<td> <?php echo "$user[adres]"; ?></td>
<td> <?php echo "$user[postcode]"; ?></td>
<td> <?php echo "$user[plaats]"; ?></td>
<td> <?php echo "$user[land]"; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact2.php?userid=<?php echo "$order1[userid]"; ?> target=_blank>Preview</a></td>
<td> <a href=facturen.php?save=1&userid=<?php echo "$order1[userid]"; ?>>Save</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
</tfoot>
</table>
<script type="text/javascript">
var t = new ScrollableTable(document.getElementById('myScrollTable1'), 11);
</script>
<br>
<table cellspacing="1" class="tblBaseTblData" id="myScrollTable" width="1000">
<thead>
<tr NOWRAP>
<th> Factuur Nr</th>
<th> Bedrag Exc BTW</th>
<th> BTW Bedrag</th>
<th> Totaal Inc BTW</th>
<th> Voldaan</th>
<th> Factuur</th>
</tr>
</thead>
<tbody NOWRAP>
<?php
$order = "SELECT * FROM HWS_Orders WHERE fact != '0' GROUP BY fact ORDER BY fact DESC ";
$order = mysql_query($order);
$num = mysql_num_rows($order);
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1[fact]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3['km'] * $order3['kmtarief'];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
<tr class="oddRow">
<td> <a href=# rel="balloon<?php echo $order1["fact"]; ?>"><?php echo $newstr7rest.$order1["fact"]; ?></a></td>
<td> <?php echo "$bedrag2"; ?></td>
<td> <?php echo " "; ?></td>
<td> <?php echo " "; ?></td>
<td> <?php echo " "; ?></td>
<td> <a href=http://www.hws-koeriers.nl/hws/fpdf/fact3.php?fact=<?php echo $order1["fact"]; ?>&userid=<?php echo $order1["userid"]; ?> target=_blank>Print</a></td>
</tr>
<?php
} // eind while
} else {
echo "<div style=position:absolute;top:170;left:150;><img src=../images/logobottom2.png> <font face=calibri size=2 color=#4368AD>U bent niet gemachtigd om deze pagina te bekijken, Klik <a href=logout.php>Hier</a> om in te loggen met een admin account.</div>";
} // eind userid
} //eind ifloggedin
?>
<div style=position:absolute;top:540;left:450;><center>
<font face=calibri size=2 color=#4368AD>
* Alle prijzen vermeld op de website zijn exclusief tolkosten en 19% BTW..
<br><br>
Copyright 2011 HWS Koeriers - www.hws-koeriers.nl
</font></center></div>
<img src=../images/logobottom.png border=0 style=position:absolute;top:560;left:1000;>
</body>
</html>
Ik heb de meeste error's eruit maar twee willen niet lukken
Notice: Undefined variable: save in /www/htdocs/wwwhuize/http/hws/admin/facturen.php on line 384
Notice: Undefined variable: bedrag2 in /www/htdocs/wwwhuize/http/hws/admin/facturen.php on line 555
Notice: Undefined offset: 3 in /www/htdocs/wwwhuize/http/hws/admin/facturen.php on line 555
Als je ooit nog eens iets moet aanpassen, en je ziet bedrag1 en bedrag2... dan denk je bij jezelf: Wat was wat ook al weer.
Het probleem met de bedragen heeft 2 oorzaken:
Je zet geen startvariabele $bedrag1 = array();
Dit resulteert in een array waarin alle bedragen van alle facturen worden geplaatst.
Vervolgens ga je optellen, maar $bedrag2 wordt ook niet gereset. Hier worden dus ook alle bedragen opgeteld.
Uiteindelijk heb je een cumulatieve rij, waar je dat niet bedoelde.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1["fact"]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3[km] * $order3[kmtarief];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1["fact"]'";
$order2 = mysql_query($order2);
$num2 = mysql_num_rows($order2);
while ($order3 = mysql_fetch_array($order2)){
$bedrag1[] = $order3[km] * $order3[kmtarief];
}
for ($i = 0; $i <= $num2; $i++){
$bedrag2 = $bedrag2 + $bedrag1[$i];
}
?>
Zo zou je het beter kunnen doen:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
<?php
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1["fact"]'";
$order2 = mysql_query($order2);
$totaal_bedrag = 0;
while ($order3 = mysql_fetch_array($order2))
{
$totaal_bedrag+= $order3['km'] * $order3['kmtarief'];
}
?>
$order2 = "SELECT * FROM HWS_Orders WHERE fact = '$order1["fact"]'";
$order2 = mysql_query($order2);
$totaal_bedrag = 0;
while ($order3 = mysql_fetch_array($order2))
{
$totaal_bedrag+= $order3['km'] * $order3['kmtarief'];
}
?>
Verder klopt er echt helemaal niks van de html code. Ik zie nergens de html dubbele quotes en er staat reeds data vóórdat <html> begint.
Code (php)
1
2
3
4
5
2
3
4
5
$totaal_bedrag = 0;
while ($order3 = mysql_fetch_array($order2))
{
$totaal_bedrag+= $order3['km'] * $order3['kmtarief'];
}
while ($order3 = mysql_fetch_array($order2))
{
$totaal_bedrag+= $order3['km'] * $order3['kmtarief'];
}
Jij bent mijn held....
nu zijn ineens ook de 2 onderste fouten eruit
Alleen zit deze er nog in en zou niet goed weten hoe ik het het beste op zou kunnen lossen
Notice: Undefined variable: save in /www/htdocs/wwwhuize/http/hws/admin/facturen.php on line 384
niet dat ik er last van zou hebben als ik die error reporting weer uit zou zetten
Toevoeging op 30/05/2011 16:52:00:
Dus deze regel is zinloos:
if ($save == '1'){
Php maakt hier dit van:
if (0 == '1'){
en dat is false.
en dan weet ik dat ik een aantal orders in de database moet aanpassen met het factuur nr
kijk het verschil in kleur
Code (php)
de goede
Code (php)
had alleen het stuk aangepast wat ik gepost had
Maikel B op 30/05/2011 16:57:54:
de goede
Code (php)
Dit is beter denk ik. Klein verschil maar toch.. Verbeter me indien ik fout zit!
Code (php)
Gewijzigd op 30/05/2011 17:04:01 door Jasper DS
- SanThe - op 30/05/2011 15:41:18:
Waarom zoveel lege regels?
Leer de juiste syntax:
vars buiten quotes en arraykeys tussen quotes.
Zet dit eens bovenin je script:
Leer de juiste syntax:
vars buiten quotes en arraykeys tussen quotes.
Code (php)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
<?php
// dus niet
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr("$order1[zendingsnr]", 0, 6);
// maar zo
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
?>
// dus niet
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr("$order1[zendingsnr]", 0, 6);
// maar zo
while ($order1 = mysql_fetch_array($order)){
$newstr7rest = substr($order1["zendingsnr"], 0, 6);
?>
Zet dit eens bovenin je script:
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?php
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
//rest
?>
ini_set('display_errors', 1); // 0 = uit, 1 = aan
error_reporting(E_ALL);
//rest
?>
Leg mij eens uit waarom dit beter is (form input veld doet wel raar hier op de zite)
PHP Jasper op 30/05/2011 17:03:32:
Dit is beter denk ik. Klein verschil maar toch.. Verbeter me indien ik fout zit!
Maikel B op 30/05/2011 16:57:54:
de goede
Code (php)
Dit is beter denk ik. Klein verschil maar toch.. Verbeter me indien ik fout zit!
Ligt er denk ik maar net aan waar je gewend aan bent geraakt. :p
En ja, ik weet dat de een misschien iets sneller is als de ander maar veel maakt het niet uit.
Alleen kan zijn dat je op mijn manier misschien iets vaker iets moet escapen.
Maar zoals ik al zei. Ik ben eraan gewend geraakt :p