'en-GB', 'FR' => 'fr-FR', 'DE' => 'de-DE', 'IT' => 'it-IT', 'ES' => 'es-ES', ); $culture = "en-GB"; $newTpl = array('UK','FR','IT', 'DE'); // $newTpl = array(); $valid = false; if(isset($_GET['lang'])) { $lang = strtoupper($_GET['lang']); } else if(isset($_SESSION['lang'])) { $lang = strtoupper($_SESSION['lang']); } else { die("Bad Session"); } if(isset($_GET['country'])) { $country = strtoupper($_GET['country']); $culture = $cultureCountry[$country]; } else if(isset($_SESSION['country'])) { $country = strtoupper($_SESSION['country']); $culture = $cultureCountry[$country]; } else { die("Bad Session"); } //set var from SESSION $available_language = array( 'EN' => array('UK'), 'FR' => array('BE', 'FR'), 'NL' => array('NL'), 'GE' => array('GE'), 'IT' => array('IT'), ); $available_webozone = array( 'FR_FR' => '1', 'BE_FR' => '2', 'BE_NL' => '3', 'UK_EN' => '4', 'DE_GE' => '5', 'IT_IT' => '6', ); // Set Sessions $_SESSION['state'] = 1; $_SESSION['lang'] = $lang; $_SESSION['country'] = $country; $error =""; // Set Error @$errmsg = $_SESSION['error']; include 'lang/'.$country.'_'.$lang.'.inc.php'; if($country == 'BE') { $img_lang = strtolower($country.$lang); } else { $img_lang = strtolower($country); } $country = strtoupper($country); // Get Params if(is_array($_POST) && count($_POST) > 1) { foreach($_POST as $varName => $value) { if(ereg('subscribe@',$varName)) { $tmp = explode('@',$varName); $newsletters[] = $tmp[1]; } if(!is_array($value)) { $custinfo_error[$varName]= ( trim ($value) ); } else { $custinfo_error[$varName]= $value; } } $_SESSION['custinfo_error'] = $custinfo_error; } @extract( $_SESSION, EXTR_OVERWRITE); @extract( $custinfo_error, EXTR_OVERWRITE); $step = ( isset($_SESSION['step']) ) ? $_SESSION['step'] : 0; // Set Variables; $var = array( 'custinfo_error', 'error', 'email', 'sernr', 'firstName', 'lastName', 'email_confirm', ); foreach($var as $key => $name) { $$name = isset($$name) ? $$name : Null; } if(isset($_POST) && count($_POST) > 1 & !$step) { // check email; if (empty($lastName)) { $error = "alert(lastNameErr1);document.ClcmForm.lastName.focus();"; } else if (empty($firstName)) { $error = "alert(firstNameErr1);document.ClcmForm.firstName.focus();"; } else if (empty($email)) { $error = "alert(emailErr);document.ClcmForm.email.focus();"; } else if (!check_email_soap($email)) { $error = "alert(emailErr2);document.ClcmForm.email.focus();"; } else if(empty($ownerpb_desktop) && empty($other) && empty($ownerpb_other)) { $error = "alert(choosecat);"; } else if(!empty($ownerpb_desktop) || !empty($ownerpb_other)) { if(!empty($ownerpb_desktop) && (empty($sernr) || !check_serial_soap($sernr))) { $error = "alert(sernrErr);document.ClcmForm.sernr.focus();"; } else if(!empty($ownerpb_other) && ( empty($cat) || strlen($cat) == 1 ) ) { $error = "alert(choosecato);document.ClcmForm.sernr.focus();"; } else if(!isset($newsletters)) { $error = "alert(choosenews);document.ClcmForm.sernr.focus();"; } else { $valid = true; } } else if(!isset($newsletters)) { $error = "alert(choosenews);document.ClcmForm.sernr.focus();"; } else { $valid = true; } if($valid) { if(isset($sernr) && strlen($sernr) > 1 && isset($cat) && strlen($cat) > 1 ) { $dhe_product = $cat; if(isset($subcat) && strlen($subcat) > 1) { $dhe_product = $subcat; } else if(isset($subsubcat) && strlen($subsubcat) > 1) { $dhe_product = $subsubcat; } $others = 'serialNumber="'.$sernr.'" text1="'.$dhe_product.'"'; $status = "1"; } else if(isset($sernr) && strlen($sernr) > 1) { $others = 'serialNumber="'.$sernr.'"'; $status = "1"; } else if(isset($cat) && strlen($cat) > 1) { $dhe_product = $cat; if(isset($subcat) && strlen($subcat) > 1) { $dhe_product = $subcat; } else if(isset($subsubcat) && strlen($subsubcat) > 1) { $dhe_product = $subsubcat; } $others = 'text1="'.$dhe_product.'"'; $status = "1"; } else { $others = ''; $status = "0"; } foreach($newsletters as $key => $value) { $queryDefElement = ' WebOps3/lulu7 '.$value.' <?xml version="1.0" encoding="ISO-8859-1"?> true '; $soapaction = "nms:subscription#Subscribe"; $url = "http://mail.packardbell-mail.com/nl/jsp/soaprouter.jsp"; $client = new soapclientNu($url); $client->endpoint = $url; $mysoapmsg = $client->serializeEnvelope($queryDefElement,'',array(),'document', 'literal'); $client->send($mysoapmsg,$soapaction,2,4); } $step = 1; $_SESSION['step'] = $step; } } $tpl = ( isset($_GET['newtpl']) || in_array ($country, $newTpl) ) ? '_3' : '_2'; if($step == 1) { include "tpl/step2_new$tpl.inc.php"; exit; } include 'neolane/retrieve.php'; include "tpl/step1_new$tpl.inc.php"; $_SESSION['error'] = isset($_SESSION['error']) ? "" : ""; $errmsg = ""; $error = ""; ?>