-
Notifications
You must be signed in to change notification settings - Fork 0
/
plirwmiJCC.php
758 lines (634 loc) · 24.3 KB
/
plirwmiJCC.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
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
<?php
session_start();
header('Cache-Control: max-age=900');?>
<?php
$xristis;
if(isset($_SESSION['login_user']))
{
$xristis = $_SESSION['login_user'];
}
else
{
$xristis = "Σύνδεση";
header("Location: login.php");
die;
}
if(!(isset($_SESSION['arithmosproiontwn']))){
header("Location: index.php");
die;
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Ολοκλήρωση Παραγγελίας</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css" media="all" />
<link href='http://fonts.googleapis.com/css?family=Exo+2' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="js/jquery1.min.js"></script>
<!-- start menu -->
<link href="css/megamenu.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/megamenu.js"></script>
<script>$(document).ready(function(){$(".megamenu").megamenu();});</script>
<script src="js/jquery.easydropdown.js"></script>
<script>
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
</script>
<style type="text/css">
.auto-style1 {
width: 90%;
-moz-transition: all .2s linear;
-webkit-transition: all .2s linear;
-o-transition: all .2s linear;
-ms-transition: all .2s linear;
margin: 0 auto;
}
.auto-style2 {
color: #FFFFFF;
}
</style>
</head>
<body>
<?php
$servername = "localhost";
$username = "cyfoodmuseum";
$password = "9m8ESxZD";
$dbname = "cyfoodmuseum";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
echo "Connection faild";
}
parse_url(file_get_contents("php://input"), $_POST);
if (!$conn->set_charset("utf8")) {
printf("Error loading character set utf8: %s\n", $conn->error);
} else {
//printf("Current character set: %s\n", $conn->character_set_name());
}//die;
$xristis=$_SESSION['login_user'];
$antikeimena=$_SESSION['arithmosproiontwn'];
$address=$_SESSION['addressSent'];
$postalCode=$_SESSION['postalSent'];
$city=$_SESSION['citySent'];
$country=$_SESSION['country'];
$name=$_SESSION['nameSent'];
$surn=$_SESSION['surnSent'];
$num=0;
$sinolikovaros=0;
while($num<$antikeimena){
$varos=$_SESSION["varosAntikeimenou$num"];
$sinolikovaros=$sinolikovaros+$varos;
$num=$num+1;
}
$sinolo=$_SESSION['sinoloplirwmis'];
$thisdate = date("Y-m-d");
$rec="";
$antikat="ΟΧΙ";
$sql="INSERT INTO `cyfoodmuseum`.`ORDERS` (`userEmail`, `DateCreated`, `Price`, `Completed`, `Canceled`, `Weight`, `AddressSent`, `citySent`, `postalSent`, `countrySent`, `receipts`, `antikataboli`) VALUES ('$xristis','$thisdate','$sinolo','0', '0', '$sinolikovaros', '$address', '$city', '$postalCode', '$country', '$rec', '$antikat');";
$conn->query($sql);
$erwtima = "SELECT * FROM `ORDERS` WHERE `userEmail`='$xristis' AND `postalSent`='$postalCode' AND `citySent`='$city'AND `Price`=$sinolo AND `countrySent`='$country' AND `AddressSent`='$address' AND `Completed`='0' AND `Canceled`='0' AND `Weight`='$sinolikovaros' AND `DateCreated`='$thisdate' AND `antikataboli`='$antikat'";
$result=$conn->query($erwtima);
$max=-1;
$numrows=$result->num_rows;
if($result->num_rows > 0){
while ($line = $result->fetch_assoc()){
$code=$line['Code'];
if ($code>$max){
$max=$code;
}
}
}
//$max;
$thisdir = getcwd();
$folder=$thisdir."/Receipts";
//$folder =
if (!file_exists($folder)) {
$old = umask(0);
if(!mkdir($folder, 0777, true)){
echo "ERROR: Fail to create the folder...";
die;
}
umask($old);
}
// Transfer Receipt
if (isset($_FILES['receipt']) && $_FILES['receipt']['size']>0){
$name = $_FILES['receipt']['name'];
$temp = $_FILES['receipt']['tmp_name'];
$type = $_FILES['receipt']['type'];
$size = $_FILES['receipt']['size'];
// Check Type
if ($type == "application/pdf"){
// Check Size
if ($size <= 1000000){
// Upload File
$targetname=$folder."/Receipt$max.pdf";
move_uploaded_file($temp,$folder."/Receipt$max.pdf");
chmod($targetname, 0444);
$sql="UPDATE `cyfoodmuseum`.`ORDERS` SET `receipts`='$targetname' WHERE `userEmail`='$xristis' AND `Code`='$max' AND `postalSent`='$postalCode' AND `citySent`='$city'AND `Price`='$sinolo' AND `countrySent`='$country' AND `AddressSent`='$address' AND `Completed`='0' AND `Canceled`='0' AND `Weight`='$sinolikovaros' AND `DateCreated`='$thisdate' ";
if (!mysqli_query($conn,$sql)){
$_SESSION['Error'] = "Unable to upload receipt!";
header('location:kalathiProionta.php');
die;
}
}else{
$_SESSION['Error'] = "Receipt's size is too big!";
header('location:kalathiProionta.php');
die;
}
}else{
$_SESSION['Error'] = "The receipt must be a .pdf format!";
header('location:kalathiProionta.php');
die;
}
}
//mysqli_close($con);
$num=0;
while($num<$antikeimena){
$kodikos=$_SESSION["kodikos$num"];
$posotita=$_SESSION["posotita$num"];
$er="INSERT INTO `cyfoodmuseum`.`SERIESOFORDERS` (`CodeOfOrder`, `CodeOfProduct`, `Quantity`) VALUES ('$max','$kodikos','$posotita');";
$avail="SELECT * FROM `PRODUCT` WHERE `Code`='$kodikos'";
if ($conn->query($er) === TRUE){
$kalathi="DELETE FROM `USERACTIONFORCART` WHERE `UserCode`='$xristis' and `CodeOfProduct`='$kodikos' ;";
$conn->query($kalathi);
$resultavail=$conn->query($avail);
$line = $resultavail->fetch_assoc();
$diathesima=$line['Availability'];
$neadiathesima=$diathesima-$posotita;
$allagi = "UPDATE `PRODUCT` SET `Availability`='$neadiathesima' WHERE `Code`='$kodikos';";
$conn->query($allagi);
echo $conn->error;
}else{
echo "Δεν πραγματοποιήθηκε η παραγγελία, επαναλάβετε τη διαδικασία";
}
$num=$num+1;
}
$to=$xristis;
$message = "Σας ενημερώνουμε ότι η παραγγελία σας και τα απαραίτητα στοιχεία πληρωμής έχουν καταχωρηθεί στο σύστημά μας. \r\n Αν υπάρξει κάποιο πρόβλημα με τα στοιχεία πληρωμής σας, θα σας ειδοποιήσουμε άμεσα με email. \r\n Ευχαριστούμε CyFoodMuseum.";
$subject = 'Παραγγελία από CyFoodMuseum';
//$message = wordwrap($msg, 70, "\r\n");
//mail($to, $subject, $message);
if(@mail($to, $subject, $message))
{
$valueofmail=perfetto;
}else{
echo "Mail Not Sent";
}
?>
<div class="header-top">
<div class="wrap">
<div class="header-top-left">
<div class="box1">
<select tabindex="4" class="dropdown">
<option value="" class="label" value="">Νόμισμα :</option>
<option value="1">€ Ευρώ</option>
</select>
</div>
<div class="clear"></div>
</div>
<div class="cssmenu">
<ul>
<?php
if(isset($_SESSION['login_user'])){
$xristis=$_SESSION['login_user'];
echo "<li class='active'><a href='profile.php'>$xristis</a></li> |";
echo "<li><a href='kalathiProionta.php'>Καλάθι/Αγορά</a></li> |";
echo "<li><a href='showOrdersOfUser.php'>Παραγγελίες</a></li> |";
echo "<li><a href='profile.php'>Προφίλ</a></li> |";
echo "<li><a href='logout.php'>Αποσύνδεση</a></li>";
}else{
if(isset($_SESSION['login_admin'])){
echo "<li><a href='logout.php'>Αποσύνδεση</a></li>";
}else{
echo "<li><a href='login.php'>Σύνδεση</a></li> |";
echo "<li><a href='register.php'>Εγγραφή</a></li>";
}
}
?>
</ul>
</div>
<div class="clear"></div>
</div>
</div>
<div class="header-bottom">
<div class="wrap" style="width: 98%">
<div class="header-bottom-left">
<div class="logo">
<a href="index.php">
<img src="images/trofima.jpg"></a>
</div>
<div class="menu">
</div>
</div>
<div class="header-bottom-right" style="width: 34%">
<div class="search">
<form id='anazitisi' method="POST" action="searchServer.php" accept-charset="UTF-8"> <!--method='post'-->
<input type="text" name="search" id="search" class="auto-style4" value="Αναζήτηση" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Αναζήτηση';}" style="width: 159px">
<input type="submit" value="Subscribe" id="submit" name="submit">
<div id="response"> </div>
</form>
</div>
<div class="tag-list">
<ul class="icon1 sub-icon1 profile_img">
<li>
<ul class="sub-icon1 list">
<li><h3>sed diam nonummy</h3><a href=""></a></li>
<li><p>Lorem ipsum dolor sit amet, consectetuer <a href="">adipiscing elit, sed diam</a></p></li>
</ul>
</li>
</ul>
<ul class="icon1 sub-icon1 profile_img">
<?php
$servername = "localhost";
$username = "cyfoodmuseum";
$password = "9m8ESxZD";
$dbname = "cyfoodmuseum";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
//@mysql_select_db($dbname) or die ("No database");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
echo "Connection faild";
}
if (!$conn->set_charset("utf8")) {
printf("Error loading character set utf8: %s\n", $conn->error);
} else {
//printf("Current character set: %s\n", $conn->character_set_name());
}//die;
if(isset($_SESSION['login_user'])){
$xristis=$_SESSION['login_user'];
$posotitakalathi="SELECT * FROM `USERACTIONFORCART` where `UserCode`='$xristis'";
$queryCart=$conn->query($posotitakalathi);
if($queryCart->num_rows > 0){
echo "<li><a class='active-icon c2' href='kalathiProionta.php'> </a>";
echo "<ul class='sub-icon1 list'>";
echo "<li><h3>$queryCart->num_rows Προϊόντα</h3><a href=''></a></li>";
echo "<li><p>Δες τα προϊόντα στο καλάθι σου και κάνε τις Αγορές σου!<a href=''></a></p></li>";
echo "</ul>";
echo "</li>";
}else{
echo "<li><a class='active-icon c2' href='checkout.php'> </a>";
echo "<ul class='sub-icon1 list'>";
echo "<li><h3>Αδειο Καλαθι</h3><a href=''></a></li>";
echo "<li><p>Δεν υπάρχουν προϊόντα στο καλάθι σου<a href=''></a></p></li>";
echo "</ul>";
echo "</li>";
}
}else{
echo "<li><a class='active-icon c2' href=''> </a>";
echo "<ul class='sub-icon1 list'>";
echo "<li><h3>Συνδεθείτε</h3><a href=''></a></li>";
echo "<li><p>Γίνεται μέλος στο καταστημά μας, προσθέστε προϊόντα στο καλάθι σας και κάνετε τις αγορές σας!<a href=''></a></p></li>";
echo "</ul>";
echo "</li>";
}
?>
</ul>
<?php
if(isset($_SESSION['login_user'])){
$xristis=$_SESSION['login_user'];
$posotitakalathi="SELECT * FROM `USERACTIONFORCART` where `UserCode`='$xristis'";
$queryCart=$conn->query($posotitakalathi);
if($queryCart->num_rows > 0){
echo "<ul class='last'><li><a href='kalathiProionta.php'>ΚΑΛΑΘΙ($queryCart->num_rows)</a></li></ul>";
}else{
echo "<ul class='last'><li><a href='checkout.php'>ΚΑΛΑΘΙ(0)</a></li></ul>";
}
}else{
echo "<ul class='last'><li><a href=''>ΚΑΛΑΘΙ</a></li></ul>";
}
?>
</div>
</div>
<div class="clear"></div>
<ul class="megamenu skyblue" >
<li class="active grid"><a href="index.php">ΑΡΧΙΚΗ</a></li>
<li><a class="color4" href="#">ΤΡΟΦΙΜΑ</a>
<div class="megapanel">
<div class="row">
<div class="col1">
<div class="h_nav">
<h4>Κατηγορίες Τροφίμων</h4>
<ul>
<?php
$servername = "localhost";
$username = "cyfoodmuseum";
$password = "9m8ESxZD";
$dbname = "cyfoodmuseum";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
//@mysql_select_db($dbname) or die ("No database");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
echo "Connection faild";
}
if (!$conn->set_charset("utf8")) {
printf("Error loading character set utf8: %s\n", $conn->error);
} else {
//printf("Current character set: %s\n", $conn->character_set_name());
}//die;
$queryCat="SELECT * FROM `CATEGORY` WHERE `SubCategory`='1';";
$trofima=$conn->query($queryCat);
if ($trofima->num_rows>0){
while($row = $trofima->fetch_assoc()) {
$category=$row['CodeCat'];
$onomasia=$row['NameCat'];
echo '<li><a href="categorySearch.php?cat='.urlencode($category).'">'.$onomasia.'</a></li>';
}
}
?>
</ul>
</div>
</div>
</div>
</div>
</li>
<li><a class="color6" href="#">ΥΛΙΚΑ</a>
<div class="megapanel">
<div class="col1">
<div class="h_nav">
<h4>Υλικά</h4>
<ul>
<?php
$queryCatY="SELECT * FROM `CATEGORY` WHERE `SubCategory`='2';";
$ilika=$conn->query($queryCatY);
if ($ilika->num_rows>0){
while($row2 = $ilika->fetch_assoc()) {
$category=$row2['CodeCat'];
$onomasia=$row2['NameCat'];
echo '<li><a href="categorySearch.php?cat='.urlencode($category).'">'.$onomasia.'</a></li>';
}
}
?>
</ul>
</div>
</div>
</div>
</li>
<?php
$katigories="SELECT * FROM `CATEGORY` WHERE `SubCategory`='3';";
$all=$conn->query($katigories);
if ($all->num_rows>0){
while($row3 = $all->fetch_assoc()) {
$category=$row3['CodeCat'];
$onomasia=$row3['NameCat'];
//echo '<li><a href="categorySearch.php?cat='.urlencode($category).'">"$onomasia"</a></li>';
echo '<li><a class="color7" href="categorySearch.php?cat='.urlencode($category).'">'.$onomasia.'</a></li>';
}
}
?>
<li><a class="color7" href="prosfores.php">Προσφορες</a></li>
<li><a class="color7" href="estiatoria.php">εστιατορια</a></li>
<li><a class="color7" href="sintages.php">Συνταγες</a></li>
<!--<li><a class="color7" href="other.html">ΣΥΝΤΑΓΕΣ</a></li>
<li><a class="color7" href="other.html">ΕΣΤΙΑΤΟΡΙΑ</a></li>
<li><a class="color7" href="other.html">ΒΙΒΛΙΑ</a></li>-->
</ul>
<?php
if (isset($_SESSION['login_admin'])){
echo "<ul class='megamenu skyblue' >";
echo "<li><a class='color4' href='#'>ΡΥΘΜΙΣΕΙΣ</a>";
echo "<div class='megapanel'>";
echo "<div class='row'>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Ρυμίσεις Προϊόντων</h4>";
echo "<ul>";
echo "<li><a href='addProduct_dropdown.php'>Προσθήκη Προϊόντος</a></li>";
echo "<li><a href='removeProduct.php'>Διαγραφή Προϊόντος</a></li>";
echo "<li><a href='editProduct_selectCategory.php'>Επεξεργασία Προϊόντος</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Ρυμίσεις Μελών</h4>";
echo "<ul>";
echo "<li><a href='manageUsers.php'>Προβολή και Διαγραφή Μέλους</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Ρυμίσεις Κατηγοριών</h4>";
echo "<ul>";
echo "<li><a href='addCategory.php'>Προσθήκη Κατηγορίας</a></li>";
echo "<li><a href='removeCategory.php'>Διαγραφή Κατηγορίας</a></li>";
echo "<li><a href='editCategory_selectCategory.php'>Επεξεργασία Κατηγορίας</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Ρυμίσεις Παραγγελιών</h4>";
echo "<ul>";
echo "<li><a href='manageOrdersNotCompleted.php'>Επεξεργασία Παραγγελιών που δεν έχουν ολοκληρωθεί</a></li>";
echo "<li><a href='manageOrdersCompletedOrCanceled.php'>Προβολή Ολοκληρωμένων/Ακυρωμένων Παραγγελιών</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Ρυμίσεις Προμηθευτών</h4>";
echo "<ul>";
echo "<li><a href='addSupplier.php'>Προσθήκη Προμηθευτή</a></li>";
echo "<li><a href='removeSupplier.php'>Διαγραφή Προμηθευτή</a></li>";
echo "<li><a href='editSupplier_selectSupplier.php'>Επεξεργασία Προμηθευτή</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Ρυμίσεις Κουπονιών</h4>";
echo "<ul>";
echo "<li><a href='addCoupon.php'>Προσθήκη Κουπονιού</a></li>";
echo "<li><a href='deleteCoupon_select.php'>Διαγραφή Κουπονιού με δυνατότητα προβολής</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Ρυμίσεις Προσφορών</h4>";
echo "<ul>";
echo "<li><a href='addOffer_selectProduct.php'>Προσθήκη Προσφοράς</a></li>";
echo "<li><a href='removeOffer_selectProduct.php'>Αφαίρεση Προσφοράς - Επαναφορά Αρχικής Τιμής</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Προσθήκη Συνταγών</h4>";
echo "<ul>";
echo "<li><a href='addSintagi.php'>Προσθήκη Συνταγών</a></li>";
echo "<li><a href='deleteSintagi.php'>Διαγραφή Συνταγής</a></li>";
echo "</ul>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col1'>";
echo "<div class='h_nav'>";
echo "<h4>Διάφορα</h4>";
echo "<ul>";
echo "<li><a href='addAdmin.php'>Προσθήκη Διαχειριστή</a></li>";
echo "<li><a href='changePasswordAdmin.php'>Αλλαγή Κωδικού Πρόσβασης</a></li>";
echo "<li><a href='addSlide_select.php'>Προσθήκη φωτογραφιών για Slide αρχικής</a></li>";
echo "</ul>";
echo "</div> ";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</li> ";
echo "</ul>";
}
?>
<div class="clear"></div>
<br>
</div>
</div>
<br>
<h4 class="title" style="margin-left:50px;">η παραγγελια σασ ολοκληρωθηκε</h4>
<br>
<div class="wrap" id="anafora">
<h4 class="title">Αναφορα:</h4>
<h5 class="title" >Διεύθυνση αποστολής</h5>
<div class="clear"></div>
<p class="m_text2"><?php echo $_SESSION['addressSent']; ?></p>
<p class="m_text2"><?php echo $_SESSION['postalSent']; ?> <?php echo $_SESSION['citySent']; ?></p>
<p class="m_text2"><?php echo $_SESSION['countrySent']; ?></p>
<p class="m_text2"><?php echo $_SESSION['nameSent']; ?> <?php echo $_SESSION['surnSent']; ?></p>
<br>
<div class="clear"></div>
<br>
<h4 class="title">Προϊοντα</h4>
<div class="clear"></div>
<table>
<thead>
<tr>
<th class="txt-lt" style="width: 266px; height: 19px">Όνομα</th>
<th class="txt-lt" style="width: 291px; height: 19px">Ποσότητα</th>
<th class="txt-lt" style="width: 291px; height: 19px">Ποσό</th>
</tr>
</thead>
<tbody>
<?php
$antikeimena=$_SESSION['arithmosproiontwn'];
$address=$_SESSION['addressSent'];
$postalCode=$_SESSION['postalSent'];
$city=$_SESSION['citySent'];
$country=$_SESSION['countrySent'];
$name=$_SESSION['nameSent'];
$surn=$_SESSION['surnSent'];
$num=0;
$sinolo=0;
while($num<$antikeimena){
$proionOnoma=$_SESSION["onoma$num"];
$kodikosproion=$_SESSION["kodikos$num"];
$price=$_SESSION["timi$num"];
$varos=$_SESSION["varos$num"];
$posotita=$_SESSION["posotita$num"];
$poso=$_SESSION["poso$num"];
echo "<tr>";
echo "<td><p class='m_text2'>$proionOnoma</p></td>";
echo "<td><p class='m_text2'>$posotita</p></td>";
echo "<td><p class='m_text2'>$poso</p></td>";
echo "</tr>";
$sinolo=$sinolo+$poso;
$num=$num+1;
}
?>
<tr>
<td><br></td>
</tr>
<tr>
<th class="txt-lt" style="width: 266px; height: 19px">Σύνολο</th>
<td><h1 class="remove" style="width: 266px; height: 19px">€<?php echo $sinolo?></h1></td>
</tr>
</tbody>
</table>
<div class='clear'></div>
<br>
<br>
<h4 class='title'>πληρωσατε συνολικα: €<?php echo $sinolo?></h4>
</div>
<br>
<div class="wrap">
<button type="button" onclick="printDiv('anafora')" class="grey" value="ΕΚΤΥΠΩΣΗ ΑΝΑΦΟΡΑΣ">ΕΚΤΥΠΩΣΗ ΑΝΑΦΟΡΑΣ</button>
<br>
<br>
<br><br>
</div>
<div class="footer">
<div class="footer-middle">
<div class="wrap">
<div class="section group example">
<div class="col_1_of_f_1 span_1_of_f_1" >
<div class="section group example">
<div class="col_1_of_f_2 span_1_of_f_2">
<h2>ΠΛΗΡΟΦΟΡΙΕς</h2>
<ul class="f-list1">
<li><a href="about.php">Ποιοι Είμαστε</a></li>
<!-- <li><a href="terms.html">Όροι Χρήσης</a></li>-->
<li><a href="delivery.php">Τρόποι Πληρωμής και Παραγγελιών</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
</div>
<div class="col_1_of_f_1 span_1_of_f_1">
<div class="section group example">
<div class="col_1_of_f_2 span_1_of_f_2">
<h2>ΕΠΙΚΟΙΝΩΝΙΑ</h2>
<div class="company_address">
<p>Εικονικό Μουσείο Κυπριακών Τροφίμων και Διατροφής</p>
<p>Κύπρος</p>
<p>Κινητό Τηλέφωνο: 99 05 98 20</p>
<p>Fax: 22 77 06 76</p>
<p style="" >Email: <span>[email protected]</span></p>
<!--style="height: 24px"-->
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div class="clear"></div>
<div class="clear"></div>
<br>
<div class="auto-style1">
<img src="images/3.png" width="58"><span class="auto-style2">Καλέστε
μας στο: 99 05 98 20 </span>
<a href="https://www.facebook.com/pages/Cyprus-Food-Virtual-Museum/104034939677867?fref=ts" target="_blank"><img src="images/find_us_facebook_logo.gif" class="auto-style2" height="57" width="143"></a>
</div>
</div>
<div class="footer-bottom">
<div class="wrap">
<div class="f-list2">
<ul>
<li>Copyright: CyFoodMuseum Team, CS-ucy</li>
</ul>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</body>
</html>