本文整理汇总了PHP中Tools::htmlentitiesDecodeUTF8方法的典型用法代码示例。如果您正苦于以下问题:PHP Tools::htmlentitiesDecodeUTF8方法的具体用法?PHP Tools::htmlentitiesDecodeUTF8怎么用?PHP Tools::htmlentitiesDecodeUTF8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tools
的用法示例。
在下文中一共展示了Tools::htmlentitiesDecodeUTF8方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeCronTask
public static function executeCronTask()
{
$ts_module = new TrustedShops();
$ts_common = new TSCommon();
$common_count = 0;
if (is_array(TSCommon::$available_languages)) {
$to_remove = array();
foreach (array_keys(TSCommon::$available_languages) as $iso) {
$alerts_infos = RatingAlert::getAlertsInformations($iso);
///print_r($alerts_infos);
if ($alerts_infos != false) {
$common_count += count($alerts_infos);
foreach ($alerts_infos as $infos) {
$cert = Configuration::get(TSCommon::PREFIX_TABLE . 'CERTIFICATE_' . Tools::strtoupper($infos['iso']));
$certificate = (array) Tools::jsonDecode(Tools::htmlentitiesDecodeUTF8($cert));
$subject = $ts_module->l('title_part_1') . ' ' . Configuration::get('PS_SHOP_NAME') . $ts_module->l('title_part_2');
$template_vars = array('{ts_id}' => $certificate['tsID'], '{button_url}' => TSCommon::getHttpHost(true, true) . _MODULE_DIR_ . $ts_module->name . '/views/img', '{rating_url}' => $ts_common->getRatingUrlWithBuyerEmail($infos['id_lang'], $infos['id_order'], $infos['email']));
$result = Mail::Send((int) $infos['id_lang'], self::MAIL_TEMPLATE, $subject, $template_vars, $infos['email'], null, Configuration::get('PS_SHOP_EMAIL'), Configuration::get('PS_SHOP_NAME'), null, null, dirname(__FILE__) . '/../mails/');
if ($result) {
$to_remove[] = (int) $infos['id_alert'];
}
}
}
}
if (count($to_remove) > 0) {
self::removeAlerts($to_remove);
}
}
return count($to_remove) == $common_count;
}
示例2: getTranslationsFieldsChild
public function getTranslationsFieldsChild()
{
parent::validateFieldsLang();
$fieldsArray = array('meta_title', 'meta_description', 'meta_keywords', 'link_rewrite');
$fields = array();
$languages = Language::getLanguages();
$defaultLanguage = Configuration::get('PS_LANG_DEFAULT');
foreach ($languages as $language) {
$fields[$language['id_lang']]['id_lang'] = $language['id_lang'];
$fields[$language['id_lang']][$this->identifier] = intval($this->id);
$fields[$language['id_lang']]['content'] = isset($this->content[$language['id_lang']]) ? Tools::htmlentitiesDecodeUTF8(pSQL($this->content[$language['id_lang']], true)) : '';
foreach ($fieldsArray as $field) {
if (!Validate::isTableOrIdentifier($field)) {
die(Tools::displayError());
}
if (isset($this->{$field}[$language['id_lang']]) and !empty($this->{$field}[$language['id_lang']])) {
$fields[$language['id_lang']][$field] = pSQL($this->{$field}[$language['id_lang']]);
} elseif (in_array($field, $this->fieldsRequiredLang)) {
$fields[$language['id_lang']][$field] = pSQL($this->{$field}[$defaultLanguage]);
} else {
$fields[$language['id_lang']][$field] = '';
}
}
}
return $fields;
}
示例3: decode_content
function decode_content()
{
// CMS_LANG
$sql = 'SELECT `id_cms`, `content`, `id_lang` FROM `' . _DB_PREFIX_ . 'cms_lang`';
$result = Db::getInstance()->ExecuteS($sql);
foreach ($result as $cms) {
Db::getInstance()->Execute('UPDATE `' . _DB_PREFIX_ . 'cms_lang`
SET `content` = \'' . pSql(Tools::htmlentitiesDecodeUTF8($cms['content']), true) . '\'
WHERE `id_cms`= ' . intval($cms['id_cms']) . ' AND `id_lang` = ' . intval($cms['id_lang']));
}
// MANUFACTURER_LANG
$sql = 'SELECT `id_manufacturer`, `description`, `short_description`, `id_lang` FROM `' . _DB_PREFIX_ . 'manufacturer_lang`';
$result = Db::getInstance()->ExecuteS($sql);
foreach ($result as $manu) {
Db::getInstance()->Execute('UPDATE `' . _DB_PREFIX_ . 'manufacturer_lang`
SET `description` = \'' . pSql(Tools::htmlentitiesDecodeUTF8($manu['description']), true) . '\',
`short_description` = \'' . pSql(Tools::htmlentitiesDecodeUTF8($manu['short_description']), true) . '\'
WHERE `id_manufacturer`= ' . intval($manu['id_manufacturer']) . ' AND `id_lang` = ' . intval($manu['id_lang']));
}
// PRODUCT_LANG
$sql = 'SELECT `id_product`, `description`, `description_short`, `id_lang` FROM `' . _DB_PREFIX_ . 'product_lang`';
$result = Db::getInstance()->ExecuteS($sql);
foreach ($result as $prod) {
Db::getInstance()->Execute('UPDATE `' . _DB_PREFIX_ . 'product_lang`
SET `description` = \'' . pSql(Tools::htmlentitiesDecodeUTF8($prod['description']), true) . '\',
`description_short` = \'' . pSql(Tools::htmlentitiesDecodeUTF8($prod['description_short']), true) . '\'
WHERE `id_product`= ' . intval($prod['id_product']) . ' AND `id_lang` = ' . intval($prod['id_lang']));
}
}
示例4: renderList
public function renderList()
{
$this->context->smarty->assign(array('campaign_id' => $this->campaign_id, 'campaign_name' => Tools::htmlentitiesDecodeUTF8($this->name), 'campaign_sended' => $this->campaign_sended, 'count_planned' => $this->count_planned_recipients, 'count_cancelled' => $this->count_cancelled_recipients));
$display = $this->getTemplatePath() . 'footer_validation.tpl';
$this->context->smarty->assign('footer_validation', $this->context->smarty->fetch($display));
$display = $this->getTemplatePath() . 'marketingf_step8/marketingf_step8.tpl';
$output = $this->context->smarty->fetch($display);
$footer = $this->getTemplatePath() . 'footer.tpl';
$output .= $this->context->smarty->fetch($footer);
return $output;
}
示例5: renderList
public function renderList()
{
$this->context->smarty->assign(array('campaign_id' => $this->campaign_id, 'count_delivered' => $this->count_delivered_recipients, 'count_sending' => $this->count_transmiting_recipients + $this->count_delivering_recipients, 'count_not_delivered' => $this->count_not_delivered_recipients, 'count_planned' => $this->count_planned_recipients, 'count_cancelled' => $this->count_cancelled_recipients, 'count_detail_array' => $this->cost_sms_detail, 'campaign_name' => Tools::htmlentitiesDecodeUTF8($this->campaign_name), 'campaign_text' => $this->campaign_text, 'campaign_sended' => $this->campaign_sended));
$display = $this->getTemplatePath() . 'marketings_stats/cost_s_stats.tpl';
$this->context->smarty->assign('cost_sms_detail', $this->context->smarty->fetch($display));
$display = $this->getTemplatePath() . 'footer_validation.tpl';
$this->context->smarty->assign('footer_validation', $this->context->smarty->fetch($display));
$display = $this->getTemplatePath() . 'marketings_step7/marketings_step7.tpl';
$output = $this->context->smarty->fetch($display);
$footer = $this->getTemplatePath() . 'footer.tpl';
$output .= $this->context->smarty->fetch($footer);
return $output;
}
示例6: upgrade_module_2_0
function upgrade_module_2_0($object)
{
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
$items = $db->executeS("Select * From " . _DB_PREFIX_ . "customparallax_module_lang");
if ($items) {
foreach ($items as $item) {
$content = @Tools::htmlentitiesDecodeUTF8($item['content']);
if (isset($content) && $content) {
$db->update('customparallax_module_lang', array('content' => $db->escape($content, true)), "`module_id`='" . $item['module_id'] . "' AND `id_lang`='" . $item['id_lang'] . "'");
}
}
}
return true;
}
示例7: upgrade_module_2_0
function upgrade_module_2_0($object)
{
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
$items = $db->executeS("Select * From " . _DB_PREFIX_ . "flexgroupbanners_banner_lang");
if ($items) {
foreach ($items as $item) {
$description = @Tools::htmlentitiesDecodeUTF8($item['description']);
if (isset($description) && $description) {
$db->update('flexgroupbanners_banner_lang', array('description' => $db->escape($description, true)), "`banner_id`='" . $item['banner_id'] . "' AND `id_lang`='" . $item['id_lang'] . "'");
}
}
}
return true;
}
示例8: update_order_messages
function update_order_messages()
{
$step = 3000;
$count_messages = Db::getInstance()->getValue('SELECT count(id_message) FROM ' . _DB_PREFIX_ . 'message');
$nb_loop = $start = 0;
$pattern = '<br|&[a-zA-Z]{1,8};';
if ($count_messages > 0) {
$nb_loop = ceil($count_messages / $step);
}
for ($i = 0; $i < $nb_loop; $i++) {
$sql = 'SELECT id_message, message FROM `' . _DB_PREFIX_ . 'message` WHERE message REGEXP \'' . pSQL($pattern, true) . '\' LIMIT ' . (int) $start . ', ' . (int) $step;
$start = intval(($i + 1) * $step);
if ($messages = Db::getInstance()->query($sql)) {
while ($message = Db::getInstance()->nextRow($messages)) {
if (is_array($message)) {
Db::getInstance()->execute('
UPDATE `' . _DB_PREFIX_ . 'message`
SET message = \'' . pSQL(preg_replace('/' . $pattern . '/', '', Tools::htmlentitiesDecodeUTF8(br2nl($message['message'])))) . '\'
WHERE id_message = ' . (int) $message['id_message']);
}
}
}
}
$nb_loop = $start = 0;
if ($count_messages > 0) {
$nb_loop = ceil($count_messages / $step);
}
for ($i = 0; $i < $nb_loop; $i++) {
$sql = 'SELECT id_customer_message, message FROM `' . _DB_PREFIX_ . 'customer_message` WHERE message REGEXP \'' . pSQL($pattern, true) . '\' LIMIT ' . (int) $start . ', ' . (int) $step;
$start = intval(($i + 1) * $step);
if ($messages = Db::getInstance()->query($sql)) {
while ($message = Db::getInstance()->nextRow($messages)) {
if (is_array($message)) {
Db::getInstance()->execute('
UPDATE `' . _DB_PREFIX_ . 'customer_message`
SET message = \'' . pSQL(preg_replace('/' . $pattern . '/', '', Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message'])))) . '\'
WHERE id_customer_message = ' . (int) $message['id_customer_message']);
}
}
}
}
}
示例9: update_order_messages
function update_order_messages()
{
$step = 3000;
$count_messages = Db::getInstance()->getValue('SELECT count(id_message) FROM ' . _DB_PREFIX_ . 'message');
$nb_loop = $start = 0;
if ($count_messages > 0) {
$nb_loop = ceil($count_messages / $step);
}
for ($i = 0; $i < $nb_loop; $i++) {
$sql = 'SELECT id_message, message FROM ' . _DB_PREFIX_ . 'message LIMIT ' . (int) $start . ', ' . (int) $step;
if ($messages = Db::getInstance()->executeS($sql)) {
if (is_array($messages)) {
foreach ($messages as $message) {
$sql = 'UPDATE ' . _DB_PREFIX_ . 'message SET message = \'' . pSQL(Tools::htmlentitiesDecodeUTF8(br2nl($message['message']))) . '\'
WHERE id_message = ' . (int) $message['id_message'];
$result = Db::getInstance()->execute($sql);
}
}
$start += $step + 1;
}
}
$count_messages = Db::getInstance()->getValue('SELECT count(id_customer_message) FROM ' . _DB_PREFIX_ . 'customer_message');
$nb_loop = $start = 0;
if ($count_messages > 0) {
$nb_loop = ceil($count_messages / $step);
}
for ($i = 0; $i < $nb_loop; $i++) {
$sql = 'SELECT id_customer_message, message FROM ' . _DB_PREFIX_ . 'customer_message LIMIT ' . (int) $start . ', ' . (int) $step;
if ($messages = Db::getInstance()->executeS($sql)) {
if (is_array($messages)) {
foreach ($messages as $message) {
$sql = 'UPDATE ' . _DB_PREFIX_ . 'customer_message SET message = \'' . pSQL(Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message']))) . '\'
WHERE id_customer_message = ' . (int) $message['id_customer_message'];
Db::getInstance()->execute($sql);
}
}
$start += $step + 1;
}
}
}
示例10: upgrade_module_2_0
function upgrade_module_2_0($object)
{
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
$items = $db->executeS("Select * From " . _DB_PREFIX_ . "megamenus_group_lang");
if ($items) {
foreach ($items as $item) {
$description = @Tools::htmlentitiesDecodeUTF8($item['description']);
if (isset($description) && $description) {
$db->update('megamenus_group_lang', array('description' => $db->escape($description, true)), "`group_id`='" . $item['group_id'] . "' AND `id_lang`='" . $item['id_lang'] . "'");
}
}
}
$items = $db->executeS("Select * From " . _DB_PREFIX_ . "megamenus_menuitem_lang");
if ($items) {
foreach ($items as $item) {
$html = @Tools::htmlentitiesDecodeUTF8($item['html']);
if (isset($html) && $html) {
$db->update('megamenus_menuitem_lang', array('html' => $db->escape($html, true)), "`menuitem_id`='" . $item['menuitem_id'] . "' AND `id_lang`='" . $item['id_lang'] . "'");
}
}
}
return true;
}
示例11: upgrade_module_2_0
function upgrade_module_2_0($object)
{
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
//Db::getInstance()->escape($string)
$items = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS("Select * From " . _DB_PREFIX_ . "simplecategory_module_lang");
if ($items) {
foreach ($items as $item) {
$description = @Tools::htmlentitiesDecodeUTF8($item['description']);
if (isset($description) && $description) {
Db::getInstance()->update('simplecategory_module_lang', array('description' => $db->escape($description, true)), "`module_id`='" . $item['module_id'] . "' AND `id_lang`='" . $item['id_lang'] . "'");
}
}
}
$items = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS("Select * From " . _DB_PREFIX_ . "simplecategory_group_lang");
if ($items) {
foreach ($items as $item) {
$description = @Tools::htmlentitiesDecodeUTF8($item['description']);
if (isset($description) && $description) {
Db::getInstance()->update('simplecategory_group_lang', array('description' => $db->escape($description, true)), "`group_id`='" . $item['group_id'] . "' AND `id_lang`='" . $item['id_lang'] . "'");
}
}
}
return true;
}
示例12: renderList
public function renderList()
{
$output = '';
if ($this->session_api->connectFromCredentials('email')) {
Tools::clearCache($this->context->smarty);
$response_array = array();
$parameters = array('account_id' => $this->session_api->account_id, 'max_lines' => 20, 'campaign_id' => (int) Tools::getValue('campaign_id'));
if ($this->session_api->call('email', 'campaign', 'enum_last_sent', $parameters, $response_array)) {
if (is_array($response_array) && count($response_array)) {
// On retrouve tous les jours d'envoi (envois fractionnés sur plusieurs jours)
// ---------------------------------------------------------------------------
$tools = new EMTools();
$days = array();
foreach ($response_array as $day) {
$days[] = array('day_api' => $day['stat_date'], 'day_lang' => $tools->getLocalizableDate($day['stat_date']));
}
$this->context->smarty->assign(array('days' => $days, 'current_index' => AdminController::$currentIndex . '&campaign_id=' . $response_array[0]['campaign_id'], 'campaign_id' => $response_array[0]['campaign_id'], 'campaign_name' => Tools::htmlentitiesDecodeUTF8($response_array[0]['name'])));
// S'il y a un stat_date, il faut ré-intéroger l'API pour obtenir les stats du jour sélectionné
// --------------------------------------------------------------------------------------------
if (Tools::getValue('stat_date')) {
$stat_array = array();
$parameters = array('account_id' => $this->session_api->account_id, 'campaign_id' => (int) Tools::getValue('campaign_id'), 'stat_date' => (int) Tools::getValue('stat_date'));
if ($this->session_api->call('email', 'campaign', 'get_statistics', $parameters, $stat_array)) {
$response_array = array($stat_array);
}
// Pour rester compatible avec le code ci-dessous
}
// S'il n'y a pas de stat_date, l'API nous retourne directement les stats du dernier envoi
// ---------------------------------------------------------------------------------------
$this->context->smarty->assign(array('select_day' => $response_array[0]['stat_date'], 'sent' => $response_array[0]['sent'], 'not_sent' => $response_array[0]['not_sent'], 'delivered' => $response_array[0]['delivered'], 'not_delivered' => $response_array[0]['not_delivered'], 'opened' => $response_array[0]['opened'], 'not_opened' => $response_array[0]['not_opened'], 'unique_clickers' => $response_array[0]['unique_clickers'], 'all_clicks' => $response_array[0]['all_clicks'], 'unsubscribes' => $response_array[0]['unsubscribes'], 'abuses' => $response_array[0]['abuses'], 'ratio_sent' => $response_array[0]['ratio_sent'], 'ratio_not_sent' => $response_array[0]['ratio_not_sent'], 'ratio_delivered' => $response_array[0]['ratio_delivered'], 'ratio_not_delivered' => $response_array[0]['ratio_not_delivered'], 'ratio_opened' => $response_array[0]['ratio_opened'], 'ratio_not_opened' => $response_array[0]['ratio_not_opened'], 'ratio_unique_clickers' => $response_array[0]['ratio_unique_clickers'], 'ratio_unsubscribes' => $response_array[0]['ratio_unsubscribes'], 'ratio_abuses' => $response_array[0]['ratio_abuses']));
// On affiche le tableau des stats
// -------------------------------
$diplay = $this->getTemplatePath() . 'marketinge_stats/marketinge_stats.tpl';
$output = $this->context->smarty->fetch($diplay);
// On charge les données du graphique des "opened"
// -----------------------------------------------
$delivered = array();
/* ne pas utiliser le nom response_array SVP */
$parameters = array('account_id' => $this->session_api->account_id, 'campaign_id' => $response_array[0]['campaign_id'], 'stat_date' => $response_array[0]['stat_date']);
$this->session_api->call('email', 'campaign', 'get_graph_delivered_per_hour', $parameters, $delivered);
$this->context->smarty->assign('delivered', $delivered);
$graph = $this->getTemplatePath() . 'marketinge_stats/marketinge_graph.tpl';
$output .= $this->context->smarty->fetch($graph);
} else {
// On affiche une liste vide
// -------------------------
$helper = new HelperList();
$helper->no_link = true;
$helper->shopLinkType = '';
$helper->simple_header = false;
// Mettre 'search' => false dans chaque fields_list
$helper->table = $this->table;
$helper->identifier = 'campaign_id';
$helper->show_toolbar = true;
$helper->toolbar_scroll = false;
$helper->token = Tools::getAdminTokenLite('AdminMarketingEStats');
$helper->currentIndex = $this->context->link->getAdminLink('AdminMarketingEStats', false);
$helper->allow_export = false;
$helper->title = '<i class="icon-bar-chart"></i> ' . $this->module->l('Broadcast evolution during last 24/48 hours', 'adminmarketingestats');
$helper->toolbar_btn = array('back' => array('href' => 'index.php?controller=AdminMarketingEList&token=' . Tools::getAdminTokenLite('AdminMarketingEList'), 'desc' => $this->module->l('Back to list', 'adminmarketingestats')));
$helper->actions = array('details');
$this->fields_list = array();
$output .= $helper->generateList($this->fields_list, $this->fields_list);
}
}
}
$footer = $this->getTemplatePath() . 'footer.tpl';
$output .= $this->context->smarty->fetch($footer);
return $output;
}
示例13: processExport
public function processExport($text_delimiter = '"')
{
// clean buffer
if (ob_get_level() && ob_get_length() > 0) {
ob_clean();
}
$this->getList($this->context->language->id, null, null, 0, false);
if (!count($this->_list)) {
return;
}
header('Content-type: text/csv');
header('Content-Type: application/force-download; charset=UTF-8');
header('Cache-Control: no-store, no-cache');
header('Content-disposition: attachment; filename="' . $this->table . '_' . date('Y-m-d_His') . '.csv"');
$headers = array();
foreach ($this->fields_list as $key => $datas) {
if ($datas['title'] == 'PDF') {
unset($this->fields_list[$key]);
} else {
$headers[] = Tools::htmlentitiesDecodeUTF8($datas['title']);
}
}
$content = array();
foreach ($this->_list as $i => $row) {
$content[$i] = array();
$path_to_image = false;
foreach ($this->fields_list as $key => $params) {
$field_value = isset($row[$key]) ? Tools::htmlentitiesDecodeUTF8(Tools::nl2br($row[$key])) : '';
if ($key == 'image') {
if ($params['image'] != 'p' || Configuration::get('PS_LEGACY_IMAGES')) {
$path_to_image = Tools::getShopDomain(true) . _PS_IMG_ . $params['image'] . '/' . $row['id_' . $this->table] . (isset($row['id_image']) ? '-' . (int) $row['id_image'] : '') . '.' . $this->imageType;
} else {
$path_to_image = Tools::getShopDomain(true) . _PS_IMG_ . $params['image'] . '/' . Image::getImgFolderStatic($row['id_image']) . (int) $row['id_image'] . '.' . $this->imageType;
}
if ($path_to_image) {
$field_value = $path_to_image;
}
}
if (isset($params['callback'])) {
$callback_obj = isset($params['callback_object']) ? $params['callback_object'] : $this->context->controller;
if (!preg_match('/<([a-z]+)([^<]+)*(?:>(.*)<\\/\\1>|\\s+\\/>)/ism', call_user_func_array(array($callback_obj, $params['callback']), array($field_value, $row)))) {
$field_value = call_user_func_array(array($callback_obj, $params['callback']), array($field_value, $row));
}
}
$content[$i][] = $field_value;
}
}
$this->context->smarty->assign(array('export_precontent' => "", 'export_headers' => $headers, 'export_content' => $content, 'text_delimiter' => $text_delimiter));
$this->layout = 'layout-export.tpl';
}
示例14: ajaxProcessUpdateCustomerNote
/**
* Uodate the customer note
*
* @return void
*/
public function ajaxProcessUpdateCustomerNote()
{
if ($this->tabAccess['edit'] === '1') {
$note = Tools::htmlentitiesDecodeUTF8(Tools::getValue('note'));
$customer = new Customer((int) Tools::getValue('id_customer'));
if (!Validate::isLoadedObject($customer)) {
die('error:update');
}
if (!empty($note) && !Validate::isCleanHtml($note)) {
die('error:validation');
}
$customer->note = $note;
if (!$customer->update()) {
die('error:update');
}
die('ok');
}
}
示例15: __construct
public function __construct()
{
// need to set this in constructor to allow translation
TSBuyerProtection::$payments_type = array('DIRECT_DEBIT' => $this->l('Direct debit'), 'CREDIT_CARD' => $this->l('Credit Card'), 'INVOICE' => $this->l('Invoice'), 'CASH_ON_DELIVERY' => $this->l('Cash on delivery'), 'PREPAYMENT' => $this->l('Prepayment'), 'CHEQUE' => $this->l('Cheque'), 'PAYBOX' => $this->l('Paybox'), 'PAYPAL' => $this->l('PayPal'), 'CASH_ON_PICKUP' => $this->l('Cash on pickup'), 'FINANCING' => $this->l('Financing'), 'LEASING' => $this->l('Leasing'), 'T_PAY' => $this->l('T-Pay'), 'CLICKANDBUY' => $this->l('Click&Buy'), 'GIROPAY' => $this->l('Giropay'), 'GOOGLE_CHECKOUT' => $this->l('Google Checkout'), 'SHOP_CARD' => $this->l('Online shop payment card'), 'DIRECT_E_BANKING' => $this->l('DIRECTebanking.com'), 'MONEYBOOKERS' => $this->l('moneybookers.com'), 'OTHER' => $this->l('Other method of payment'));
$this->tab_name = $this->l('Trusted Shops quality seal and buyer protection');
$this->site_url = Tools::htmlentitiesutf8('http://' . $_SERVER['HTTP_HOST'] . __PS_BASE_URI__);
TSBPException::setTranslationObject($this);
if (!method_exists('Tools', 'jsonDecode') || !method_exists('Tools', 'jsonEncode')) {
$this->warnings[] = $this->l('Json functions must be implemented in your php version');
} else {
foreach ($this->available_languages as $iso => $lang) {
if ($lang === '') {
$this->available_languages[$iso] = Language::getLanguage(Language::getIdByIso($iso));
}
TSBuyerProtection::$CERTIFICATE[strtoupper($iso)] = (array) Tools::jsonDecode(Tools::htmlentitiesDecodeUTF8(Configuration::get(TSBuyerProtection::PREFIX_TABLE . 'CERTIFICATE_' . strtoupper($iso))));
}
if (TSBuyerProtection::$SHOPSW === NULL) {
TSBuyerProtection::$SHOPSW = Configuration::get(TSBuyerProtection::PREFIX_TABLE . 'SHOPSW');
TSBuyerProtection::$ET_CID = Configuration::get(TSBuyerProtection::PREFIX_TABLE . 'ET_CID');
TSBuyerProtection::$ET_LID = Configuration::get(TSBuyerProtection::PREFIX_TABLE . 'ET_LID');
TSBuyerProtection::$DEFAULT_LANG = (int) Configuration::get('PS_LANG_DEFAULT');
TSBuyerProtection::$CAT_ID = (int) Configuration::get(TSBuyerProtection::PREFIX_TABLE . 'CAT_ID');
TSBuyerProtection::$ENV_API = Configuration::get(TSBuyerProtection::PREFIX_TABLE . 'ENV_API');
}
}
}