コード例 #1
0
 private function add_fields_for_upgrade()
 {
     Db::getInstance()->Execute("alter table " . _DB_PREFIX_ . "agile_subcart drop primary key, add primary key(id_seller, id_cart_parent, id_order);");
     AgileInstaller::add_field_ifnotexists("product_owner", "approved", "tinyint(1)", "NULL");
     AgileInstaller::add_field_ifnotexists("sellerinfo", "id_customer", "bigint(11)", "NULL");
     AgileInstaller::add_field_ifnotexists("sellerinfo", "dni", "varchar(128)", "NULL");
     ${"GLOBALS"}["xsoitpeas"] = "i";
     AgileInstaller::add_field_ifnotexists("sellerinfo", "id_shop", "bigint(11)", "NULL");
     ${"GLOBALS"}["ksxpjeqvy"] = "i";
     AgileInstaller::add_field_ifnotexists("sellerinfo", "id_category_default", "bigint(11)", "NULL");
     AgileInstaller::add_field_ifnotexists("carrier_owner", "is_default", "tinyint(1)", "NULL");
     AgileInstaller::add_field_ifnotexists("carrier_owner", "date_add", "datetime", "NULL");
     ${"GLOBALS"}["uagrtvhgk"] = "i";
     AgileInstaller::add_field_ifnotexists("sellerinfo", "id_sellertype1", "bigint(11)", "NULL");
     ${"GLOBALS"}["xqwtsyivol"] = "i";
     AgileInstaller::add_field_ifnotexists("sellerinfo", "id_sellertype2", "bigint(11)", "NULL");
     AgileInstaller::add_field_ifnotexists("sellerinfo_lang", "meta_title", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("sellerinfo_lang", "meta_keywords", "varchar(256)", "NULL");
     ${"GLOBALS"}["brpeniotm"] = "i";
     AgileInstaller::add_field_ifnotexists("sellerinfo_lang", "meta_description", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_seller_paymentinfo", "in_use", "tinyint(11)", "1");
     for (${${"GLOBALS"}["xqwtsyivol"]} = 1; ${${"GLOBALS"}["brpeniotm"]} <= 10; ${${"GLOBALS"}["hoqimumve"]}++) {
         AgileInstaller::add_field_ifnotexists("sellerinfo_lang", "ams_custom_text" . ${${"GLOBALS"}["hoqimumve"]}, "text", "NULL");
     }
     ${"GLOBALS"}["ywzymed"] = "i";
     for (${${"GLOBALS"}["xsoitpeas"]} = 1; ${${"GLOBALS"}["hoqimumve"]} <= 2; ${${"GLOBALS"}["hoqimumve"]}++) {
         $bujruodwecse = "i";
         AgileInstaller::add_field_ifnotexists("sellerinfo_lang", "ams_custom_html" . ${$bujruodwecse}, "text", "NULL");
     }
     for (${${"GLOBALS"}["hoqimumve"]} = 1; ${${"GLOBALS"}["ywzymed"]} <= 10; ${${"GLOBALS"}["hoqimumve"]}++) {
         ${"GLOBALS"}["lprrthxgcw"] = "i";
         AgileInstaller::add_field_ifnotexists("sellerinfo", "ams_custom_number" . ${${"GLOBALS"}["lprrthxgcw"]}, "float", "NULL");
     }
     for (${${"GLOBALS"}["ksxpjeqvy"]} = 1; ${${"GLOBALS"}["hoqimumve"]} <= 5; ${${"GLOBALS"}["uagrtvhgk"]}++) {
         AgileInstaller::add_field_ifnotexists("sellerinfo", "ams_custom_date" . ${${"GLOBALS"}["hoqimumve"]}, "date", "NULL");
     }
 }
コード例 #2
0
 public function install()
 {
     if (!defined("_IS_AGILE_DEV_") && !empty(self::${${"GLOBALS"}["wrtttnerkh"]}) && !Tools::getValue("redirected")) {
         $wgxanwq = "result";
         ${${"GLOBALS"}["dctmswpd"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]);
         AgileInstaller::install_newfiles(self::${${"GLOBALS"}["wrtttnerkh"]}, $this->name, ${${"GLOBALS"}["dctmswpd"]}, 2);
         ${$wgxanwq} = AgileInstaller::install_health_check(self::${${"GLOBALS"}["wrtttnerkh"]}, $this->name, ${${"GLOBALS"}["dctmswpd"]});
         if (!empty(${${"GLOBALS"}["usgkpcjvgm"]})) {
             $this->_errors[] = "<a target=\"agile\" style=\"text-decoration:underline;color:blue;\" href=\"http://addons-modules.com/store/en/content/36-agile-module-installation-tips\">" . $this->l('Failed to update files due to permission issue, please visit here for more instructions.') . "</a>";
             return false;
         }
         Tools::redirectAdmin("./index.php?controller=AdminModules&token=" . Tools::getValue("token") . "&install=" . $this->name . "&tab_module=" . $this->tab . " &module_name=" . $this->name . "&anchor=anchor" . $this->name . "&redirected=1");
     }
     ${${"GLOBALS"}["kmzguepw"]} = AgileInstaller::version_depencies($this->version_dependencies);
     if (!empty(${${"GLOBALS"}["kmzguepw"]})) {
         $grvyggbo = "reterrs";
         $this->_errors = array_merge($this->_errors, ${$grvyggbo});
         return false;
     }
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::INSTALL_SQL_FILE)) {
         return false;
     }
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname1", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname2", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname3", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname1", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname2", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname3", "varchar(256)", "NULL");
     ${${"GLOBALS"}["hyjuumq"]} = intval(Configuration::get("AGILE_MS_PROFILE_ID"));
     if (!AgileInstaller::create_tab("Customer Questions", "AgileSellerMessages", _PS_VERSION_ > "1.5" ? "AdminParentCustomer" : "AdminCustomers", $this->name)) {
         return false;
     }
     AgileInstaller::init_tab_prmission_for_existing_profiles("AgileSellerMessages", 1, 1, 1, 1);
     if (parent::install() == false or $this->registerHook("displayHeader") == false or !$this->registerHook("displayRightColumnProduct") or $this->registerHook("displayProductTab") == false or $this->registerHook("displayProductTabContent") == false or Configuration::updateValue("ASMGER_LOGIN_REQUIRED", 0) == false or Configuration::updateValue("ASMGER_APPROVAL_REQUIRED", 1) == false or Configuration::updateValue("ASMGER_HIDE_EMAIL", 1) == false or Configuration::updateValue("ASMGER_EMAIL_COPYADMIN", 0) == false or Configuration::updateValue("ASMGER_DONOTREPLY_EMAIL", "") == false or Configuration::updateValue("ASMGER_USE_CAPCHA", 1) == false or Configuration::updateValue("ASMGER_ALLOW_ATTACHMENT", 0) == false) {
         return false;
     }
     if (version_compare(_PS_VERSION_, "1.5", ">=")) {
         Autoload::getInstance()->generateIndex();
     }
     return true;
 }