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
|
<?php session_start(); $action = $_GET['action']; //$_SESSION['ItemBuy'] = $_GET['ItemNumber']; //$ItemNumber = $_SESSION['xxx']; //$ItemNumber = $_GET['ItemNumber']; //$ItemNumber = $_GLOBALS['selitem']; function lan_de () { $_SESSION['lang'] = 'de'; } function lan_en () { $_SESSION['lang'] = 'en'; } switch ($action) { case 'lan_de': lan_de (); break; case 'lan_en': lan_en (); break; } $ItemName=$_SESSION['ItemName'] ; //Item Name $ItemPrice=$_SESSION['ItemPrice']; //Item Price $ItemNumber=$_SESSION['ItemNumber']; //Item Number $ItemDesc=$_SESSION['ItemDesc']; //Item Number $ItemQty=$_SESSION['ItemQty']; // Item Quantity $ItemTotalPrice=$_SESSION['ItemTotalPrice']; //(Item Price x Quantity = Total) Get total amount of product; $TotalTaxAmount=$_SESSION['TotalTaxAmount']; //Sum of tax for all items in this order. $HandalingCost=$_SESSION['HandalingCost']; //Handling cost for this order. $InsuranceCost=$_SESSION['InsuranceCost']; //shipping insurance cost for this order. $ShippinDiscount=$_SESSION['ShippinDiscount']; //Shipping discount for this order. Specify this as negative number. $ShippinCost =$_SESSION['ShippinCost']; //Although you may change the value later, try to pass in a shipping amount that is reasonably accurate. $GrandTotal=$_SESSION['GrandTotal']; if($_SESSION['lang'] == 'de'){ //include 'http://patterns.bplaced.net/templates/header_w_nav.php'; include '../templates/header_w_nav.php'; echo '<div class="contentpp"><br/><p><h1 align="center">Deine Auswahl:</h1></p>'; } else {include '../templates/header_w_nav_en.php'; echo '<div class="contentpp"><br/><p><h1 align="center">Your choice:</h1></p>'; }
/* <!-- <div class="contentpp"><br/><p><h1 align="center">Deine Auswahl:</h1></p>--> <!-- <p>Du wirst in Kürze zu deinem Download wietergeleitet!</p>-->*/ include '../schnitte/login.php'; include '../schnitte/connect.php'; include 'config.php'; include 'paypal.class.php'; //Paypal redirects back to this page using ReturnURL, We should receive TOKEN and Payer ID if(isset($_GET["token"]) && isset($_GET["PayerID"])) { //we will be using these two variables to execute the "DoExpressCheckoutPayment" //Note: we haven't received any payment yet. $token = $_GET["token"]; $payer_id = $_GET["PayerID"]; $ItemNumber = $_SESSION['ItemNumber']; include '../schnitte/login.php'; $link = mysqli_connect($server, $user, $passwort, $datenbank); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } mysqli_set_charset($link, "utf8"); $result = MYSQLi_QUERY( $link, "SELECT * FROM $tabelle WHERE (ID = '$ItemNumber')" ); //$result = MYSQLi_QUERY( $link, "SELECT `bezeichnung`, `image`, `description`, `id`, `skill`, `link`, `preis`, `size` FROM $tabelle WHERE (ID = '$ItemNumber')" ); if($_SESSION['lang'] == 'de'){
$rows = mysqli_fetch_array($result,MYSQLI_ASSOC); echo '<div><table>'; echo '<table align="center">'; echo '<tr>'; echo '<td style="width:500px;">'; echo '<h3 align="center">'.$rows['bezeichnung'].'</h3>'; echo '<img src="http://patterns.bplaced.net/schnitte/img/'.$rows['image'].'" style="width:216px; border-radius: 10px" hspace="15" border="0" align="left" alt="'.$rows['bezeichnung'].'">'; echo '<br/><div style="margin-right:10px">Beschreibung: '.$rows['description'].'</div>'; echo '<br/><div style="margin-right:10px">Grösse: '.$rows['size'].'</div>'; echo '<br/><br style="clear:both;"><div style="width:150px; margin: 0 auto""><h3>Preis: '.$rows['preis'].'€</h3></div><br/>'; // ABBRECHEN echo '<br style="clear:both"><p style="width:450px; margin: 0 auto"><div style="float:left"><form action="http://patterns.bplaced.net/schnitte/schnitte.php?category=all" method="post" target="_top"> <input type="hidden" name="selitem" value="'.$rows['id'].'"> <input style="cursor:pointer" type="image" src="../payment/pp-btn/button_abbrechen.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal."></form></div>'; // BESTELLEN if ($rows['split'] == FALSE){ echo '<div style="float:right"><form action="http://patterns.bplaced.net/payment/confirmed.php" method="post" target="_top"> <input type="hidden" name="selitem" value="'.$row['id'].'"> <input style="cursor:pointer" type="image" src="../payment/pp-btn/x-click-but5.gif" border="0" name="submit" alt="Abbrechen/Cancel"></form></div>'; echo '</p></td></tr></table></div>'; } else { echo '<div style="float:right"><form action="http://patterns.bplaced.net/payment/payment_download_select_size.php" method="post" target="_top"> <input type="hidden" name="selitem" value="'.$rows['id'].'"> <input style="cursor:pointer" type="image" src="../payment/pp-btn/btn_paypal_en.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal."></form></div>'; echo '</p></td></tr></table></div>'; } } else { //$result=MYSQL_QUERY( "SELECT bezeichnung_en, image, description_en, skill, link, id, preis, size FROM $tabelle WHERE id = '$ItemNumber'") OR die("Keine Einträge vorhanden!"); //$row = mysql_fetch_array($result); $rows = mysqli_fetch_array($result,MYSQLI_ASSOC); echo '<div><table>'; echo '<table align="center">'; echo '<tr>'; echo '<td style="width:500px;">'; echo '<h3 align="center">'.$rows['bezeichnung_en'].'</h3>'; echo '<img src="http://patterns.bplaced.net/schnitte/img/'.$rows['image'].'" style="width:216px; border-radius: 10px" hspace="15" border="0" align="left" alt="'.$rows['bezeichnung_en'].'">'; echo '<br/><div style="margin-right:10px">Description: '.$rows['description_en'].'</div>'; echo '<br/><div style="margin-right:10px">Size: '.$rows['size'].'</div>'; echo '<br/><br style="clear:both;"><div style="width:150px; margin: 0 auto""><h3>Price: '.$rows['preis'].'€</h3></div><br/>'; // CANCEL echo '<br style="clear:both"><p style="width:450px; margin: 0 auto"><div style="float:left"><form action="http://patterns.bplaced.net/schnitte/schnitte.php?category=all" method="post" target="_top"> <input type="hidden" name="selitem" value="'.$rows['id'].'"> <input style="cursor:pointer" type="image" src="../payment/pp-btn/button_cancel.gif" border="0" name="submit" alt="Abbrechen/Cancel"></form></div>'; // PURCHASE if ($rows['split'] == FALSE){ echo '<div style="float:right"><form action="http://patterns.bplaced.net/payment/confirmed.php" method="post" target="_top"> <input type="hidden" name="selitem" value="'.$rows['id'].'"> <input style="cursor:pointer" type="image" src="../payment/pp-btn/btn_paypal_en.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal."></form></div>'; echo '</p></td></tr></table></div>'; } else { echo '<div style="float:right"><form action="http://patterns.bplaced.net/payment/payment_download_select_size.php" method="post" target="_top"> <input type="hidden" name="selitem" value="'.$rows['id'].'"> <input style="cursor:pointer" type="image" src="../payment/pp-btn/btn_paypal_en.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal."></form></div>'; echo '</p></td></tr></table></div>'; } } //get session variables $ItemName = $_SESSION['ItemName']; //Item Name $ItemPrice = $_SESSION['ItemPrice'] ; //Item Price $ItemNumber = $_SESSION['ItemNumber']; //Item Number $ItemDesc = $_SESSION['ItemDesc']; //Item Number $ItemQty = $_SESSION['ItemQty']; // Item Quantity $ItemTotalPrice = $_SESSION['ItemTotalPrice']; //(Item Price x Quantity = Total) Get total amount of product; $TotalTaxAmount = $_SESSION['TotalTaxAmount'] ; //Sum of tax for all items in this order. $HandalingCost = $_SESSION['HandalingCost']; //Handling cost for this order. $InsuranceCost = $_SESSION['InsuranceCost']; //shipping insurance cost for this order. $ShippinDiscount = $_SESSION['ShippinDiscount']; //Shipping discount for this order. Specify this as negative number. $ShippinCost = $_SESSION['ShippinCost']; //Although you may change the value later, try to pass in a shipping amount that is reasonably accurate. $GrandTotal = $_SESSION['GrandTotal'];
$padata = '&TOKEN='.urlencode($token). '&PAYERID='.urlencode($payer_id). '&PAYMENTREQUEST_0_PAYMENTACTION='.urlencode("SALE"). //set item info here, otherwise we won't see product details later '&L_PAYMENTREQUEST_0_NAME0='.urlencode($ItemName). '&L_PAYMENTREQUEST_0_NUMBER0='.urlencode($ItemNumber). '&L_PAYMENTREQUEST_0_DESC0='.urlencode($ItemDesc). '&L_PAYMENTREQUEST_0_AMT0='.urlencode($ItemPrice). '&L_PAYMENTREQUEST_0_QTY0='. urlencode($ItemQty).
/* //Additional products (L_PAYMENTREQUEST_0_NAME0 becomes L_PAYMENTREQUEST_0_NAME1 and so on) '&L_PAYMENTREQUEST_0_NAME1='.urlencode($ItemName2). '&L_PAYMENTREQUEST_0_NUMBER1='.urlencode($ItemNumber2). '&L_PAYMENTREQUEST_0_DESC1=Description text'. '&L_PAYMENTREQUEST_0_AMT1='.urlencode($ItemPrice2). '&L_PAYMENTREQUEST_0_QTY1='. urlencode($ItemQty2). */
'&PAYMENTREQUEST_0_ITEMAMT='.urlencode($ItemTotalPrice). '&PAYMENTREQUEST_0_TAXAMT='.urlencode($TotalTaxAmount). '&PAYMENTREQUEST_0_SHIPPINGAMT='.urlencode($ShippinCost). '&PAYMENTREQUEST_0_HANDLINGAMT='.urlencode($HandalingCost). '&PAYMENTREQUEST_0_SHIPDISCAMT='.urlencode($ShippinDiscount). '&PAYMENTREQUEST_0_INSURANCEAMT='.urlencode($InsuranceCost). '&PAYMENTREQUEST_0_AMT='.urlencode($GrandTotal). '&PAYMENTREQUEST_0_CURRENCYCODE='.urlencode($PayPalCurrencyCode); $_SESSION['padata'] = $padata; /*echo 'Bis hierher!!!!';*/ $_SESSION['token'] =$token; } /*echo 'Your Transaction ID : '.urldecode($httpParsedResponseAr["PAYMENTREQUESTINFO_0_TRANSACTIONID"]); echo 'Your Transaction ID : '.$ItemNumber.'xx';*/ ?> <!--<p>Gerade das Ausarbeiten und Anpassen der historischen Schnittmuster auf die moderne Figur erfordert einiges an Zeit, weshalb es zwar immer wieder einen neuen Schnitt geben wird, aber leider nicht regelmäßig jedes Monat.</p> <p>Besonderen Wert lege ich auch auf ein gut ausgearbeitetes Schnittmuster und eine ausführliche Anleitung. Sollten sich einmal Fehler eingeschlichen haben bitte ich euch um <a href="../kontaktform.php">Rückmeldung</a>. </p> <p>Ich wünsche Dir viel Spaß beim Stöbern und viel Erfolg beim Nähen!</p>--> </div> </div> <div class="footer"><div align="center" style="font-size:70%">Impressum:<br/>Black Snail Patterns<br/>R. Kohlberger<br/>Kreutern 249, A-4820 Bad Ischl<br/> <a href="mailto:blacksnailpatterns@gmx.at">blacksnailpatterns@gmx.at</a> </div> </div> <?php include("../templates/foot.html"); ?>
|