public static function displayHelp($label, $iso_lang, $country, $ps_version) { $infos = HelpAccess::retrieveInfos($label, $iso_lang, $country, $ps_version); if (array_key_exists('image', $infos) && $infos['image'] != 'none') { echo ' <a class="help-button" href="#" onclick="showHelp(\'' . HelpAccess::URL . '\',\'' . $label . '\',\'' . $iso_lang . '\',\'' . $ps_version . '\',\'' . $infos['version'] . '\',\'' . $country . '\');" title="' . Tools::htmlentitiesUTF8($infos['tooltip']) . '"> <img id="help-' . $label . '" src="../img/admin/' . Tools::htmlentitiesUTF8($infos['image']) . '" alt="" class="middle" style="margin-top: -5px"/> ' . Tools::displayError('HELP') . ' </a> '; if (!empty($infos['tooltip'])) { echo ' <script type="text/javascript"> $(document).ready(function() { $("a.help-button").cluetip({ splitTitle: "|", cluetipClass: "help-button", showTitle: false, arrows: true, dropShadow: false, positionBy: "auto" }); }); </script>'; } } }
/** * @return string|void */ public function generate() { $info = HelpAccess::retrieveInfos($this->label, $this->iso_lang, $this->country, $this->ps_version); $content = ''; if (array_key_exists('version', $info) && $info['version'] != '') { $last_version = HelpAccess::getVersion($this->label); $tpl_vars['button_class'] = 'process-icon-help'; if ($last_version < $info['version']) { $tpl_vars['button_class'] = 'process-icon-help-new'; } $tpl_vars['label'] = $this->label; $tpl_vars['iso_lang'] = $this->iso_lang; $tpl_vars['country'] = $this->country; $tpl_vars['version'] = $this->ps_version; $tpl_vars['doc_version'] = $info['version']; $tpl_vars['help_base_url'] = HelpAccess::URL; $tpl_vars['tooltip'] = $info['tooltip']; $this->tpl->assign($tpl_vars); $content = parent::generate(); } return $content; }
die(AdminCounty::renderZipCodeList($county->getZipCodes())); } } else { if (Tools::isSubmit('ajaxRemoveZipCode') and $county->removeZipCodes($zipcodes)) { die(AdminCounty::renderZipCodeList($county->getZipCodes())); } } die('error'); } if (Tools::isSubmit('helpAccess')) { $item = Tools::getValue('item'); $isoUser = Tools::getValue('isoUser'); $country = Tools::getValue('country'); $version = Tools::getValue('version'); if (isset($item) and isset($isoUser) and isset($country)) { die(HelpAccess::displayHelp($item, $isoUser, $country, $version)); } die; } if (Tools::isSubmit('getHookableList')) { $modules_list = explode(',', Tools::getValue('modules_list')); $hooks_list = explode(',', Tools::getValue('hooks_list')); $hookableList = array(); foreach ($modules_list as $module) { $moduleInstance = Module::getInstanceByName($module); foreach ($hooks_list as $hook_name) { if (!array_key_exists($hook_name, $hookableList)) { $hookableList[$hook_name] = array(); } if ($moduleInstance->isHookableOn($hook_name)) { array_push($hookableList[$hook_name], $module);
} else { $list = 'false'; } die($list); } if (Tools::getValue('form_language_id')) { if (!($context->cookie->employee_form_lang = (int) Tools::getValue('form_language_id'))) { die('Error while updating cookie.'); } die('Form language updated.'); } if (Tools::isSubmit('submitTrackClickOnHelp')) { $label = Tools::getValue('label'); $version = Tools::getValue('version'); if (!empty($label) && !empty($version)) { HelpAccess::trackClick($label, $version); } } if (Tools::isSubmit('toggleScreencast')) { if (Validate::isLoadedObject($context->employee)) { $context->employee->bo_show_screencast = !$context->employee->bo_show_screencast; $context->employee->update(); } } if (Tools::isSubmit('getChildrenCategories') && Tools::isSubmit('id_category_parent')) { $children_categories = Category::getChildrenWithNbSelectedSubCat(Tools::getValue('id_category_parent'), Tools::getValue('selectedCat'), Context::getContext()->language->id, null, Tools::getValue('use_shop_context')); die(Tools::jsonEncode($children_categories)); } if (Tools::isSubmit('getNotifications')) { $notification = new Notification(); die(Tools::jsonEncode($notification->getLastElements()));
} else { die("error: permissions"); } } else { die("error: parameters"); } } if (Tools::isSubmit("submitTrackClickOnHelp")) { ${"GLOBALS"}["cmcxjhxv"] = "version"; ${"GLOBALS"}["bmwyejensn"] = "label"; $gcmxwsq = "version"; ${"GLOBALS"}["gddiunld"] = "version"; ${${"GLOBALS"}["bmwyejensn"]} = Tools::getValue("label"); ${${"GLOBALS"}["cmcxjhxv"]} = Tools::getValue("version"); if (!empty(${${"GLOBALS"}["xbftjclhi"]}) && !empty(${$gcmxwsq})) { HelpAccess::trackClick(${${"GLOBALS"}["xbftjclhi"]}, ${${"GLOBALS"}["gddiunld"]}); } } if (Tools::isSubmit("saveImportMatchs")) { $kihjnuhhb = "match"; ${$kihjnuhhb} = implode("|", Tools::getValue("type_value")); Db::getInstance()->execute("INSERT INTO `" . _DB_PREFIX_ . "import_match` (\n\t\t\t\t\t\t\t\t`id_import_match` ,\n\t\t\t\t\t\t\t\t`name` ,\n\t\t\t\t\t\t\t\t`match`,\n\t\t\t\t\t\t\t\t`skip`\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t\tNULL ,\n\t\t\t\t\t\t\t\t'" . pSQL(Tools::getValue("newImportMatchs")) . "',\n\t\t\t\t\t\t\t\t'" . pSQL(${${"GLOBALS"}["svuxne"]}) . "',\n\t\t\t\t\t\t\t\t'" . pSQL(Tools::getValue("skip")) . "'\n\t\t\t\t\t\t\t\t)"); die("{\"id\" : \"" . Db::getInstance()->Insert_ID() . "\"}"); } if (Tools::isSubmit("deleteImportMatchs")) { Db::getInstance()->execute("DELETE FROM `" . _DB_PREFIX_ . "import_match` WHERE `id_import_match` = " . (int) Tools::getValue("idImportMatchs")); } if (Tools::isSubmit("loadImportMatchs")) { ${"GLOBALS"}["umhcjseaxj"] = "return"; ${"GLOBALS"}["qxmqncny"] = "return"; ${"GLOBALS"}["chdckcitxk"] = "return";