public function init()
 {
     ${"GLOBALS"}["pcwndnxzm"] = "isoTinyMCE";
     parent::init();
     ${"GLOBALS"}["akprgggjmj"] = "languages";
     ${"GLOBALS"}["tbvspw"] = "deflang";
     ${"GLOBALS"}["vhicmlpg"] = "custom_labels";
     ${${"GLOBALS"}["tbvspw"]} = new Language(self::$cookie->id_lang);
     $tmulinwrlntj = "str_custom_multi_lang_fields";
     ${"GLOBALS"}["ktemnns"] = "custom_multi_lang_fields";
     ${${"GLOBALS"}["gdwbgebyw"]} = file_exists(_PS_ROOT_DIR_ . "/js/tiny_mce/langs/" . $deflang->iso_code . ".js") ? $deflang->iso_code : "en";
     ${${"GLOBALS"}["iffkuw"]} = str_replace("\\", "\\\\", dirname($_SERVER["PHP_SELF"]));
     ${${"GLOBALS"}["akprgggjmj"]} = Language::getLanguages(false);
     ${"GLOBALS"}["aecuqgnp"] = "custom_multi_lang_fields";
     ${${"GLOBALS"}["ijwyqrvm"]} = new AgileMultipleSeller();
     ${${"GLOBALS"}["iqpxuil"]} = Configuration::getMultiple($sellermodule->getCustomFields());
     ${${"GLOBALS"}["vhicmlpg"]} = $sellermodule->getCustomLabels(":");
     ${"GLOBALS"}["ppyvhso"] = "custom_labels";
     ${${"GLOBALS"}["aecuqgnp"]} = SellerInfo::getCustomMultiLanguageFields();
     ${$tmulinwrlntj} = "";
     ${"GLOBALS"}["wsahmoa"] = "isoTinyMCE";
     foreach (${${"GLOBALS"}["ktemnns"]} as ${${"GLOBALS"}["jbuucd"]}) {
         ${"GLOBALS"}["krcvdjennfj"] = "custom_multi_lang_field";
         ${${"GLOBALS"}["lkuqcxcngl"]} .= "¤" . ${${"GLOBALS"}["krcvdjennfj"]};
     }
     self::$smarty->assign(array("seller_tab_id" => 2, "ad" => ${${"GLOBALS"}["iffkuw"]}, "isoTinyMCE" => ${${"GLOBALS"}["pcwndnxzm"]}, "theme_css_dir" => _THEME_CSS_DIR_, "languages" => ${${"GLOBALS"}["tgpizrhrpccv"]}, "current_id_lang" => self::$cookie->id_lang, "conf" => ${${"GLOBALS"}["iqpxuil"]}, "custom_labels" => ${${"GLOBALS"}["ppyvhso"]}, "str_custom_multi_lang_fields" => ${${"GLOBALS"}["lkuqcxcngl"]}, "shop_url_mode" => (int) Configuration::get("ASP_SHOP_URL_MODE"), "iso_code" => ${${"GLOBALS"}["wsahmoa"]}));
 }
Exemple #2
0
 public function validateController($htmlentities = true)
 {
     ${"GLOBALS"}["qvokpxp"] = "errors";
     $wgpvts = "field";
     ${"GLOBALS"}["yvnpfwzt"] = "required_fields_database";
     ${${"GLOBALS"}["qvokpxp"]} = array();
     $pwnpyvvih = "data";
     ${${"GLOBALS"}["ljiveifke"]} = Language::getLanguages(false);
     ${"GLOBALS"}["ayihnmvk"] = "default_language";
     ${${"GLOBALS"}["ayihnmvk"]} = new Language((int) Configuration::get("PS_LANG_DEFAULT"));
     ${${"GLOBALS"}["tquylljuk"]} = "SellerInfo";
     ${"GLOBALS"}["qlxwjnbhsld"] = "fieldsRequiredDatabase";
     ${${"GLOBALS"}["yvnpfwzt"]} = isset(self::${${"GLOBALS"}["dhtyhjdihlm"]}[get_class($this)]) ? self::${${"GLOBALS"}["qlxwjnbhsld"]}[get_class($this)] : array();
     foreach ($this->def["fields"] as ${$wgpvts} => ${$pwnpyvvih}) {
         ${"GLOBALS"}["ldqeiejmi"] = "field";
         ${"GLOBALS"}["mzlthpv"] = "field";
         $runwnk = "value";
         ${"GLOBALS"}["fpuljc"] = "field";
         ${"GLOBALS"}["ntpixskg"] = "value";
         ${"GLOBALS"}["spnaati"] = "value";
         ${"GLOBALS"}["skojvpla"] = "value";
         $wbvroskeu = "field";
         ${"GLOBALS"}["qgndecvge"] = "data";
         $urltcywzxdo = "value";
         $yvjdjqrxlw = "data";
         ${"GLOBALS"}["jhstjcwuy"] = "required_fields_database";
         $pviioxnj = "value";
         if (in_array(${${"GLOBALS"}["nsrqxdsfw"]}, ${${"GLOBALS"}["jhstjcwuy"]})) {
             ${${"GLOBALS"}["iwnmlbb"]}["required"] = true;
         }
         if (isset(${${"GLOBALS"}["iwnmlbb"]}["required"]) && ${${"GLOBALS"}["iwnmlbb"]}["required"] && (${${"GLOBALS"}["skojvpla"]} = Tools::getValue(${${"GLOBALS"}["ldqeiejmi"]}, $this->{${${"GLOBALS"}["mzlthpv"]}})) == false && (string) ${$pviioxnj} != "0") {
             if (!$this->id || ${${"GLOBALS"}["nsrqxdsfw"]} != "passwd") {
                 $zetdmofamt = "htmlentities";
                 $ywohmlrfbnh = "field";
                 ${${"GLOBALS"}["xgynkihlk"]}[] = "<b>" . self::displayFieldName(${$ywohmlrfbnh}, get_class($this), ${$zetdmofamt}) . "</b> " . Tools::displayError("is required.");
             }
         }
         if (isset(${${"GLOBALS"}["qgndecvge"]}["size"]) && (${${"GLOBALS"}["spnaati"]} = Tools::getValue(${$wbvroskeu}, $this->{${${"GLOBALS"}["nsrqxdsfw"]}})) && Tools::strlen(${${"GLOBALS"}["ntpixskg"]}) > ${$yvjdjqrxlw}["size"]) {
             $piwznejj = "data";
             $dlcyqqmxyc = "field";
             ${${"GLOBALS"}["xgynkihlk"]}[] = sprintf(Tools::displayError("%1\$s is too long. Maximum length: %2\$d"), self::displayFieldName(${$dlcyqqmxyc}, get_class($this), ${${"GLOBALS"}["thutunrxpxi"]}), ${$piwznejj}["size"]);
         }
         ${${"GLOBALS"}["wfflirafolq"]} = Tools::getValue(${${"GLOBALS"}["fpuljc"]}, $this->{${${"GLOBALS"}["nsrqxdsfw"]}});
         if (${$urltcywzxdo} || ${${"GLOBALS"}["wfflirafolq"]} == "0" || ${${"GLOBALS"}["nsrqxdsfw"]} == "postcode" && ${$runwnk} == "0") {
             $lmfyshwbdhu = "field";
             ${"GLOBALS"}["rfjxsv"] = "field";
             $kfuebbjho = "field";
             if (${${"GLOBALS"}["nsrqxdsfw"]} == "company" || ${${"GLOBALS"}["nsrqxdsfw"]} == "description" || ${${"GLOBALS"}["nsrqxdsfw"]} == "address1" || ${$kfuebbjho} == "address2" || ${${"GLOBALS"}["rfjxsv"]} == "city" || in_array(${$lmfyshwbdhu}, SellerInfo::getCustomMultiLanguageFields())) {
                 $npjnrrbqcu = "field";
                 $gnbvmqgsjne = "empty";
                 $bugdocnlwylp = "language";
                 $bksuduoel = "empty";
                 $pfktclkpyrm = "field";
                 ${"GLOBALS"}["gnwnnefkkal"] = "field";
                 // if ( ( ${${"GLOBALS"}["gnwnnefkkal"]} == "company" || ${${"GLOBALS"}["nsrqxdsfw"]} == "address1" || ${$npjnrrbqcu} == "city" ) && ( ( ${$gnbvmqgsjne} = Tools::getValue( ${$pfktclkpyrm} . "_" . $default_language->id ) ) === false || ${$bksuduoel} !== "0" && empty( ${${"GLOBALS"}["ptnvnxrnw"]} ) ) ) {
                 if (${${"GLOBALS"}["gnwnnefkkal"]} == "company" && ((${$gnbvmqgsjne} = Tools::getValue(${$pfktclkpyrm} . "_" . $default_language->id)) === false || ${$bksuduoel} !== "0" && empty(${${"GLOBALS"}["ptnvnxrnw"]}))) {
                     ${"GLOBALS"}["doslmnuqidd"] = "class_name";
                     ${"GLOBALS"}["aqlwwfiq"] = "class_name";
                     ${${"GLOBALS"}["xgynkihlk"]}[] = sprintf(Tools::displayError("The field %1\$s is required at least in %2\$s."), call_user_func(array(${${"GLOBALS"}["doslmnuqidd"]}, "displayFieldName"), ${${"GLOBALS"}["nsrqxdsfw"]}, ${${"GLOBALS"}["aqlwwfiq"]}), $default_language->name);
                 }
                 ${${"GLOBALS"}["wpnbfimr"]} = "";
                 foreach (${${"GLOBALS"}["ljiveifke"]} as ${$bugdocnlwylp}) {
                     $cndzkijievc = "field";
                     ${${"GLOBALS"}["wpnbfimr"]} = Tools::getValue(${$cndzkijievc} . "_" . ${${"GLOBALS"}["znrbdvbetm"]}["id_lang"]);
                     if (!empty(${${"GLOBALS"}["wpnbfimr"]})) {
                         break;
                     }
                 }
                 foreach (${${"GLOBALS"}["ljiveifke"]} as ${${"GLOBALS"}["znrbdvbetm"]}) {
                     $lldgwfe = "language";
                     ${"GLOBALS"}["vsmetocbel"] = "field_lang_value";
                     ${"GLOBALS"}["xivpfytplj"] = "field_lang_value";
                     ${${"GLOBALS"}["xivpfytplj"]} = Tools::getValue(${${"GLOBALS"}["nsrqxdsfw"]} . "_" . ${$lldgwfe}["id_lang"]);
                     ${"GLOBALS"}["brtzwoc"] = "field_lang_value";
                     ${"GLOBALS"}["gtkfqtcf"] = "field_lang_value_default";
                     ${"GLOBALS"}["ewqypbcfttt"] = "field_lang_value";
                     if (${${"GLOBALS"}["ewqypbcfttt"]} !== false && Tools::strlen(${${"GLOBALS"}["vsmetocbel"]}) > ${${"GLOBALS"}["iwnmlbb"]}["size"]) {
                         ${"GLOBALS"}["wtwtictfns"] = "errors";
                         $wdwsuuwkquqt = "field";
                         $cuwecmug = "class_name";
                         ${"GLOBALS"}["swcuxu"] = "language";
                         ${${"GLOBALS"}["wtwtictfns"]}[] = sprintf(Tools::displayError("The field %1\$s (%2\$s) is too long (%3\$d chars max, html chars including)."), call_user_func(array(${$cuwecmug}, "displayFieldName"), ${$wdwsuuwkquqt}, ${${"GLOBALS"}["tquylljuk"]}), ${${"GLOBALS"}["swcuxu"]}["name"], ${${"GLOBALS"}["iwnmlbb"]}["size"]);
                     }
                     if (isset(${${"GLOBALS"}["iwnmlbb"]}["validate"]) && !Validate::${${"GLOBALS"}["iwnmlbb"]}["validate"](${${"GLOBALS"}["kdmkog"]}) && !empty(${${"GLOBALS"}["brtzwoc"]})) {
                         $grnizjh = "class_name";
                         $lmtxfwvvoce = "field";
                         $xhefwlyisa = "language";
                         ${${"GLOBALS"}["xgynkihlk"]}[] = sprintf(Tools::displayError("The field %1\$s (%2\$s) Is Invalid."), call_user_func(array(${$grnizjh}, "displayFieldName"), ${$lmtxfwvvoce}, ${${"GLOBALS"}["tquylljuk"]}), ${$xhefwlyisa}["name"]);
                     }
                     $this->{${${"GLOBALS"}["nsrqxdsfw"]}}[${${"GLOBALS"}["znrbdvbetm"]}["id_lang"]] = empty(${${"GLOBALS"}["kdmkog"]}) ? ${${"GLOBALS"}["gtkfqtcf"]} : ${${"GLOBALS"}["kdmkog"]};
                 }
             } else {
                 ${"GLOBALS"}["mejgkzpxfs"] = "value";
                 ${"GLOBALS"}["mehkcydynk"] = "data";
                 if (isset(${${"GLOBALS"}["iwnmlbb"]}["validate"]) && !Validate::${${"GLOBALS"}["iwnmlbb"]}["validate"](${${"GLOBALS"}["wfflirafolq"]}) && (!empty(${${"GLOBALS"}["mejgkzpxfs"]}) || isset(${${"GLOBALS"}["iwnmlbb"]}["required"]) && ${${"GLOBALS"}["mehkcydynk"]}["required"])) {
                     $vltxdvdq = "htmlentities";
                     ${"GLOBALS"}["bohkdrh"] = "errors";
                     $btpfmrdi = "data";
                     ${${"GLOBALS"}["bohkdrh"]}[] = "<b>" . ${$btpfmrdi}["validate"] . " " . self::displayFieldName(${${"GLOBALS"}["nsrqxdsfw"]}, get_class($this), ${$vltxdvdq}) . "</b> " . Tools::displayError("is invalid.");
                 } else {
                     ${"GLOBALS"}["susgffn"] = "data";
                     $ojhawnjc = "field";
                     ${"GLOBALS"}["ddnlvjvgd"] = "data";
                     if (isset(${${"GLOBALS"}["ddnlvjvgd"]}["copy_post"]) && !${${"GLOBALS"}["susgffn"]}["copy_post"]) {
                         continue;
                     }
                     $this->{${$ojhawnjc}} = ${${"GLOBALS"}["wfflirafolq"]};
                 }
             }
         }
     }
     return ${${"GLOBALS"}["xgynkihlk"]};
 }