126) ) { $h2 = floor($dec/16); $h1 = floor($dec%16); $c = $escape.$hex["$h2"].$hex["$h1"]; } if ( (strlen($newline) + strlen($c)) >= $line_max ) { $output .= $newline.$escape.$eol; $newline = ""; } $newline .= $c; } $output .= $newline; if ($j 32767){ $rtn = -32768 + ($rtn - 32767); } $n++; } return abs($rtn); } function xEncryption($myString, $myKey) { // Verschlüsselung durchführen $pos=0; $rtn=""; for ($i = 0; $i < strlen($myString); $i++){ if ($pos >= strlen($myKey)) $pos = 0; $rtn .= substr($myString, $i, 1) ^ substr($myKey, $pos, 1); $pos = $pos + 1; } return $rtn; } function xSplit($myString) { // Auf Zeilen verteilen $j=0; $rtn=""; for ($i = 0; $i < strlen($myString); $i++){ $rtn .= substr($myString, $i, 1); $j++; if ($j==40) { $rtn .= "\n"; $j=0; } } return $rtn; } function xHexString($myString) { // In Hex-Stream umwandeln $rtn=""; for ($i = 0; $i < strlen($myString); $i++){ $myHex = dechex(ord(substr($myString, $i, 1))); if (strlen($myHex) == 1){ $myHex = "0" . $myHex; } $rtn .= $myHex; } return $rtn; } function postVars($myKey) { // Gibt die HTTP-Post-Variablen zurück global $HTTP_POST_VARS; if (isset($HTTP_POST_VARS[$myKey])) { return (htmlentities($HTTP_POST_VARS[$myKey])); } else { return (""); } } function postVarsPlain($myKey) { // Gibt die HTTP-Post-Variablen zurück global $HTTP_POST_VARS; if (isset($HTTP_POST_VARS[$myKey])) { return ($HTTP_POST_VARS[$myKey]); } else { return (""); } } function cookieVars($myKey) { // Gibt die HTTP-Cookie-Variablen zurück global $HTTP_COOKIE_VARS; if (isset($HTTP_COOKIE_VARS[$myKey])) { return ($HTTP_COOKIE_VARS[$myKey]); } else { return (""); } } function echoPostVars() { // erzeugt ein Variablen-Echo global $HTTP_POST_VARS; reset($HTTP_POST_VARS); if (count($HTTP_POST_VARS)!=0) { while (list($key, $value) = each ($HTTP_POST_VARS)) { echo ("\n"); } } } function createXMail() { // erzeugt eine X400-Mail $i=1; $mymail=""; // Block Order $mymail.= "OCUR:".postVarsPlain("OCUR")."\n"; $mymail.= "OB2B:".postVarsPlain("OB2B")."\n"; $mymail.= "OSHP:".postVarsPlain("OSHP")."\n"; $mymail.= "OSPR:".number_format((float)postVarsPlain("OSPR"),2,".","")."\n"; $mymail.= "OSPV:".postVarsPlain("OSPV")."\n"; $mymail.= "OPAY:".postVarsPlain("OPAY")."\n"; $mymail.= "OWGT:".number_format((float)postVarsPlain("OWGT"),3,".","")."\n"; $mymail.= "OUID:".postVarsPlain("OUID")."\n"; $mymail.= "ODAT:".postVarsPlain("ODAT")."\n"; $mymail.= "OTIM:".postVarsPlain("OTIM")."\n"; $mymail.= "OINF:".str_replace("\n","
",postVarsPlain("OINF"))."\n"; if (postVars("GPR0")=="ccard") { $mymail.= "OEXT:Kartennummer: ".postVars("CCNR")."
Gültig bis (MM/JJ): ".postVars("CCVL")."
Karteninhaber: ".postVars("CCHL")."\n"; } if (postVars("GPR0")=="debit") { $mymail.= "OEXT:Kontonummer: ".postVars("CDAN")."
Kreditinstitut: ".postVars("CDBN")."
BLZ: ".postVars("CDBI")."
Kontoinhaber: ".postVars("CDBH")."\n"; } // Block Customer $mymail.= "CSAL:".postVarsPlain("CSAL")."\n"; $mymail.= "CNAM:".postVarsPlain("CNAM")."\n"; $mymail.= "CSTR:".postVarsPlain("CSTR")."\n"; $mymail.= "CCTY:".postVarsPlain("CCTY")."\n"; $mymail.= "CCNT:".substr(postVarsPlain("CCNT"),11)."\n"; $mymail.= "CPHO:".postVarsPlain("CPHO")."\n"; $mymail.= "CMOB:".postVarsPlain("CMOB")."\n"; $mymail.= "CFAX:".postVarsPlain("CFAX")."\n"; $mymail.= "CNEW:".postVarsPlain("CNEW")."\n"; $mymail.= "CEML:".postVarsPlain("CEML")."\n"; // Block Recipient if (postVars("RNAM")=="") { $mymail.= "RSAL:".postVarsPlain("CSAL")."\n"; $mymail.= "RNAM:".postVarsPlain("CNAM")."\n"; $mymail.= "RSTR:".postVarsPlain("CSTR")."\n"; $mymail.= "RCTY:".postVarsPlain("CCTY")."\n"; $mymail.= "RCNT:".substr(postVarsPlain("CCNT"),11)."\n"; } else { $mymail.= "RSAL:".postVarsPlain("RSAL")."\n"; $mymail.= "RNAM:".postVarsPlain("RNAM")."\n"; $mymail.= "RSTR:".postVarsPlain("RSTR")."\n"; $mymail.= "RCTY:".postVarsPlain("RCTY")."\n"; $mymail.= "RCNT:".substr(postVarsPlain("RCNT"),11)."\n"; } // Block Positionen while (postVars("PUID".$i)!="") { $mymail.= "PUID".":".postVarsPlain("PUID".$i)."\n"; $mymail.= "PQNT".":".postVarsPlain("PQNT".$i)."\n"; $mymail.= "PUNT".":".postVarsPlain("PUNT".$i)."\n"; $mymail.= "PPID".":".postVarsPlain("PPID".$i)."\n"; $mymail.= "PCAP".":".postVarsPlain("PCAP".$i)."\n"; $mymail.= "PVAT".":".postVarsPlain("PVAT".$i)."\n"; $mymail.= "PPRI".":".number_format((float)postVarsPlain("PPRI".$i),2,".","")."\n"; $mymail.= "PRVA".":".postVarsPlain("PRVA".$i)."\n"; $mymail.= "PRVB".":".postVarsPlain("PRVB".$i)."\n"; $i++; } return $mymail; } function createHTMLMail($safemode) { // erzeugt eine HTML-Mail $i=1; $mymail=""; // Header $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.="\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; // Adressen $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.="\n"; $mymail.="
\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; if (postVars("CMOB")!="") { $mymail.= "\n"; } if (postVars("CFAX")!="") { $mymail.= "\n"; } $mymail.= "\n"; $mymail.= "
Rechnungsadresse:
".postVars("CSAL")."
".postVars("CNAM")."
".postVars("CSTR")."
".postVars("CCTY")."

".substr(postVars("CCNT"),11)."

"."Telefon: ".postVars("CPHO")."
"."Mobil: ".postVars("CMOB")."
"."Fax: ".postVars("CFAX")."
"."E-Mail: ".postVars("CEML")."


\n"; $mymail.= "
\n"; $mymail.= "\n"; $mymail.= "\n"; if (postVars("RNAM")=="") { $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; } else { $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; } $mymail.= "
Lieferadresse:
".postVars("CSAL")."
".postVars("CNAM")."
".postVars("CSTR")."
".postVars("CCTY")."

".substr(postVars("CCNT"),11)."

".postVars("RSAL")."
".postVars("RNAM")."
".postVars("RSTR")."
".postVars("RCTY")."

".substr(postVars("RCNT"),11)."

\n"; $mymail.= "
\n"; // Positionen $mymail.= "\n"; $mymail.= "\n\n\n\n\n"; $mymail.= "\n"; while (postVars("PUID".$i)!="") { $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $i++; } $mymail.="\n"; $mymail.="\n"; $mymail.= "\n"; $mymail.="\n"; if (postVarsPlain("OB2B")=="") { $mymail.="\n"; $mymail.="\n"; $mymail.= "\n"; $mymail.="\n"; } else { $mymail.="\n"; $mymail.="\n"; $mymail.= "\n"; $mymail.="\n"; $mymail.="\n"; $mymail.="\n"; $mymail.= "\n"; $mymail.="\n"; $mymail.="\n"; $mymail.="\n"; $mymail.= "\n"; $mymail.="\n"; } $mymail.="\n"; $mymail.=""; $mymail.="\n"; $mymail.= "
AnzahlProd.-IDBezeichnungEinzelpreisGesamtpreis
".postVars("PQNT".$i)."".postVars("PUNT".$i)."".postVars("PPID".$i)."".postVars("PCAP".$i)."".number_format((float)postVars("PPRI".$i),2,",",".")." ".postVars("OCUR")."".number_format((float)postVars("PPRI".$i)*postVars("PQNT".$i),2,",",".")." ".postVars("OCUR")."
Versandkosten:".number_format((float)postVars("OSPR"),2,",",".")." ".postVars("OCUR")."
Rechnungsbetrag:".number_format((float)postVars("OTOT"),2,",",".")." ".postVars("OCUR")."
:".number_format((float)postVars("OTOT")-(float)postVars("OTVT"),2,",",".")." ".postVars("OCUR")."
Ust:".number_format((float)postVars("OTVT"),2,",",".")." ".postVars("OCUR")."
:".number_format((float)postVars("OTOT"),2,",",".")." ".postVars("OCUR")."

\n"; if (postVarsPlain("OB2B")=="") { $mymail.="\n"; } else { $mymail.="\n"; } $mymail.="
\n"; $mymail.= "
\n"; // Details $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; if (postVars("OWGT") > 0) { $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; } $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; if (postVars("GPR0")=="ccard") { $mymail.= "\n"; $mymail.= "\n"; if ($safemode==TRUE) { $mymail.= "\n"; } else { $mymail.= "\n"; } $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; } if (postVars("GPR0")=="debit") { $mymail.= "\n"; $mymail.= "\n"; if ($safemode==TRUE) { $mymail.= "\n"; } else { $mymail.= "\n"; } $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; } if (postVars("OINF")!="") { $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; } $mymail.= "
Bestelldetails:
Bestelldatum:  ".postVarsPlain("ODAT")."
Bestellzeit:  ".postVarsPlain("OTIM")."
Gewünschte Versandart:  ".postVars("OSHP")."
Versandkosten:  ".number_format(postVars("OSPR"),2,",",".")." ".postVars("OCUR"); $mymail.= " (".number_format(postVars("OSPV"),2,",","")."% Ust)
Gesamtgewicht:  ".number_format(postVars("OWGT"),3,",",".")." kg
Gewünschte Zahlungsweise:  ".postVars("OPAY")."
Kartennummer:  [...] ".substr(postVars("CCNR"),-4)."".postVars("CCNR")."
Gültig bis (MM/JJ):  ".postVars("CCVL")."
Karteninhaber:  ".postVars("CCHL")."
Kontonummer:  [...] ".substr(postVars("CDAN"),-4)."".postVars("CDAN")."
Kreditinstitut:  ".postVars("CDBN")."
BLZ:  ".postVars("CDBI")."
Nachricht:  ".nl2br(postVars("OINF"))."
"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; // Hinweistext ausgeben $showinfotext=; if ($showinfotext==1) { $handle = fopen ("infotext.txt", "r"); $infotext = fread ($handle, 64000); fclose ($handle); $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; $mymail.= "\n"; } $mymail.= "


".postVars("GMSE")."

".postVarsPlain("GSAD")."



".nl2br($infotext)."
\n"; $mymail.= "\n"; $mymail.= ""; return $mymail; } function createTextMail($safemode) { // erzeugt eine Text-Mail $i=1; $mymail=""; // Adressen $mymail.= "Rechnungsadresse:\n"; $mymail.= PostVarsPlain("CSAL")."\n"; $mymail.= PostVarsPlain("CNAM")."\n"; $mymail.= PostVarsPlain("CSTR")."\n"; $mymail.= PostVarsPlain("CCTY")."\n"; $mymail.= substr(PostVarsPlain("CCNT"),11)."\n"; $mymail.= "Telefon: ".PostVarsPlain("CPHO")."\n"; if (PostVarsPlain("CMOB")!="") { $mymail.= "Mobil: ".PostVarsPlain("CMOB")."\n"; } if (PostVarsPlain("CFAX")!="") { $mymail.= "Fax: ".PostVarsPlain("CFAX")."\n"; } $mymail.= "E-Mail: ".PostVarsPlain("CEML")."\n\n"; $mymail.= "Lieferadresse:\n"; if (PostVarsPlain("RNAM")=="") { $mymail.= PostVarsPlain("CSAL")."\n"; $mymail.= PostVarsPlain("CNAM")."\n"; $mymail.= PostVarsPlain("CSTR")."\n"; $mymail.= PostVarsPlain("CCTY")."\n"; $mymail.= substr(PostVarsPlain("CCNT"),11)."\n\n"; } else { $mymail.= PostVarsPlain("RSAL")."\n"; $mymail.= PostVarsPlain("RNAM")."\n"; $mymail.= PostVarsPlain("RSTR")."\n"; $mymail.= PostVarsPlain("RCTY")."\n"; $mymail.= substr(PostVarsPlain("RCNT"),11)."\n\n"; } // Positionen while (PostVarsPlain("PUID".$i)!="") { $mymail.= PostVarsPlain("PQNT".$i); $mymail.= " ".PostVarsPlain("PUNT".$i).": "; $mymail.= PostVarsPlain("PCAP".$i)."\n"; if (PostVarsPlain("PPID".$i)!="") { $mymail.= "(".PostVarsPlain("PPID".$i).") "; } $mymail.= number_format((float)PostVarsPlain("PPRI".$i),2,",",".")." ".PostVarsPlain("OCUR")." / "; $mymail.= number_format((float)PostVarsPlain("PPRI".$i)*PostVarsPlain("PQNT".$i),2,",",".")." ".PostVarsPlain("OCUR")."\n\n"; $i++; } $mymail.="Versandkosten: "; $mymail.= number_format((float)PostVarsPlain("OSPR"),2,",",".")." ".PostVarsPlain("OCUR")."\n\n"; if (postVarsPlain("OB2B")=="") { $mymail.="Rechnungsbetrag: "; $mymail.= number_format((float)PostVarsPlain("OTOT"),2,",",".")." ".PostVarsPlain("OCUR")."\n\n"; $mymail.="\n\n"; } else { $mymail.=": "; $mymail.= number_format((float)PostVarsPlain("OTOT")-(float)PostVarsPlain("OTVT"),2,",",".")." ".PostVarsPlain("OCUR")."\n"; $mymail.="Ust: "; $mymail.= number_format((float)PostVarsPlain("OTVT"),2,",",".")." ".PostVarsPlain("OCUR")."\n"; $mymail.=": "; $mymail.= number_format((float)PostVarsPlain("OTOT"),2,",",".")." ".PostVarsPlain("OCUR")."\n\n"; $mymail.="\n\n"; } // Details $mymail.= "\nBestelldetails:\n"; $mymail.= "\nBestelldatum: "; $mymail.= PostVarsPlain("ODAT"); $mymail.= "\nBestellzeit: "; $mymail.= PostVarsPlain("OTIM"); $mymail.= "\nGewünschte Versandart: "; $mymail.= PostVarsPlain("OSHP"); $mymail.= "\nVersandkosten: "; $mymail.= number_format(PostVarsPlain("OSPR"),2,",",".")." ".PostVarsPlain("OCUR"); $mymail.= " (".number_format(PostVarsPlain("OSPV"),2,",","")."% Ust)"; if (PostVarsPlain("OWGT") > 0) { $mymail.= "\nGesamtgewicht: "; $mymail.= number_format(PostVarsPlain("OWGT"),3,",",".")." kg"; } $mymail.= "\nGewünschte Zahlungsweise: "; $mymail.= PostVarsPlain("OPAY"); if (PostVarsPlain("GPR0")=="ccard") { $mymail.= "\nKartennummer: "; if ($safemode==TRUE) { $mymail.= "[...] ".substr(PostVarsPlain("CCNR"),-4); } else { $mymail.= PostVarsPlain("CCNR"); } $mymail.= "\nGültig bis (MM/JJ): "; $mymail.= PostVarsPlain("CCVL"); $mymail.= "\nKarteninhaber: "; $mymail.= PostVarsPlain("CCHL"); } if (PostVarsPlain("GPR0")=="debit") { $mymail.= "\nKontonummer: "; if ($safemode==TRUE) { $mymail.= "[...] ".substr(PostVarsPlain("CDAN"),-4); } else { $mymail.= PostVarsPlain("CDAN"); } $mymail.= "\nKreditinstitut: "; $mymail.= PostVarsPlain("CDBN"); $mymail.= "\nBLZ: "; $mymail.= PostVarsPlain("CDBI"); } if (PostVarsPlain("OINF")!="") { $mymail.= "\n\nNachricht:\n"; $mymail.= PostVarsPlain("OINF"); } $mymail.= "\n\n".PostVarsPlain("GMSE"); $mymail.= "\n\n".str_replace("
","\n",PostVarsPlain("GSAD")); $showinfotext=; if ($showinfotext==1) { $handle = fopen ("plaintext.txt", "r"); $infotext = fread ($handle, 64000); fclose ($handle); $mymail.= "\n\n\n\n"; $mymail.= $infotext."\n"; } return $mymail; } function createMimeMail($safemode) { $mymime="This is a multi-part message in MIME format.\n\n"; $mymime.="----SHOP2DATEORDER\n"; $mymime.="Content-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n"; $mymime.="Content-Transfer-Encoding: quoted-printable\n\n"; $mymime.=quoted_printable_encode(createTextMail($safemode))."\n"; $mymime.="----SHOP2DATEORDER\n"; $mymime.="Content-Type: text/html;\n\tcharset=\"iso-8859-1\"\n"; $mymime.="Content-Transfer-Encoding: quoted-printable\n\n"; $mymime.=quoted_printable_encode(createHTMLMail($safemode))."\n"; $mymime.="----SHOP2DATEORDER--\n"; return $mymime; } function setCookies() { // Speichert die Benutzereingaben als Cookies if (postVars("CSAV")!="") { setcookie("CEML",postVars("CEML"), time()+360*60*24*30); setcookie("CNAM",postVars("CNAM"), time()+360*60*24*30); setcookie("CSTR",postVars("CSTR"), time()+360*60*24*30); setcookie("CCTY",postVars("CCTY"), time()+360*60*24*30); setcookie("CCNT",postVars("CCNT"), time()+360*60*24*30); setcookie("CSAL",postVars("CSAL"), time()+360*60*24*30); setcookie("CPHO",postVars("CPHO"), time()+360*60*24*30); setcookie("CMOB",postVars("CMOB"), time()+360*60*24*30); setcookie("CFAX",postVars("CFAX"), time()+360*60*24*30); setcookie("RSAL",postVars("RSAL"), time()+360*60*24*30); setcookie("RNAM",postVars("RNAM"), time()+360*60*24*30); setcookie("RSTR",postVars("RSTR"), time()+360*60*24*30); setcookie("RCTY",postVars("RCTY"), time()+360*60*24*30); setcookie("RCNT",postVars("RCNT"), time()+360*60*24*30); setcookie("CNEW",postVars("CNEW"), time()+360*60*24*30); setcookie("CSAV","1", time()+360*60*24*30); } else { setcookie("CEML","", time()-3600); setcookie("CNAM","", time()-3600); setcookie("CSTR","", time()-3600); setcookie("CCTY","", time()-3600); setcookie("CSAL","", time()-3600); setcookie("CPHO","", time()-3600); setcookie("CFAX","", time()-3600); setcookie("CMOB","", time()-3600); setcookie("CSAV","", time()-3600); setcookie("CCNT","", time()-3600); setcookie("RSAL","", time()-3600); setcookie("RNAM","", time()-3600); setcookie("RSTR","", time()-3600); setcookie("RCTY","", time()-3600); setcookie("RCNT","", time()-3600); setcookie("CNEW","", time()-3600); } } function printOptionCountry($options, $selected) { // Erzeugt ein HTML-Option Feld aus einem Array // Verwednung für Länder for ($i=0;$i".substr($options[$i],11)."\n"); } } function printOptionSalutation($options, $selected) { // Erzeugt ein HTML-Option Feld aus einem Array // Verwendung für Anreden for ($i=0;$i".$options[$i]."\n"); } } function printTrustedShops($payment) { echo("\n"); echo("\n"); echo(""); echo(""); echo(""); echo("
\n"); echo("
\n"); echo("\n"); echo("\n"); echo("
"); echo("
"); echo("
\n"); echo("\n"); echo("\n"); echo("\n"); $name=str_replace("'"," ",trim(postVars("CNAM"))); $pos=strrpos($name," "); if ($pos) { echo("\n"); echo("\n"); } else { echo ("\n"); echo ("\n"); } echo("\n"); $name=str_replace("'"," ",trim(postVars("CCTY"))); $pos=strpos($name," "); if ($pos) { echo("\n"); echo("\n"); } else { echo("\n"); echo("\n"); } echo("\n"); echo(""); echo("\n"); echo("\n"); echo("\n"); echo("\n"); echo("

Als Trusted Shops Mitglied bieten wir Ihnen als zusätzlichen Service die Geld-zurück-Garantie der Gerling Versicherungsgruppe an. Wir übernehmen alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.

"); echo("

\n"); echo("
"); echo("
"); } function printOrder() { // Gibt eine Bestellbestätigung aus setCookies(); printHeader(); $MailPlain="marketing@superstar-mallorca.com"; $MailEncrypted=""; $MailNoMime=0; $order = xEncryption(createXMail(),ENCRYPTION_KEY); $order = xHexString($order); $myLen = strlen($order); $myLen = dechex($myLen); while (strlen($myLen) < 6) { $myLen = "0" . $myLen; } $mySum = xCheckSum($order); $mySum = dechex($mySum); while (strlen($mySum) < 6) { $mySum = "0" . $mySum; } // Verschlüsselte Mail if ($MailEncrypted!="") { $order = MAIL_HEADER . "\n" . xSplit($order . $myLen . $mySum) . "\n" . MAIL_FOOTER; mail ($MailEncrypted, "shop2dateorder1.0", $order); } // Bestätigung an Betreiber if ($MailPlain!="") { if ($MailNoMime==0) { mail ($MailPlain, "FWD: Ihre Bestellung ist eingegangen", createMimeMail(FALSE), "From: \"Superstar Photo & Make Up Professional\" \nReply-To: <".postVars("CEML").">\nMIME-Version: 1.0\nContent-Type: multipart/alternative;\n\tboundary=\"--SHOP2DATEORDER\"\nX-Mailer: shop to date Order-Gateway Version 1.0"); } else { mail ($MailPlain, "FWD: Ihre Bestellung ist eingegangen", createTextMail(FALSE), "From: \"Superstar Photo & Make Up Professional\" \nReply-To: \nMIME-Version: 1.0\nContent-Type: text/plain;\n\tcharset=\"iso-8859-1\"\nContent-Transfer-Encoding: 8bit\nX-Mailer: shop to date Order-Gateway Version 1.0"); } } // An Kunden if ($MailNoMime==0) { mail (postVars("CEML"), "Ihre Bestellung ist eingegangen", createMimeMail(TRUE), "From: \"Superstar Photo & Make Up Professional\" \nReply-To: \nMIME-Version: 1.0\nContent-Type: multipart/alternative;\n\tboundary=\"--SHOP2DATEORDER\"\nX-Mailer: shop to date Order-Gateway Version 1.0"); } else { mail (postVars("CEML"), "Ihre Bestellung ist eingegangen", createTextMail(TRUE), "From: \"Superstar Photo & Make Up Professional\" \nReply-To: \nMIME-Version: 1.0\nContent-Type: text/plain;\n\tcharset=\"iso-8859-1\"\nContent-Transfer-Encoding: 8bit\nX-Mailer: shop to date Order-Gateway Version 1.0"); } switch (postVars("GPR0")) { // Worldpay case "worldpay": echo ("\n"); if (PostVars("GTSI")!="") { echo ("

Schritt 1: Kreditkartendaten eingeben

"); } else { echo ("

Kreditkartendaten eingeben

"); } echo ("

".postVars("GMSP")."

\n"); echo ("
\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("

"); echo (""); echo ("

"); echo ("
\n"); if (PostVars("GTSI")!="") { echo ("

Schritt 2: Anmeldung zur Geld-zurück-Garantie

"); printTrustedShops(2); } break; // WebTRADE.NET case "webtrade": echo ("\n"); if (PostVars("GTSI")!="") { echo ("

Schritt 1: Kreditkartendaten eingeben

"); } else { echo ("

Kreditkartendaten eingeben

"); } echo ("

".postVars("GMSP")."

\n"); echo ("
\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); $name=str_replace("'"," ",trim(postVars("CNAM"))); $pos=strrpos($name," "); if ($pos) { echo ("\n"); echo ("\n"); } else { echo ("\n"); echo ("\n"); } $name=str_replace("'"," ",trim(postVars("CSTR"))); $pos=strrpos($name," "); if ($pos) { echo ("\n"); echo ("\n"); } else { echo ("\n"); echo ("\n"); } $name=str_replace("'"," ",trim(postVars("CCTY"))); $pos=strpos($name," "); if ($pos) { echo ("\n"); echo ("\n"); } else { echo ("\n"); echo ("\n"); } echo ("\n"); echo ("

"); echo (""); echo ("

"); echo ("
\n"); if (PostVars("GTSI")!="") { echo ("

Schritt 2: Anmeldung zur Geld-zurück-Garantie

"); printTrustedShops(2); } break; // Saferpay case "saferpay": echo ("\n"); if (PostVars("GTSI")!="") { echo ("

Schritt 1: Kreditkartendaten eingeben

"); } else { echo ("

Kreditkartendaten eingeben

"); } echo ("

".postVars("GMSP")."

\n"); $amount=floor((float)postVars("OTOT")*100); $query="http://support.saferpay.de/scripts/CreatePayInit.asp"; $query.="?ACCOUNTID=".postVars("GPR1"); $query.="&PROFILE=DataBecker"; $query.="&AMOUNT=".$amount; $query.="&CURRENCY=".postVars("OCUR"); $query.="&ORDERID=".postVarsPlain("OUID"); $query.="&DESCRIPTION=".urlencode("Ihre Bestellung vom ".postVarsPlain("ODAT")); $url=join("", file($query)); echo ("

"); echo ("\n"); if (PostVars("GTSI")!="") { echo ("

Schritt 2: Anmeldung zur Geld-zurück-Garantie

"); printTrustedShops(2); } break; // Normal default: echo ("\n"); echo ("

".postVars("GMSP")."

"); if (PostVars("GTSI")!="") { echo ("

Anmeldung zur Geld-zurück-Garantie

"); printTrustedShops(""); } } } function printForm() { // Das Benutzerdaten-Formular anzeigen $salutation= array("Herr","Frau","Firma"); $country=array("DE,DEU,276:Deutschland", "AF,AFG,004:Afghanistan", "EG,EGY,818:Ägypten", "AL,ALB,008:Albanien", "DZ,DZA,012:Algerien", "AS,ASM,016:Amerikanisch-Samoa", "AD,AND,020:Andorra", "AO,AGO,024:Angola", "AI,AIA,660:Anguilla", "AQ,ATA,010:Antarktis", "AG,ATG,028:Antigua und Barbuda", "GQ,GNQ,226:Äquatorialguinea", "AR,ARG,032:Argentinien", "AM,ARM,051:Armenien", "AW,ABW,533:Aruba", "AZ,AZE,031:Aserbeidschan", "ET,ETH,231:Äthiopien", "AU,AUS,036:Australien", "BS,BHS,044:Bahamas", "BH,BHR,048:Bahrain", "BD,BGD,050:Bangladesh", "BB,BRB,052:Barbados", "BY,BLR,112:Belarus", "BE,BEL,056:Belgien", "BZ,BLZ,084:Belize", "BJ,BEN,204:Benin", "BM,BMU,060:Bermuda-Inseln", "BT,BTN,064:Bhutan", "BO,BOL,068:Bolivien", "BA,BIH,070:Bosnien-Herzegowina", "BW,BWA,072:Botswana", "BV,BVT,074:Bouvet-Insel", "BR,BRA,076:Brasilien", "IO,IOT,086:Britische Territorien im Indischen Ozean", "BN,BRN,096:Brunei", "BG,BGR,100:Bulgarien", "BF,BFA,854:Burkina Faso", "BI,BDI,108:Burundi", "CL,CHL,152:Chile", "CN,CHN,156:China", "CK,COK,184:Cook-Inseln", "CR,CRI,188:Costa Rica", "DK,DNK,208:Dänemark", "DJ,DJI,262:Djibouti", "DM,DMA,212:Dominica", "DO,DOM,214:Dominikanische Republik", "SV,SLV,222:El Salvador", "CI,CIV,384:Elfenbeinküste", "EC,ECU,218:Equador", "ER,ERI,232:Eritrea", "EE,EST,233:Estland", "FK,FLK,238:Falkland-Inseln (Malvinen)", "FO,FRO,234:Färöer-Inseln", "FJ,FJI,242:Fidschi", "FI,FIN,246:Finnland", "FR,FRA,250:Frankreich", "FX,FXX,249:Frankreich, Metropolitan", "GF,GUF,254:Französisch-Guyana", "PF,PYF,258:Französisch-Polynesien", "GA,GAB,266:Gabun", "GM,GMB,270:Gambia", "GE,GEO,268:Georgien", "GH,GHA,288:Ghana", "GI,GIB,292:Gibraltar", "GD,GRD,308:Grenada", "GR,GRC,300:Griechenland", "GL,GRL,304:Grönland", "GB,GBR,826:Großbritannien (UK)", "GP,GLP,312:Guadeloupe", "GU,GUM,316:Guam", "GT,GTM,320:Guatemala", "GN,GIN,324:Guinea", "GW,GNB,624:Guinea-Bissau", "GY,GUY,328:Guyana", "HT,HTI,332:Haiti", "HM,HMD,334:Heard-, MacDonald-Inseln", "HN,HND,340:Honduras", "HK,HKG,344:Hongkong", "IN,IND,356:Indien", "ID,IDN,360:Indonesien", "IQ,IRQ,368:Irak", "IR,IRN,364:Iran", "IE,IRL,372:Irland", "IS,ISL,352:Island", "IL,ISR,376:Israel", "IT,ITA,380:Italien", "JM,JAM,388:Jamaika", "JP,JPN,392:Japan", "YE,YEM,887:Jemen", "JO,JOR,400:Jordanien", "YU,YUG,891:Jugoslawien", "VG,VGB,092:Jungfern-Inseln (UK)", "VI,VIR,850:Jungfern-Inseln (USA)", "KY,CYM,136:Kaiman-Inseln", "KH,KHM,116:Kambodscha", "CM,CMR,120:Kamerun", "CA,CAN,124:Kanada", "CV,CPV,132:Kapverden", "KZ,KAZ,398:Kasachstan", "QA,QAT,634:Katar", "KE,KEN,404:Kenia", "KG,KGZ,417:Kirgistan", "KI,KIR,296:Kiribati", "CC,CCK,166:Kokos-Inseln", "CO,COL,170:Kolumbien", "KM,COM,174:Komoren", "CG,COG,178:Kongo", "KP,PRK,408:Korea (Demokratische Volksrepublik)", "KR,KOR,410:Korea (Republik)", "HR,HRV,191:Kroatien", "CU,CUB,192:Kuba", "KW,KWT,414:Kuwait", "LA,LAO,418:Laos", "LS,LSO,426:Lesotho", "LV,LVA,428:Lettland", "LB,LBN,422:Libanon", "LR,LBR,430:Liberia", "LY,LBY,434:Libyen", "LI,LIE,438:Liechtenstein", "LT,LTU,440:Litauen", "LU,LUX,442:Luxemburg", "MO,MAC,446:Macão", "MG,MDG,450:Madagaskar", "MW,MWI,454:Malawi", "MY,MYS,458:Malaysia", "MV,MDV,462:Malediven", "ML,MLI,466:Mali", "MT,MLT,470:Malta", "MA,MAR,504:Marokko", "MH,MHL,584:Marshall-Inseln", "MQ,MTQ,474:Martinique", "MR,MRT,478:Mauretanien", "MU,MUS,480:Mauritius", "YT,MYT,175:Mayotte", "MK,MKD,807:Mazedonien", "MX,MEX,484:Mexiko", "FM,FSM,583:Mikronesien", "MD,MDA,498:Moldawien", "MC,MCO,492:Monaco", "MN,MNG,496:Mongolei", "MS,MSR,500:Montserrat", "MZ,MOZ,508:Mosambik", "MM,MMR,104:Myanmar (Burma)", "NA,NAM,516:Namibia", "NR,NRU,520:Nauru", "NP,NPL,524:Nepal", "NC,NCL,540:Neukaledonien", "NZ,NZL,554:Neuseeland", "NI,NIC,558:Nicaragua", "NL,NLD,528:Niederlande", "AN,ANT,530:Niederländische Antillen", "NE,NER,562:Niger", "NG,NGA,566:Nigeria", "NU,NIU,570:Niue", "MP,MNP,580:Nördliche Mariannen Insel", "NF,NFK,574:Norfolk-Insel", "NO,NOR,578:Norwegen", "OM,OMN,512:Oman", "AT,AUT,040:Österreich", "TP,TMP,626:Ost-Timor", "PK,PAK,586:Pakistan", "PW,PLW,585:Palau", "PA,PAN,591:Panama", "PG,PNG,598:Papua-Neuguinea", "PY,PRY,600:Paraguay", "PE,PER,604:Peru", "PH,PHL,608:Philippinen", "PN,PCN,612:Pitcairn-Inseln", "PL,POL,616:Polen", "PT,PRT,620:Portugal", "PR,PRI,630:Puerto Rico", "RE,REU,638:Réunion", "RW,RWA,646:Ruanda", "RO,ROM,642:Rumänien", "RU,RUS,643:Russland", "KN,KNA,659:Saint Kitts und Nevis", "SB,SLB,090:Salomon-Inseln", "ZM,ZMB,894:Sambia", "WS,WSM,882:Samoa", "SM,SMR,674:San Marino", "ST,STP,678:SãoTomé u nd Principe", "SA,SAU,682:Saudi-Arabien", "SE,SWE,752:Schweden", "CH,CHE,756:Schweiz", "SN,SEN,686:Senegal", "SC,SYC,690:Seychellen", "SL,SLE,694:Sierra Leone", "ZW,ZWE,716:Simbabwe", "SG,SGP,702:Singapur", "SK,SVK,703:Slowakei", "SI,SVN,705:Slowenien", "SO,SOM,706:Somalia", "ES,ESP,724:Spanien", "LK,LKA,144:Sri Lanka", "SH,SHN,654:St. Helena", "LC,LCA,662:St. Lucia", "PM,SPM,666:St. Pierre und Miquelon", "VC,VCT,670:St. Vincent und die Grenadinen", "GS,SGS,239:Süd Georgia und die südlichen Sandwich Inseln", "ZA,ZAF,710:Südafrika", "SD,SDN,736:Sudan", "TF,ATF,260:Südliche französische Territorien", "SR,SUR,740:Surinam", "SJ,SJM,744:Svalbard und Jan Mayen", "SZ,SWZ,748:Swasiland", "SY,SYR,760:Syrien", "TJ,TJK,762:Tadschikistan", "TW,TWN,158:Taiwan", "TZ,TZA,834:Tansania", "TH,THA,764:Thailand", "TG,TGO,768:Togo", "TK,TKL,772:Tokelau", "TO,TON,776:Tonga", "TT,TTO,780:Trinidad und Tobago", "TD,TCD,148:Tschad", "CZ,CZE,203:Tschechei", "TN,TUN,788:Tunesien", "TR,TUR,792:Türkei", "TM,TKM,795:Turkmenistan", "TC,TCA,796:Turks-, Caicos-Inseln", "TV,TUV,798:Tuvalu", "UM,UMI,581:Übrige Inseln im Pazifik der USA", "UG,UGA,800:Uganda", "UA,UKR,804:Ukraine", "HU,HUN,348:Ungarn", "UY,URY,858:Uruguay", "UZ,UZB,860:Usbekistan", "VU,VUT,548:Vanuatu", "VA,VAT,336:Vatikanstadt", "VE,VEN,862:Venezuela", "AE,ARE,784:Vereinigte Arabische Emirate", "US,USA,840:Vereinigte Staaten von Amerika", "VN,VNM,704:Vietnam", "WF,WLF,876:Wallis und Futuna", "CX,CXR,162:Weihnachtsinsel (AUS)", "EH,ESH,732:Westsahara", "ZR,ZAR,180:Zaire", "CF,CAF,140:Zentralafrikanische Republik", "CY,CYP,196:Zypern"); // Kopfbereich printHeader(); echo ("\n"); echo ("\n"); echo ("\n"); // Rechnungsadresse echo (""); echo (""); echo ("\n"); echo ("\n"); echo ("\n"); echo (""); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); // Newsletter if (postVars("GNEW")!="") { if (cookieVars("CNEW")=="") { $checked=""; } else { $checked="checked"; } echo ("\n"); } // Lieferadresse echo (""); echo (""); echo ("\n"); echo ("\n"); echo ("\n"); echo (""); // Speicher-Option if (cookieVars("CSAV")=="") { $checked=""; } else { $checked="checked"; } echo ("\n"); // Kommentar echo (""); echo ("\n"); // Kreditkarte if (postVars("GPR0")=="ccard") { echo (""); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); } // Konto-Einzug if (postVars("GPR0")=="debit") { echo (""); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); echo ("\n"); } // Footer echo (""); echo ("\n"); echo ("\n"); echoPostVars(); echo (""); echo ("
Rechnungsadresse:
Anrede: *
Name: *
Straße, Hausnummer: *
PLZ, Ort: *
Land: *
Telefon:
Mobil:
Fax:
E-Mail: *
Ich möchte ab sofort Produktinformationen per E-Mail erhalten

Lieferadresse
(optional):
Anrede:
Name:
Straße, Hausnummer:
PLZ, Ort:
Land:
Adressdaten speichern

Ihre Nachricht an uns:
Nachricht:

Zahlung per Kreditkarte:
Rechnungsbetrag:".number_format((float)postVars("OTOT"),2,",",".")." ".postVars("OCUR")."
Kartennummer: *
Gültig bis (MM/JJ): *
Karteninhaber: *

Zahlung per Bankeinzug:
Rechnungsbetrag:".number_format((float)postVars("OTOT"),2,",",".")." ".postVars("OCUR")."
Kontonummer: *
Kreditinstitut: *
BLZ: *
Kontoinhaber: *

Bitte beachten:

Notwendige Eingaben sind mit einem Stern gekennzeichnet. Bitte überprüfen Sie Ihre Eingaben und korrigieren Sie sie gegebenenfalls, bevor Sie auf die Schaltfläche OK klicken. Falls Sie den Bestellvorgang abbrechen wollen, schließen Sie bitte dieses Fenster.

Durch Anklicken der Schaltfläche OK geben Sie eine verbindliche Bestellung der im Warenkorb enthaltenen Waren ab. Die Bestätigung des Eingangs der Bestellung folgt unmittelbar nach dem Absenden der Bestellung. Der Kaufvertrag kommt mit unserer Auslieferungsbestätigung oder Lieferung der Waren zustande.


"); } function printError($code) { // Fehlermeldung printHeader(); echo ("\n"); echo ("

Ein interner Fehler ist aufgetreten. ($code)

"); echo (""); echo (""); } function deSlash(&$element) { // Für Stripslash $element=stripslashes($element); } // Hauptprogramm // Die magischen Quotes eliminieren... if (get_magic_quotes_gpc()) { array_walk($HTTP_GET_VARS, "deSlash"); array_walk($HTTP_POST_VARS, "deSlash"); array_walk($HTTP_COOKIE_VARS, "deSlash"); } // Auf Post checken if (postVars("GVER")=="") { printError("#NDP"); die(); } // Version checken if (postVars("GVER")!="shop2dateversion10") { printError("#IVR"); die(); } // Durchlauf checken if (postVars("CEML")=="") { // Noch keine Benutzereingaben printForm(); } else { // Abschicken printOrder(); } ?>