"; echo ""; exit(); }else{ $is_abo_upgrade = true; } } ////////////////////////////////////////////////////////////////// // Objekt "Magazin" laden $magazin = getMagazin($magazinId); // Objekt ALLE "Angebote" laden $angebote = getAngeboteByMagazin($magazinId); // gewähltes Angebot laden if($angebotId != "") { $angebot = getAngebot($angebotId); } $HtmlTitle = $magazin->name." - ".$angebot->name; // bei kostenlosem Angebot button kostenlos bestellen einblenden if($angebot->kostenlos == 1) { $is_kostenlos = true; $buttonfile = "button_step1_kostenlos.jpg"; } if ($is_abochange) { $buttonfile = "button_step1_wechseln.jpg"; } if(empty($magazin->id) || empty($angebot->id)) { echo "Bei der Verarbeitung der Anfrage trat ein Fehler auf. Bitte gegen Sie zurück und versuchen es erneut.
\n"; echo "(Magazin oder Angebot nicht gefunden)"; exit(); } if(!empty($angebot->max_bestellungen)) if(countAbos($angebot->id) >= $angebot->max_bestellungen) { echo "Das Angebot ist ausverkauft.
\n"; exit(); } // ACHTUNG: HTTP/HTTPS-KORREKTUR DES TITELBILDES if(strlen(strstr($_SERVER["SCRIPT_URI"],"https://")) ) { $isHTTPS = true; $magazin->url_title = str_replace("http://","https://",$magazin->url_title); } $land = $angebot->country_id; if($_POST["send"]=="true") { $abo_codenr = checkstring(trim($_POST["abo_codenr"])); $delivery_date_id = checkstring(trim($_POST["delivery_date_id"])); if ($angebot->bonus_id == 1361) { $bonus_id = checkstring(trim($_POST["sel_bonus_id"])); $tmp_praemie = getPraemieAndOfferById($bonus_id, $angebotId); $bonus_name = $tmp_praemie->name; $bonus_extra_payment = $tmp_praemie->extra_payment; $bonus_artnr = $tmp_praemie->artnr; } else { $bonus_id = checkstring(trim($_POST["bonus_id"])); $bonus_name = checkstring(trim($_POST["bonus_name"])); $bonus_extra_payment = checkstring(trim($_POST["bonus_extra_payment"])); $bonus_artnr = checkstring(trim($_POST["bonus_artnr"])); } if ($is_gutschein) { $gutschein = checkstring(trim($_POST["gutschein"])); } if ($is_abochange) { $abonr = checkstring(trim($_POST["abonr"])); } $anrede = checkstring(trim($_POST["anrede"])); $vorname = checkstring(trim($_POST["vorname"])); $nachname = checkstring(trim($_POST["nachname"])); $strasse = checkstring(trim($_POST["strasse"])); $hausnummer = checkstring(trim($_POST["hausnummer"])); $plz = checkstring(trim($_POST["plz"])); $ort = checkstring(trim($_POST["ort"])); $land = checkstring(trim($_POST["land"])); $telefon = checkstring(trim($_POST["telefon"])); $email = checkstring(trim($_POST["email"])); $marketing = checkstring(trim($_POST["marketing"])); // Errorcheck $arrError = array(); if ($is_gutschein) { $vresult = validate_coupon($gutschein, "tvdirekt_Krombacher"); if($vresult != "ok") { array_push($arrError, "gutschein"); } } if ($is_abochange) { if(empty($abonr)){ array_push($arrError, "abonr"); } } if ($angebot->bonus_id == 1361) { if(empty($bonus_id)){array_push($arrError, "sel_bonus_id");} } if(empty($anrede) || ($anrede!="Frau" && $anrede!="Herr")) { array_push($arrError, "anrede"); } if(empty($vorname)){ array_push($arrError, "vorname"); } if(empty($nachname)){ array_push($arrError, "nachname"); } if(empty($strasse)){ array_push($arrError, "strasse"); } if(empty($hausnummer)){ array_push($arrError, "hausnummer"); } if(empty($plz)){ array_push($arrError, "plz"); } if(empty($ort)){ array_push($arrError, "ort"); } if(empty($land)) { array_push($arrError, "land"); } else if(!empty($angebot->country_id)) { if($land != $angebot->country_id) { array_push($arrError, "land"); $errorCountry = "Versand nur innerhalb folgender Länder möglich: " . getCountryNameByCode($angebot->country_id); } } if(empty($telefon)){ array_push($arrError, "telefon"); } if(empty($email)) { array_push($arrError, "email"); }else{ if(!checkinput($email,'email')){ array_push($arrError, "email"); } } if(count($arrError) == 0) { // Alle Infos in die Session packen $_SESSION["subscriber"]->abo_codenr = $abo_codenr; $_SESSION["subscriber"]->delivery_date_id = $delivery_date_id; $_SESSION["subscriber"]->bonus_id = $bonus_id; $_SESSION["subscriber"]->bonus_name = $bonus_name; $_SESSION["subscriber"]->bonus_extra_payment = $bonus_extra_payment; $_SESSION["subscriber"]->bonus_artnr = $bonus_artnr; if ($is_gutschein) { $_SESSION["subscriber"]->gutschein = $gutschein; } if ($is_abochange) { $_SESSION["subscriber"]->abonr = $abonr; } $_SESSION["subscriber"]->anrede = $anrede; $_SESSION["subscriber"]->vorname = $vorname; $_SESSION["subscriber"]->nachname = $nachname; $_SESSION["subscriber"]->strasse = $strasse; $_SESSION["subscriber"]->hausnummer = $hausnummer; $_SESSION["subscriber"]->plz = $plz; $_SESSION["subscriber"]->ort = $ort; $_SESSION["subscriber"]->land = $land; $_SESSION["subscriber"]->telefon = $telefon; $_SESSION["subscriber"]->email = $email; $_SESSION["subscriber"]->marketing = $marketing; header("location:/gam/microabo-payment.php?m=".$magazinId."&a=".$angebotId."&aid=".$aboID."&aidc=".$aboIDCrypt); exit(); } } // Prämie laden if ($angebot->bonus_id != 1361) { $tmp_praemie = getPraemieById($angebot->bonus_id); $hidden_bonus_id = $angebot->bonus_id; $hidden_bonus_name = $tmp_praemie->name; $hidden_bonus_extra_payment = "0,00"; $hidden_bonus_artnr = $angebot->artnr; } // Lieferzeitpunkt wählen if ($is_gutschein) { $SQL = "select * FROM delivery_dates WHERE magazine_id = '19' AND Bis >= '".date("Y-m-d")."' ORDER BY Bis ASC LIMIT 1"; } else { $SQL = "select * FROM delivery_dates WHERE magazine_id = '".$magazinId."' AND Bis >= '".date("Y-m-d")."' ORDER BY Bis ASC LIMIT 1"; } $rsLoadDeliveryDates = mysql_query($SQL); $lieferbeginn = mysql_fetch_object($rsLoadDeliveryDates); if(empty($lieferbeginn->Nummer)) { $lieferbeginn->Nummer = 0; } // Es ist ein Abo-Upgrade -> also die vorherigen Daten laden! if($is_abo_upgrade==true) { $SQL = "select * FROM subscriber WHERE id = '".$aboID."'"; $rsLoadSubs = mysql_query($SQL); $o = mysql_fetch_object($rsLoadSubs); $anrede = $o->subscriber_title; $vorname = $o->subscriber_surname; $nachname = $o->subscriber_prename; $strasse = $o->subscriber_street; $hausnummer = $o->subscriber_house_number; $plz = $o->subscriber_postalcode; $ort = $o->subscriber_city; $land = $o->subscriber_country; $telefon = $o->subscriber_phone; $email = $o->subscriber_email; $marketing = $o->marketing_newsletter; } $teaser_link_noupgrade = "/gam/microabo-thanks.php?m=".$magazinId."&a=".$angebotId."&aidc=".md5($aboID."|hid6den?Pa63ss!2Pro%tectX(it")."&aid=".$aboID."&final=true"; ?>
0){ ?>
Bitte überprüfen Sie die markierten Felder.
bonus_id == 1361) { ?>
Gutschein-Code*
 
   
Prämie*
Abonummer
Anrede*
Vorname*
Nachname*
Straße, Haus-Nr.*
PLZ, Ort*
Land*
 
Telefon (inkl. Vorwahl)*
E-Mail Adresse*

style="border:none" tabindex="10">
header_widerruf)) {echo "" . $angebot->header_widerruf . "
";}?>

0){ ?>