"http://news.tuifly.com",
'user' => "martin.meusel@hlx.com",
'passwd' => "mmeus");
$result = $client->logon($logonparams);
$sessionid = $result->logonReturn;
$params = array('email' => $_POST['old_email'],
'session' => $sessionid);
$result = $client->lookupUserByEmail($params);
if($result->lookupUserByEmailReturn!="") {
$xml = new SimpleXMLElement($result->lookupUserByEmailReturn);
//User_ID wird anhand der Mailadresse ermittelt
$user_id = $xml->attributes();
}
if($fehler=='')
{
if($_GET['memid']==$user_id AND isset($user_id)) {
if($edit_mobile==true)
{
$mobile_string='http://news.tuifly.com/automated/action.jsp';
$mobile_string.='?action=changeUserMobileNumber';
$mobile_string.='&errorPage=//automated/action.jsp';
$mobile_string.='&uid='.$user_id;
$mobile_string.='&new_mobilefullnum=+49'.$_POST['mobil'];
$mobile_string.='&uemail=martin.meusel@hlx.com&psw=mmeus';
$array=file($mobile_string);
}
//Scriptadresse
$jsp_string_1='http://news.tuifly.com/automated/action.jsp';
//Action
$jsp_string_1.='?action=updateRecipientNoMsg';
//ErrorPage
$jsp_string_1.='&errorPage=//automated/action.jsp';
//Newsletter_ID
$jsp_string_1.='&gid='.$newsletter_id.$sms_member;
//Executor (Verantwortlich für das DIREKTE Anmelden am Newsletter)
$jsp_string_1.='&self=true';
$jsp_string_1.='&namedattr_custattr1=';
$jsp_string_1.='&user_bounced=false';
//Email
$jsp_string_1.='&pemail='.$_POST['old_email'];
//Anrede
$jsp_string_1.='&user_Title='.$_POST['anrede'];
//Name
$jsp_string_1.='&user_Lastname='.$_POST['name'];
//Vorname
$jsp_string_1.='&user_Firstname='.$_POST['vorname'];
//Geburtstag
$jsp_string_1.='&user_DateOfBirth='.$_POST['geb_jahr'].'-'.$_POST['geb_monat'].'-'.$_POST['geb_tag'];
//Erweiterte Paramter
//Flughaefen
$jsp_string_1.='&namedattr_Haupt_Abf_map='.$_POST['flughafen_1'];
$jsp_string_1.='&namedattr_custattr0='.$_POST['flughafen_1'];
$jsp_string_1.='&namedattr_alt_airport1='.$_POST['flughafen_2'];
$jsp_string_1.='&namedattr_alt_airport2='.$_POST['flughafen_3'];
//Quelle der Anmeldung
$jsp_string_1.='&namedattr_Source=Homepage';
//Interessen
if($_POST['activity']!="1") $_POST['activity']=0;
if($_POST['business']!="1") $_POST['business']=0;
if($_POST['sun']!="1") $_POST['sun']=0;
if($_POST['family']!="1") $_POST['family']=0;
if($_POST['shop']!="1") $_POST['shop']=0;
if($_POST['city']!="1") $_POST['city']=0;
$jsp_string_1.='&namedattr_int_activity='.$_POST['activity'];
$jsp_string_1.='&namedattr_int_business='.$_POST['business'];
$jsp_string_1.='&namedattr_int_sun='.$_POST['sun'];
$jsp_string_1.='&namedattr_int_family='.$_POST['family'];
$jsp_string_1.='&namedattr_int_shop='.$_POST['shop'];
$jsp_string_1.='&namedattr_int_city='.$_POST['city'];
//Mobilnummer
$jsp_string_1.=$mobilnummer;
//$jsp_string_1.='&namedattr_custattr2='.$custattr2;
//Userdaten Admin
$jsp_string_1.='&uemail=martin.meusel@hlx.com&psw=mmeus';
$jsp_string= $jsp_string_1;
$ergebnis='';
$array = file($jsp_string);
if(is_array($array))
{
foreach($array as $key => $value)
{
$ergebnis .=$value;
}
}else{
$fehler='allgemein';
}
//SimpleXML Objekt erstellen
$xml = new SimpleXMLElement($ergebnis);
//Ermittelt ob die Anmeldung erfolgreich war (true=erfolgreich)
$success = $xml->attributes()->success;
$email_string='http://news.tuifly.com/automated/action.jsp?action=changeUserEmail&errorPage=//automated/action.jsp&pemail='.$_GET['mail'].'&new_uemail='.$_POST['email'].'&uemail=martin.meusel@hlx.com&psw=mmeus';
$array=file($email_string);
if($success!="true")
{
$fehler='allgemein';
}
}
}
}
if($fehler=='') $correct='';
}
///////////////////////////
//NEUANMELDUNG
if(isset($_POST['anmelden']) AND !isset($_GET['edit']))
{
$fehler='';
if($_POST['name']!='' && $_POST['vorname']!='' && $_POST['geb_tag']!='' && $_POST['geb_monat']!='' && $_POST['geb_jahr']!='' && $_POST['flughafen_1']!='' && $_POST['email']!='' && $_POST['anrede']!='')
{
if(preg_match("/^[a-zA-Z0-9._\\-]+@[a-zA-Z0-9._\\-]{2,}\\.[a-zA-Z]{2,4}\$/",$_POST['email']) ) {
$mobil=$_POST['mobil'];
if($mobil!='')
{
if(is_numeric($mobil))
{
$mobilnummer='&pmobilenum=49'.$_POST['mobil'];
}else{
$fehler='mobil';
}
}
}else{
$fehler='email';
}
}else{
$fehler='pflichtfelder';
}
if($fehler=='')
{
$ns = "http://webservices.ecircleag.com/rpcns";
$client = new soapclient('http://webservices.ecircle-ag.com/soap/ecm.wsdl');
// call API depending on function
$logonparams = array('realm' => "http://news.tuifly.com",
'user' => "martin.meusel@hlx.com",
'passwd' => "mmeus");
$result = $client->logon($logonparams);
$sessionid = $result->logonReturn;
$params = array('email' => $_POST['email'],
'session' => $sessionid);
$result = $client->lookupUserByEmail($params);
if($result->lookupUserByEmailReturn!="") {
$xml = new SimpleXMLElement($result->lookupUserByEmailReturn);
//User_ID wird anhand der Mailadresse ermittelt
$user_id = $xml->attributes();
}
if(trim($user_id)!='')
{
//WENN DER USER SCHON EINMAL ABGEMELDET WURDE, WIRD ER NUN KOMPLETT GELÖSCHT UND NEU ANGELEGT. DAMIT IST ER WIEDER AKTIVIERT.
if(trim($xml->cust_attr_3)=="bounced")
{
$result = $client->deleteUserByEmail($params);
}else{
$fehler='duplicate';
}
}
if($fehler=='')
{
//Scriptadresse
$jsp_string_1='http://news.tuifly.com/automated/action.jsp';
//Action
$jsp_string_1.='?action=updateRecipientNoMsg';
//ErrorPage
$jsp_string_1.='&errorPage=//automated/action.jsp';
//Newsletter_ID
$jsp_string_1.='&gid='.$newsletter_id.$sms_member;
//Executor (Verantwortlich für das DIREKTE Anmelden am Newsletter)
$jsp_string_1.='&self=true';
$jsp_string_1.='&namedattr_custattr1=';
$jsp_string_1.='&user_bounced=false';
//Email
$jsp_string_1.='&pemail='.$_POST['email'];
//Anrede
$jsp_string_1.='&user_Title='.$_POST['anrede'];
//Name
$jsp_string_1.='&user_Lastname='.$_POST['name'];
//Vorname
$jsp_string_1.='&user_Firstname='.$_POST['vorname'];
//Land
$jsp_string_1.='&user_ISOCountryCode='.$country_code;
//Sprache
$jsp_string_1.='&user_ISOLanguageCode='.$lang;
//Zeitzone
$jsp_string_1.='&user_TimeZone='.$timezone;
//Geburtstag
$jsp_string_1.='&user_DateOfBirth='.$_POST['geb_jahr'].'-'.$_POST['geb_monat'].'-'.$_POST['geb_tag'];
//Erweiterte Paramter
//Flughaefen
$jsp_string_1.='&namedattr_Haupt_Abf_map='.$_POST['flughafen_1'];
$jsp_string_1.='&namedattr_custattr0='.$_POST['flughafen_1'];
$jsp_string_1.='&namedattr_alt_airport1='.$_POST['flughafen_2'];
$jsp_string_1.='&namedattr_alt_airport2='.$_POST['flughafen_3'];
//Quelle der Anmeldung
$jsp_string_1.='&namedattr_Source=Homepage';
//Interessen
$jsp_string_1.='&namedattr_int_activity='.$_POST['activity'];
$jsp_string_1.='&namedattr_int_business='.$_POST['business'];
$jsp_string_1.='&namedattr_int_sun='.$_POST['sun'];
$jsp_string_1.='&namedattr_int_family='.$_POST['family'];
$jsp_string_1.='&namedattr_int_shop='.$_POST['shop'];
$jsp_string_1.='&namedattr_int_city='.$_POST['city'];
$jsp_string_1.='&namedattr_country='.$lang;
//Mobilnummer
$jsp_string_1.=$mobilnummer;
$jsp_string_1.='&namedattr_custattr2='.$custattr2;
//Userdaten Admin
$jsp_string_1.='&uemail=martin.meusel@hlx.com&psw=mmeus';
$jsp_string= $jsp_string_1;
//echo $jsp_string;
$ergebnis='';
$array = file($jsp_string);
if(is_array($array))
{
foreach($array as $key => $value)
{
$ergebnis .=$value;
}
}else{
$fehler='allgemein';
}
//SimpleXML Objekt erstellen
$xml = new SimpleXMLElement($ergebnis);
//Ermittelt ob die Mailadresse bereits existiert (true=existiert)
$duplicate=$xml->main->duplicateSubscription_xst;
//Ermittelt ob die Anmeldung erfolgreich war (true=erfolgreich)
$success = $xml->attributes()->success;
$error="javax.servlet.error.status_code";
if($xml->attributes->$error=="403") $fehler="duplicate";
if($success!="true")
{
$fehler='allgemein';
//echo $jsp_string_1;
}
}
}
if($fehler=='') $correct='';
}
///////////////////////////
///////////////////////////
//ABMELDUNG VOM NEWSLETTER
if(isset($_GET['unsubscribe']))
{
$fehler='';
$ns = "http://webservices.ecircleag.com/rpcns";
$client = new soapclient('http://webservices.ecircle-ag.com/soap/ecm.wsdl');
// call API depending on function
$logonparams = array('realm' => "http://news.tuifly.com",
'user' => "martin.meusel@hlx.com",
'passwd' => "mmeus");
$result = $client->logon($logonparams);
$sessionid = $result->logonReturn;
$params = array('email' => $_GET['mail'],
'session' => $sessionid);
$result = $client->lookupUserByEmail($params);
if($result->lookupUserByEmailReturn!="") {
$xml = new SimpleXMLElement($result->lookupUserByEmailReturn);
//User_ID wird anhand der Mailadresse ermittelt
$user_id = $xml->attributes();
}
//Vergleich der gefundenen UserID mit der uebergebenen ID
if($_GET['memid']==$user_id AND isset($user_id)) {
//$result = $client->deleteUserByEmail($params); (User wird aus System geloescht)
//Scriptadresse
$jsp_string='http://news.tuifly.com/automated/action.jsp';
//Action
$jsp_string.='?action=updateRecipientNoMsg';
//ErrorPage
$jsp_string.='&errorPage=//automated/action.jsp';
//Newsletter_ID
$jsp_string.='&gid='.$newsletter_id;
//Executor
$jsp_string.='&self=false';
//Email
$jsp_string.='&pemail='.$_GET['mail'];
//Bounced
$jsp_string.='&user_bounced=true';
$jsp_string.='&namedattr_custattr3=bounced';
//Userdaten Admin
$jsp_string.='&uemail=martin.meusel@hlx.com&psw=mmeus';
$ergebnis='';
$array = file($jsp_string);
if(is_array($array))
{
foreach($array as $key => $value)
{
$ergebnis .=$value;
}
}else{
$fehler='allgemein';
}
//Abmeldung erfolgreich
if($fehler=='') $correct='';
}else{
$fehler='allgemein';
}
// now logout
$params = array('session' => $sessionid);
$client->logout($params);
}
////////////////////////////////////////////////////
////////////////////////////////////////////////////
////////////////////////////////////////////////////
//FEHLERMELDUNGEN
if($fehler!='')
{
switch ($fehler){
case('duplicate'):
//Emailadresse fehlerhaft
echo'
';
break;
case('mobil'):
//Emailadresse fehlerhaft
echo'
';
break;
case('email'):
//Emailadresse fehlerhaft
echo'
';
break;
case('allgemein'):
//Allgemeiner Fehler
echo'
';
break;
case('pflichtfelder'):
//Emailadresse fehlerhaft
echo'
';
break;
}
}else{
echo $correct;
}
if(isset($_GET['edit']))
{
$ns = "http://webservices.ecircleag.com/rpcns";
$client = new soapclient('http://webservices.ecircle-ag.com/soap/ecm.wsdl');
// call api depending on function
$logonparams = array('realm' => "http://news.tuifly.com",
'user' => "martin.meusel@hlx.com",
'passwd' => "mmeus");
$result = $client->logon($logonparams);
$sessionid = $result->logonReturn;
$params = array('email' => $_GET['mail'],
'session' => $sessionid);
$result = $client->lookupUserByEmail($params);
if($result->lookupUserByEmailReturn!="") {
$xml = new SimpleXMLElement($result->lookupUserByEmailReturn);
//User_ID wird anhand der Mailadresse ermittelt
//echo str_replace("\n","
",htmlspecialchars($xml->asXML()));
$user_id=$xml->attributes();
if($_GET['memid']==$user_id)
{
$_POST['anrede']=$xml->title;
$_POST['vorname']=$xml->firstname;
$_POST['email']=$xml->email;
$_POST['name']=$xml->lastname;
$_POST['geb_tag']=$xml->dob_dd;
$_POST['geb_monat']=$xml->dob_mm;
$_POST['geb_jahr']=$xml->dob_yyyy;
$_POST['flughafen_1']=$xml->cust_attr_0;
$_POST['flughafen_2']=$xml->namedattr[37];
$_POST['flughafen_3']=$xml->namedattr[38];
$_POST['mobil']=substr($xml->mobilenumber,2);
if($xml->cust_attr_2=="sms") $_POST['sms']=1;
if($xml->namedattr[76]=="true") $_POST['activity']=1;
if($xml->namedattr[77]=="true") $_POST['business']=1;
if($xml->namedattr[78]=="true") $_POST['city']=1;
if($xml->namedattr[79]=="true") $_POST['family']=1;
if($xml->namedattr[80]=="true") $_POST['shop']=1;
if($xml->namedattr[81]=="true") $_POST['sun']=1;
}
}
}
?>
$value)
{
list($name,$de,$en,$it,$es,$fr)=str_replace("\"","",explode("|",$value));
$lang[$name]=$$_GET['lang'];
}
$strecken=file("../../flash/Strecken.csv");
foreach($strecken as $key => $value)
{
list($tmp,$flgh,$typ,$land)=str_replace("\"","",explode(";",$value));
if($typ=="HLX")
{
$land=trim($land);
switch($land){
case "DE":
$select_strecken['de'][$flgh]=$flgh;
break;
case "CH":
$select_strecken['ch'][$flgh]=$flgh;
break;
case "AT":
$select_strecken['at'][$flgh]=$flgh;
break;
case "IT":
$select_strecken['it'][$flgh]=$flgh;
break;
case "GB":
$select_strecken['en'][$flgh]=$flgh;
break;
case "FR":
$select_strecken['fr'][$flgh]=$flgh;
break;
case "ES":
$select_strecken['es'][$flgh]=$flgh;
break;
}
}
}
$ergebnis='';
if ($proxy_fp = fopen("../../specials/airports.xml","r")) do {
$ergebnis .= fread($proxy_fp, 4096);
} while (!feof($proxy_fp));
fclose($proxy_fp);
$result=utf8_encode($ergebnis);
//SimpleXML Objekt erstellen
$xml = new SimpleXMLElement($result);
$i=0;
//Alle Flughaefen werden aus XML(airports.xml) )ausgelesen
while($xml->Airports->Airport[$i])
{
//Kurzname des Flughafens auslesen
$kurz = $xml->Airports->Airport[$i]->attributes();
//Flughafen wird dem entsprechenden Land zugeordnet, wenn Flughafen im Streckennetz(strecken.csv) vorhanden
if(isset($select_strecken[$language_1]["$kurz"]))
{
$select_strecken[$language_1]["$kurz"]=$xml->Airports->Airport[$i]->Name[$field];
}else{
if(isset($select_strecken['at']["$kurz"])) $select_strecken['at']["$kurz"]=utf8_decode($xml->Airports->Airport[$i]->Name[$field]);
if(isset($select_strecken['ch']["$kurz"])) $select_strecken['ch']["$kurz"]=utf8_decode($xml->Airports->Airport[$i]->Name[$field]);
}
$i++;
}
?>
Vi preghiamo di compilare il seguente modulo in tutte le sue parti, in modo che la nostra newsletter possa essere redatta tenendo conto anche delle vostre esigenze. Riceverete subito la conferma di iscrizione via e-mail. Cliccate qui, per vedere una delle nostre newsletter!