public function processData() { ${"GLOBALS"}["fdbwqugrvpj"] = "sellertypes"; ${"GLOBALS"}["rafjmgrtz"] = "currentURL"; global $link, $cookie; ${"GLOBALS"}["wyfrrsgzcqmj"] = "parentid"; $wkdfihoixlt = "sellerlocs"; ${"GLOBALS"}["abfhyohxcepq"] = "sellertypes"; ${"GLOBALS"}["onavblgqay"] = "loclevel"; ${"GLOBALS"}["cmrbhwildqq"] = "sql"; $rnauidpzoj = "id_state"; $vltwwfcpyb = "sql"; ${${"GLOBALS"}["wyfrrsgzcqmj"]} = Tools::getValue("parentid"); ${${"GLOBALS"}["onavblgqay"]} = Tools::getValue("loclevel"); ${"GLOBALS"}["wneezryb"] = "id_state"; $rjnipgjmcov = "id_country"; ${${"GLOBALS"}["zlnwwfwwxl"]} = $cookie->id_lang; ${${"GLOBALS"}["rafjmgrtz"]} = $link->getAgileSellersLink(Tools::getValue("filter"), NULL, ${${"GLOBALS"}["qdayfxgyolo"]}, ${${"GLOBALS"}["inoywq"]}); ${"GLOBALS"}["xgpwhw"] = "sql"; $sqfkfhf = "selers_nb"; $wrxuynjjspv = "id_lang"; include_once _PS_ROOT_DIR_ . "/modules/agilemultipleshop/SellerType.php"; ${"GLOBALS"}["pxrhlvnban"] = "id_country"; $ndrslk = "sellerlocs"; $fiwtjwlboebj = "selers_nb"; ${${"GLOBALS"}["abfhyohxcepq"]} = SellerType::getSellerTypes($cookie->id_lang); ${"GLOBALS"}["iqeqiylvi"] = "sql"; $sbiweugxfex = "module"; ${${"GLOBALS"}["sjmhyny"]} = $this->getSellers(Tools::getValue("filter"), Tools::getValue("loclevel"), Tools::getValue("seller_location"), Tools::getValue("parentid"), Tools::getValue("seller_type"), true); $this->pagination((int) ${$sqfkfhf}); ${${"GLOBALS"}["nyyubgx"]} = $this->getSellers(Tools::getValue("filter"), Tools::getValue("loclevel"), Tools::getValue("seller_location"), Tools::getValue("parentid"), Tools::getValue("seller_type"), false, $this->p, $this->n); $qjtsnum = "sql"; ${${"GLOBALS"}["cmrbhwildqq"]} = ""; switch (${${"GLOBALS"}["qdayfxgyolo"]}) { case "city": ${$rnauidpzoj} = Tools::getValue("parentid"); ${$vltwwfcpyb} = "SELECT distinct sl.city AS id, sl.city AS name \n\t\t\t\t\t\tFROM " . _DB_PREFIX_ . "sellerinfo s\n\t\t\t\t\t\t\tLEFT JOIN " . _DB_PREFIX_ . "sellerinfo_lang sl ON (s.id_sellerinfo=sl.id_sellerinfo AND sl.id_lang = " . $cookie->id_lang . ")\n\t\t\t\t\t\tWHERE s.id_state=" . intval(${${"GLOBALS"}["wneezryb"]}); break; case "state": ${${"GLOBALS"}["vjhhwtnl"]} = intval(Tools::getValue("parentid")); if (${${"GLOBALS"}["pxrhlvnban"]} <= 0) { ${$rjnipgjmcov} = intval(Configuration::get("PS_COUNTRY_DEFAULT")); } ${${"GLOBALS"}["hfizsmyzc"]} = "SELECT distinct id_state AS id, name \n\t\t\t\t\tFROM " . _DB_PREFIX_ . "state \n\t\t\t\t\tWHERE id_country=" . intval(${${"GLOBALS"}["vjhhwtnl"]}); break; case "country": ${${"GLOBALS"}["iqeqiylvi"]} = "SELECT distinct c.id_country AS id, cl.name \n\t\t\t\t\t\tFROM " . _DB_PREFIX_ . "country c \n\t\t\t\t\t\tLEFT JOIN " . _DB_PREFIX_ . "country_lang cl ON (cl.id_country=c.id_country AND cl.id_lang = " . ${$wrxuynjjspv} . ")\n\t\t\t\t\t\tWHERE active=1\n\t\t\t\t\t\t"; break; } if (!empty(${$qjtsnum})) { ${${"GLOBALS"}["ttvqpqg"]} = Db::getInstance()->ExecuteS(${${"GLOBALS"}["xgpwhw"]}); } else { ${$wkdfihoixlt} = array(); } include_once _PS_ROOT_DIR_ . "/modules/agilemultipleshop/agilemultipleshop.php"; ${$sbiweugxfex} = new AgileMultipleShop(); self::$smarty->assign(array("seller_list" => ${${"GLOBALS"}["nyyubgx"]}, "selers_nb" => ${$fiwtjwlboebj}, "sellertypes" => ${${"GLOBALS"}["fdbwqugrvpj"]}, "sellerlocs" => ${$ndrslk}, "filters" => array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"), "filter" => Tools::getValue("filter"), "parentid" => ${${"GLOBALS"}["inoywq"]}, "loclevel" => ${${"GLOBALS"}["qdayfxgyolo"]}, "userview" => Tools::getValue("userview"), "seller_type" => intval(Tools::getValue("seller_type")), "seller_location" => Tools::getValue("seller_location"), "currentURL" => ${${"GLOBALS"}["jjtugzy"]}, "homeSize" => Image::getSize("home_default"), "agilemultipleshop_tpl" => _PS_ROOT_DIR_ . "/modules/agilemultipleshop/", "path" => $module->getL("Shop By Seller"))); }
public function renderForm() { ${"GLOBALS"}["dddtfrxpcw"] = "idx"; global $cookie; ${"GLOBALS"}["oqzraukpnhx"] = "idx"; $cfgszngkkdgu = "conf"; ${"GLOBALS"}["hiukelnql"] = "token_shop"; ${"GLOBALS"}["yfpqvur"] = "ad"; $okhklostdzy = "idx"; $mrppodshf = "isoTinyMCE"; $vayvrofuh = "iso"; $tlyqnsqamoo = "obj"; if (!(${$tlyqnsqamoo} = $this->loadObject(true))) { return; } $swbexjxsqcx = "id_customer"; ${"GLOBALS"}["grhnkmgq"] = "token_shop"; ${$vayvrofuh} = $this->context->language->iso_code; ${$mrppodshf} = file_exists(_PS_ROOT_DIR_ . "/js/tiny_mce/langs/" . $this->context->language->iso_code . ".js") ? $this->context->language->iso_code : "en"; ${"GLOBALS"}["yuhqxxl"] = "linktoshop"; ${${"GLOBALS"}["yfpqvur"]} = dirname($_SERVER["PHP_SELF"]); $this->context->smarty->assign(array("ad" => ${${"GLOBALS"}["ysuzwjqph"]}, "isoTinyMCE" => ${${"GLOBALS"}["lyfpont"]}, "base_dir" => _PS_BASE_URL_ . __PS_BASE_URI__, "base_dir_ssl" => _PS_BASE_URL_SSL_ . __PS_BASE_URI__, "theme_css_dir" => _THEME_CSS_DIR_)); ${${"GLOBALS"}["hiukelnql"]} = Tools::getAdminToken("AdminShopUrl" . (int) Tab::getIdFromClassName("AdminShopUrl") . (int) $this->context->employee->id); ${${"GLOBALS"}["yuhqxxl"]} = "./index.php?controller=AdminShopUrl&token=" . ${${"GLOBALS"}["grhnkmgq"]} . "&id_shop=" . $this->object->id_shop; $this->fields_form = array("legend" => array("title" => $this->l('Seller Info'), "image" => "../img/admin/tab-customers.gif"), "input" => array(array("type" => "text_customer", "label" => $this->l('Front Store Account:'), "name" => "id_customer", "size" => 33, "required" => false), array("type" => "text_seller_employee", "label" => $this->l('Back office Account:'), "name" => "id_seller", "size" => 33, "required" => false), array("type" => "select", "label" => $this->l('Seller Home Category:'), "name" => "id_category_default", "required" => false, "default_value" => 0, "options" => array("query" => Category::getCategories($cookie->id_lang, true, false), "id" => "id_category", "name" => "name")), array("type" => "select", "label" => $this->l('Shop:'), "name" => "id_shop", "required" => false, "default_value" => 0, "options" => array("query" => $this->getAllShops(false), "id" => "id_shop", "name" => "name"), "desc" => "<a href=\"" . ${${"GLOBALS"}["jjmxkznq"]} . "\">" . $this->l('Click here to go shop managenment page') . "</a>"), array("type" => "text", "label" => $this->l('Company:'), "name" => "company", "size" => 33, "lang" => true, "required" => true, "hint" => $this->l('Forbidden characters:') . " 0-9!<>,;?=+()@#\"?{}_\$%:"))); $this->fields_form["input"][] = array("type" => "select", "label" => $this->l('Primary Type'), "name" => "id_sellertype1", "required" => false, "options" => array("query" => Module::isInstalled("agilemultipleshop") ? SellerType::getSellerTypes($this->context->language->id, $this->l('Please choose seller type')) : array(), "id" => "id_sellertype", "name" => "name")); ${"GLOBALS"}["khxuuqb"] = "idx"; $vkfmusoiw = "token_employee"; $this->fields_form["input"][] = array("type" => "select", "label" => $this->l('Secondary Type'), "name" => "id_sellertype2", "required" => false, "options" => array("query" => Module::isInstalled("agilemultipleshop") ? SellerType::getSellerTypes($this->context->language->id, $this->l('Please choose seller type')) : array(), "id" => "id_sellertype", "name" => "name")); $this->fields_form["input"][] = array("type" => "file", "label" => $this->l('Logo:'), "name" => "logo", "display_image" => true, "col" => 6, "desc" => $this->l('Upload seller logo from your computer')); $this->fields_form["input"][] = array("type" => "textarea", "label" => $this->l('Description:'), "name" => "description", "lang" => true, "autoload_rte" => true, "rows" => 10, "cols" => 100, "hint" => $this->l('Invalid characters:') . " <>;=#{}"); $vofzvpkc = "seller_employee"; $qnjhtskd = "id_customer"; $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Address Line1:'), "name" => "address1", "lang" => true, "size" => 33, "required" => true, "hint" => $this->l('Forbidden characters:') . " 0-9!<>,;?=+()@#\"?{}_\$%:"); $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Address Line2:'), "name" => "address2", "lang" => true, "size" => 33, "required" => false, "hint" => $this->l('Invalid characters:') . " 0-9!<>,;?=+()@#\"?{}_\$%:"); $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('City:'), "name" => "city", "lang" => true, "size" => 33, "required" => true, "hint" => $this->l('Invalid characters:') . " 0-9!<>,;?=+()@#\"?{}_\$%:"); $irumgsgqqjyo = "idx"; ${"GLOBALS"}["yfrskcvv"] = "logo_image"; $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Postal Code:'), "name" => "postcode", "size" => 33, "required" => true); $this->fields_form["input"][] = array("type" => "select", "label" => $this->l('State'), "name" => "id_state", "required" => false, "options" => array("query" => array(), "id" => "id_state", "name" => "name")); ${"GLOBALS"}["hxbjsmu"] = "customer"; $this->fields_form["input"][] = array("type" => "select", "label" => $this->l('Country:'), "name" => "id_country", "required" => true, "default_value" => (int) $this->context->country->id, "options" => array("query" => Country::getCountries($this->context->language->id, true), "id" => "id_country", "name" => "name")); $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Phone:'), "name" => "phone", "size" => 33, "required" => false); $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Fax:'), "name" => "fax", "size" => 33, "required" => false); $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Identification:'), "name" => "dni", "size" => 33, "required" => false); $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Latitude:'), "name" => "latitude", "size" => 33, "required" => false); $this->fields_form["input"][] = array("type" => "text", "label" => $this->l('Longitude:'), "name" => "longitude", "size" => 33, "required" => false); ${$cfgszngkkdgu} = Configuration::getMultiple(array("AGILE_MS_SELLER_TEXT1", "AGILE_MS_SELLER_TEXT2", "AGILE_MS_SELLER_TEXT3", "AGILE_MS_SELLER_TEXT4", "AGILE_MS_SELLER_TEXT5", "AGILE_MS_SELLER_TEXT6", "AGILE_MS_SELLER_TEXT7", "AGILE_MS_SELLER_TEXT8", "AGILE_MS_SELLER_TEXT9", "AGILE_MS_SELLER_TEXT10", "AGILE_MS_SELLER_HTML1", "AGILE_MS_SELLER_HTML2", "AGILE_MS_SELLER_NUMBER1", "AGILE_MS_SELLER_NUMBER2", "AGILE_MS_SELLER_NUMBER3", "AGILE_MS_SELLER_NUMBER4", "AGILE_MS_SELLER_NUMBER5", "AGILE_MS_SELLER_DATE1", "AGILE_MS_SELLER_DATE2", "AGILE_MS_SELLER_DATE3", "AGILE_MS_SELLER_DATE4", "AGILE_MS_SELLER_DATE5")); ${"GLOBALS"}["wfpjljldqp"] = "idx"; ${"GLOBALS"}["hcfmkerjksv"] = "id_seller"; for (${${"GLOBALS"}["khxuuqb"]} = 1; ${${"GLOBALS"}["mkdxvwk"]} <= 10; ${${"GLOBALS"}["mkdxvwk"]}++) { ${"GLOBALS"}["ybndfnrbxa"] = "conf"; $xnfolwno = "idx"; $kykjjpjyw = "conf"; if (isset(${${"GLOBALS"}["ybndfnrbxa"]}["AGILE_MS_SELLER_TEXT" . ${${"GLOBALS"}["mkdxvwk"]}]) and ${$kykjjpjyw}["AGILE_MS_SELLER_TEXT" . ${$xnfolwno}]) { ${"GLOBALS"}["mdpisxrrstb"] = "idx"; $this->fields_form["input"][] = array("type" => "text", "label" => $this->custom_labels["ams_custom_text" . ${${"GLOBALS"}["mkdxvwk"]}], "name" => "ams_custom_text" . ${${"GLOBALS"}["mdpisxrrstb"]}, "lang" => true, "size" => 100, "required" => false); } } for (${${"GLOBALS"}["wfpjljldqp"]} = 1; ${$irumgsgqqjyo} <= 2; ${$okhklostdzy}++) { ${"GLOBALS"}["ykynuwygbxsx"] = "conf"; $nhkctnss = "idx"; $pmfejhu = "idx"; if (isset(${${"GLOBALS"}["ykynuwygbxsx"]}["AGILE_MS_SELLER_HTML" . ${$nhkctnss}]) and ${${"GLOBALS"}["fpybeyzhk"]}["AGILE_MS_SELLER_HTML" . ${$pmfejhu}]) { $wjkzjmpxq = "idx"; $this->fields_form["input"][] = array("type" => "textarea", "label" => $this->custom_labels["ams_custom_html" . ${${"GLOBALS"}["mkdxvwk"]}], "name" => "ams_custom_html" . ${$wjkzjmpxq}, "lang" => true, "autoload_rte" => true, "rows" => 10, "cols" => 100, "required" => false); } } for (${${"GLOBALS"}["mkdxvwk"]} = 1; ${${"GLOBALS"}["oqzraukpnhx"]} <= 10; ${${"GLOBALS"}["mkdxvwk"]}++) { ${"GLOBALS"}["xfwmtomgx"] = "conf"; if (isset(${${"GLOBALS"}["xfwmtomgx"]}["AGILE_MS_SELLER_NUMBER" . ${${"GLOBALS"}["mkdxvwk"]}]) and ${${"GLOBALS"}["fpybeyzhk"]}["AGILE_MS_SELLER_NUMBER" . ${${"GLOBALS"}["mkdxvwk"]}]) { $xubipgq = "idx"; $this->fields_form["input"][] = array("type" => "text", "label" => $this->custom_labels["ams_custom_number" . ${${"GLOBALS"}["mkdxvwk"]}], "name" => "ams_custom_number" . ${$xubipgq}); } } ${"GLOBALS"}["injkquajrp"] = "id_seller"; ${"GLOBALS"}["qfnrzaw"] = "token_employee"; ${"GLOBALS"}["ysydpigmsjw"] = "id_seller"; for (${${"GLOBALS"}["mkdxvwk"]} = 1; ${${"GLOBALS"}["mkdxvwk"]} <= 5; ${${"GLOBALS"}["dddtfrxpcw"]}++) { $nwusbqthad = "idx"; $oivqmjyo = "conf"; if (isset(${$oivqmjyo}["AGILE_MS_SELLER_DATE" . ${${"GLOBALS"}["mkdxvwk"]}]) and ${${"GLOBALS"}["fpybeyzhk"]}["AGILE_MS_SELLER_DATE" . ${$nwusbqthad}]) { $this->fields_form["input"][] = array("type" => "date", "label" => $this->custom_labels["ams_custom_date" . ${${"GLOBALS"}["mkdxvwk"]}], "name" => "ams_custom_date" . ${${"GLOBALS"}["mkdxvwk"]}, "size" => 30); } } $this->fields_form["input"][] = array("type" => "google_map", "label" => $this->l('Map:'), "name" => "google_map", "required" => false); ${"GLOBALS"}["ixmuyengwu"] = "token_customer"; if (!Module::isInstalled("agilemultipleshop")) { $nsyympiirvx = "i"; ${"GLOBALS"}["dswivenyh"] = "i"; for (${${"GLOBALS"}["yjobmyxznm"]} = 0; ${$nsyympiirvx} < count($this->fields_form["input"]); ${${"GLOBALS"}["dswivenyh"]}++) { ${"GLOBALS"}["ofnkmlnty"] = "i"; if ($this->fields_form["input"][${${"GLOBALS"}["ofnkmlnty"]}]["name"] == "id_sellertype1" or $this->fields_form["input"][${${"GLOBALS"}["yjobmyxznm"]}]["name"] == "id_sellertype2") { $mlwiiklojahc = "i"; unset($this->fields_form["input"][${$mlwiiklojahc}]); } } } $this->fields_form["submit"] = array("title" => $this->l('Save'), "class" => "btn btn-default pull-right"); ${${"GLOBALS"}["jrcgrrr"]} = (int) Tools::getValue("id_customer"); if (!${$qnjhtskd} && Validate::isLoadedObject($this->object)) { ${$swbexjxsqcx} = $this->object->id_customer; } if (${${"GLOBALS"}["jrcgrrr"]} > 0) { ${"GLOBALS"}["bltpsbtmczvh"] = "customer"; ${${"GLOBALS"}["bltpsbtmczvh"]} = new Customer((int) ${${"GLOBALS"}["jrcgrrr"]}); ${${"GLOBALS"}["rwpflypen"]} = Tools::getAdminToken("AdminCustomers" . (int) Tab::getIdFromClassName("AdminCustomers") . (int) $this->context->employee->id); } $mnlknnmlhtlq = "obj"; ${${"GLOBALS"}["eyyibnxz"]} = (int) Tools::getValue("id_seller"); if (!${${"GLOBALS"}["hcfmkerjksv"]} && Validate::isLoadedObject($this->object)) { ${${"GLOBALS"}["injkquajrp"]} = $this->object->id_seller; } if (${${"GLOBALS"}["ysydpigmsjw"]} > 0) { ${"GLOBALS"}["cpirvsll"] = "seller_employee"; ${"GLOBALS"}["uetgcpbf"] = "seller_employee"; ${${"GLOBALS"}["uetgcpbf"]} = new Employee((int) ${${"GLOBALS"}["eyyibnxz"]}); if (Validate::isLoadedObject(${${"GLOBALS"}["urmtkk"]})) { ${${"GLOBALS"}["xwldamgmwyk"]} = Tools::getAdminToken("AdminEmployees" . (int) Tab::getIdFromClassName("AdminEmployees") . (int) $this->context->employee->id); } else { unset(${${"GLOBALS"}["cpirvsll"]}); } } if (Configuration::get("VATNUMBER_MANAGEMENT") && file_exists(_PS_MODULE_DIR_ . "vatnumber/vatnumber.php")) { include_once _PS_MODULE_DIR_ . "vatnumber/vatnumber.php"; } if (Configuration::get("VATNUMBER_MANAGEMENT")) { $kklclhqeiyjy = "vat"; if (file_exists(_PS_MODULE_DIR_ . "vatnumber/vatnumber.php") && VatNumber::isApplicable(Configuration::get("PS_COUNTRY_DEFAULT"))) { ${${"GLOBALS"}["gmedzghdfbu"]} = "is_applicable"; } else { ${$kklclhqeiyjy} = "management"; } } ${${"GLOBALS"}["ejcxwlrcubn"]} = SellerInfo::get_seller_logo_url_static(Tools::getValue("id_sellerinfo")); $this->tpl_form_vars = array("vat" => isset(${${"GLOBALS"}["gmedzghdfbu"]}) ? ${${"GLOBALS"}["gmedzghdfbu"]} : null, "customer" => isset(${${"GLOBALS"}["hxbjsmu"]}) ? ${${"GLOBALS"}["lbmumw"]} : null, "seller_employee" => isset(${$vofzvpkc}) ? ${${"GLOBALS"}["urmtkk"]} : null, "agilemultipleseller_views" => _PS_ROOT_DIR_ . "/modules/agilemultipleseller/views/", "base_dir" => _PS_BASE_URL_ . __PS_BASE_URI__, "base_dir_ssl" => _PS_BASE_URL_SSL_ . __PS_BASE_URI__, "tokenCustomer" => isset(${${"GLOBALS"}["rwpflypen"]}) ? ${${"GLOBALS"}["ixmuyengwu"]} : null, "tokenEmployee" => isset(${$vkfmusoiw}) ? ${${"GLOBALS"}["qfnrzaw"]} : null, "logo_image_url" => ${${"GLOBALS"}["yfrskcvv"]} ? ${${"GLOBALS"}["ejcxwlrcubn"]} : false, "sellerinfo_obj" => ${$mnlknnmlhtlq}); return parent::renderForm(); }
public function initContent() { parent::initContent(); $drmsovcflhye = "default_shop"; ${${"GLOBALS"}["jdvygpdab"]} = new Shop(Configuration::get("PS_SHOP_DEFAULT")); $abkueg = "seller_shop"; $yjfmulvwuk = "seller_shop"; ${$abkueg} = new Shop($this->sellerinfo->id_shop); ${${"GLOBALS"}["ppeuxuxmi"]} = new ShopUrl(Shop::get_main_url_id($seller_shop->id)); $kfitqvuwyww = "seller_shopurl"; self::$smarty->assign(array("default_shop" => ${$drmsovcflhye}, "seller_shop" => ${$yjfmulvwuk}, "seller_shopurl" => ${$kfitqvuwyww}, "sellertypes" => Module::isINstalled("agilemultipleshop") ? SellerType::getSellerTypes($this->context->language->id, $this->l('Please choose seller type')) : array())); $this->assignCountries(); $this->assignVatNumber(); $this->assignAddressFormat(); $this->getImages(); $this->getLanguage(); $this->getLang(); $this->setTemplate("sellerbusiness.tpl"); }