$return = call_user_func_array(array($importModule, $getMethod), array($limit, $nbr_import)); $shopImporter = new shopImporter(); $shopImporter->generiqueImport($className, $return, (bool) $save); } } } if (Tools::isSubmit('truncatTable')) { $shopImporter = new shopImporter(); if ($shopImporter->truncateTable($className)) { die('{"hasError" : false, "error" : []}'); } else { die('{"hasError" : true, "error" : ["' . $className . '"]}'); } } if (Tools::isSubmit('alterTable')) { $shopImporter = new shopImporter(); if ($shopImporter->alterTable($className)) { die('{"hasError" : false, "error" : []}'); } else { die('{"hasError" : true, "error" : ["' . $className . '"]}'); } } if (Tools::isSubmit('displaySpecificOptions')) { if (file_exists('../../modules/' . $moduleName . '/' . $moduleName . '.php')) { require_once '../../modules/' . $moduleName . '/' . $moduleName . '.php'; $importModule = new $moduleName(); $importModule->server = $server; $importModule->user = $user; $importModule->passwd = $password; $importModule->database = $database; $importModule->prefix = $prefix;
die('{"hasError" : false, "error" : []}'); } else { die('{"hasError" : true, "error" : ["' . $className . '"]}'); } } if (Tools::isSubmit('alterTable')) { $shop_importer = new shopImporter(); if ($shop_importer->alterTable($className)) { die('{"hasError" : false, "error" : []}'); } else { die('{"hasError" : true, "error" : ["' . $className . '"]}'); } } if (Tools::isSubmit('displaySpecificOptions')) { if (file_exists('../../modules/' . $moduleName . '/' . $moduleName . '.php')) { $shop_importer = new shopImporter(); require_once '../../modules/' . $moduleName . '/' . $moduleName . '.php'; $importModule = new $moduleName(); $importModule->server = $server; $importModule->user = $user; $importModule->passwd = $password; $importModule->database = $database; $importModule->prefix = $prefix; if ($link = @mysql_connect(Tools::getValue('server'), Tools::getValue('user'), Tools::getValue('password'))) { if (!@mysql_select_db(Tools::getValue('database'), $link)) { die($shop_importer->l('The database selection cannot be made.', 'ajax')); } elseif (method_exists($importModule, 'displaySpecificOptions')) { die($importModule->displaySpecificOptions()); } else { die('not_exist'); }