Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.8.2
- * @ Author : DeZender
- * @ Release on : 02.01.2019
- * @ Official site : http://DeZender.Net
- *
- */
- class ModelExtensionDreamFilter extends Model
- {
- protected $BZ6EYhQ = ['image', 'multiimage'];
- protected $b4tg2Xy = true;
- protected $IrM5eVP = ['type_single', 'radio', 'checkbox', 'image', 'multiimage'];
- protected $J6RGrsg = 'rdrf';
- private $XFstckl = [];
- private $u9trKh7 = [];
- private $FMttLWD = [];
- public $cacheDuration;
- public $view;
- public $settings;
- public $notavailable;
- public $module_id = '';
- public $cachePath;
- public $cacheFileSuffix = '.bin';
- public $sortTypes = ['p.date_added', 'p.date_available', 'p.date_modified', 'p.height', 'p.image', 'p.length', 'p.location', 'p.manufacturer_id', 'p.minimum', 'p.model', 'p.points', 'p.price', 'p.product_id', 'p.quantity', 'p.shipping', 'p.sort_order', 'p.stock_status_id', 'p.subtract', 'p.status', 'p.tax_class_id', 'p.viewed', 'p.weight', 'p.width', 'pd.description', 'pd.name', 'pd.tag', 'discount', 'rating', 'special'];
- private $Uz2s9iU = [
- 'name' => ['name' => 'name', 'code' => 'name', 'key' => 'filter_name'],
- 'price' => [
- 'name' => 'price',
- 'code' => 'price',
- 'key' => 'filter_price',
- 'keys' => ['filter_price_min', 'filter_price_max']
- ],
- 'stock' => ['name' => 'stock', 'code' => 'stock', 'key' => 'filter_stock'],
- 'novelty' => ['name' => 'novelty', 'code' => 'new', 'key' => 'filter_new'],
- 'special' => ['name' => 'special', 'code' => 'spc', 'key' => 'filter_special'],
- 'length' => ['name' => 'length', 'code' => 'lgth', 'key' => 'filter_length'],
- 'width' => ['name' => 'width', 'code' => 'wdth', 'key' => 'filter_width', 'md5' => true],
- 'height' => ['name' => 'height', 'code' => 'hght', 'key' => 'filter_height'],
- 'weight' => ['name' => 'weight', 'code' => 'wght', 'key' => 'filter_weight'],
- 'rating' => ['name' => 'rating', 'code' => 'rtng', 'key' => 'filter_rating'],
- 'tags' => ['name' => 'tags', 'code' => 'tag', 'key' => 'filter_tag', 'md5' => true],
- 'model' => ['name' => 'model', 'code' => 'model', 'key' => 'filter_model', 'md5' => true],
- 'manufacturers' => [
- 'name' => 'manufacturers',
- 'code' => 'man',
- 'key' => 'filter_manufacturer_id',
- 'sort_keys' => ['count', 'name', 'sort']
- ],
- 'categories' => ['name' => 'categories', 'code' => 'ctg', 'key' => 'filter_category_id', 'sorted' => true],
- 'attributes' => ['name' => 'attributes', 'code' => 'attr', 'key' => 'filter_attributes', 'sorted' => true, 'md5' => true],
- 'options' => ['name' => 'options', 'code' => 'opt', 'key' => 'filter_options', 'sorted' => true],
- 'filters' => ['name' => 'filters', 'code' => 'fil', 'key' => 'filter_filter', 'sorted' => true]
- ];
- private $SqAXmpC = ['attr', 'opt', 'fil'];
- public function __construct($N6nNv35)
- {
- goto label33;
- label2:
- $this->cleanCache();
- rmdir($this->cachePath);
- label8:
- goto label86;
- label9:
- $this->notavailable = $this->config->get('rdrf_notavailable');
- $DhqQML_ = $this->config->get('rdrf_cachetime');
- if (!($this->config->get('rdrf_cachestatus') && $DhqQML_)) {
- goto label32;
- }
- $this->cacheDuration = $DhqQML_ * 3600;
- label32:
- goto label69;
- label33:
- parent::__construct($N6nNv35);
- if (!version_compare(phpversion(), '5.4', '<')) {
- goto label53;
- }
- $this->XFstckl[] = $this->language->get('error_php');
- label53:
- $this->cachePath = DIR_CACHE . '../rdr-cache';
- goto label9;
- label58:
- mkdir($this->cachePath, 509, true);
- label64:
- $this->cleanCache(false);
- goto label8;
- label68:
- goto label2;
- label69:
- if ($this->cacheDuration) {
- goto label79;
- }
- if (is_dir($this->cachePath)) {
- goto label68;
- }
- goto label8;
- label79:
- if (is_dir($this->cachePath)) {
- goto label64;
- }
- goto label58;
- label86:
- }
- public function __debugInfo()
- {
- return [];
- }
- public function __call($aV0yFq0, $cbVUc1W)
- {
- return $aV0yFq0;
- }
- static public function __callStatic($aV0yFq0, $cbVUc1W)
- {
- return $aV0yFq0;
- }
- private function r0qisz2($HEPS8H3 = [])
- {
- goto label198;
- label2:
- if (empty($ALHJ5aw['hght'])) {
- goto label16;
- }
- $DTtuUfA['filter_height'] = $this->KC4jeoI($ALHJ5aw['hght'])[0];
- $DTtuUfA['height_decimals'] = $this->KC4jeoI($ALHJ5aw['hght'])[1];
- label16:
- if (empty($ALHJ5aw['wght'])) {
- goto label322;
- }
- $DTtuUfA['filter_weight'] = $this->Kc4Jeoi($ALHJ5aw['wght'])[0];
- $DTtuUfA['weight_decimals'] = $this->Kc4Jeoi($ALHJ5aw['wght'])[1];
- goto label322;
- label31:
- if (strpos($HEPS8H3['filter_filter'], ',') !== false) {
- goto label44;
- }
- if ($HEPS8H3['filter_filter'] !== '') {
- goto label277;
- }
- goto label283;
- label44:
- $DTtuUfA['filter_filter'] = explode(',', $HEPS8H3['filter_filter']);
- goto label276;
- label52:
- if (!isset($ALHJ5aw['rtng'])) {
- goto label62;
- }
- $DTtuUfA['filter_rating'] = $this->dYi8ZdY($ALHJ5aw['rtng']);
- label62:
- if (!(!empty($ALHJ5aw['tag']) && empty($DTtuUfA['filter_name']) && empty($DTtuUfA['filter_tag']))) {
- goto label229;
- }
- $DTtuUfA['filter_tag'] = $this->dyI8ZdY($ALHJ5aw['tag']);
- goto label229;
- label80:
- if (!isset($ALHJ5aw['stock'])) {
- goto label90;
- }
- $DTtuUfA['filter_stock'] = $this->DYi8zDY($ALHJ5aw['stock']);
- label90:
- if (!isset($ALHJ5aw['spc'])) {
- goto label275;
- }
- if ($ALHJ5aw['spc'] == 'true') {
- goto label348;
- }
- goto label337;
- label99:
- if (!(!empty($ALHJ5aw['fil']) && empty($DTtuUfA['filter_filter']) && version_compare(VERSION, '1.5.5', '>='))) {
- goto label121;
- }
- $DTtuUfA['filter_filter'] = $this->jtB1iDD($ALHJ5aw['fil']);
- label121:
- if (empty($ALHJ5aw['attr'])) {
- goto label324;
- }
- $DTtuUfA['filter_attributes'] = $this->JtB1IDd($ALHJ5aw['attr']);
- goto label324;
- label131:
- $DTtuUfA['filter_manufacturer_id'] = $this->DYi8ZdY($ALHJ5aw['man']);
- label137:
- if (empty($ALHJ5aw['ctg'])) {
- goto label151;
- }
- $DTtuUfA[empty($DTtuUfA['filter_category_id']) ? 'filter_category_id' : 'filter_category'] = $this->Dyi8zDY($ALHJ5aw['ctg']);
- label151:
- goto label99;
- label152:
- if (!(!empty($ALHJ5aw['name']) && empty($DTtuUfA['filter_name']) && empty($DTtuUfA['filter_tag']))) {
- goto label169;
- }
- $DTtuUfA['filter_name'] = $this->T2_EfFX($ALHJ5aw['name']);
- label169:
- if (!(!empty($ALHJ5aw['price']) && (stripos($ALHJ5aw['price'], ';') !== false))) {
- goto label299;
- }
- $DTtuUfA['filter_price_min'] = explode(';', $this->t2_EffX($ALHJ5aw['price']))[0];
- $DTtuUfA['filter_price_max'] = explode(';', $this->t2_EffX($ALHJ5aw['price']))[1];
- goto label299;
- label198:
- $DTtuUfA = [];
- $vqdyA5w = ['filter_category_id', 'filter_sub_category', 'filter_manufacturer_id', 'filter_name', 'filter_tag', 'filter_description', 'filter_free_ship', 'filter_video', 'filter_tag_id', 'special', 'sort', 'order', 'start', 'limit'];
- foreach ($vqdyA5w as $tjZgiGl) {
- if (!(isset($HEPS8H3[$tjZgiGl]) && ($HEPS8H3[$tjZgiGl] !== ''))) {
- goto label214;
- }
- $DTtuUfA[$tjZgiGl] = $HEPS8H3[$tjZgiGl];
- label214:
- }
- if (!(isset($HEPS8H3['filter_filter']) && version_compare(VERSION, '1.5.5', '>='))) {
- goto label283;
- }
- goto label31;
- label229:
- if (empty($ALHJ5aw['model'])) {
- goto label290;
- }
- if (is_array($ALHJ5aw['model'])) {
- goto label284;
- }
- $DTtuUfA['filter_model'] = $this->dYi8zDY($ALHJ5aw['model']);
- goto label290;
- goto label284;
- label246:
- $DTtuUfA['filter_length'] = $this->kC4JEoI($ALHJ5aw['lgth'])[0];
- $DTtuUfA['length_decimals'] = $this->kC4JEoI($ALHJ5aw['lgth'])[1];
- label257:
- if (empty($ALHJ5aw['wdth'])) {
- goto label271;
- }
- $DTtuUfA['filter_width'] = $this->KC4jeoI($ALHJ5aw['wdth'])[0];
- $DTtuUfA['width_decimals'] = $this->KC4jeoI($ALHJ5aw['wdth'])[1];
- label271:
- goto label2;
- label272:
- goto label275;
- label273:
- $DTtuUfA['filter_special'] = false;
- label275:
- goto label52;
- label276:
- goto label283;
- label277:
- $DTtuUfA['filter_filter'] = $this->T2_effx($HEPS8H3['filter_filter']);
- label283:
- goto label351;
- label284:
- $DTtuUfA['filter_model'] = $this->jTb1IDd($ALHJ5aw['model']);
- label290:
- if (!(!empty($ALHJ5aw['man']) && empty($DTtuUfA['filter_manufacturer_id']))) {
- goto label137;
- }
- goto label131;
- label299:
- if (!(isset($ALHJ5aw['new']) && is_array($ALHJ5aw['new']))) {
- goto label321;
- }
- foreach ($ALHJ5aw['new'] as $ReUzY6A => $vl5Rrhx) {
- $DTtuUfA['filter_new'][$ReUzY6A] = $this->DYi8ZdY($vl5Rrhx);
- }
- label321:
- goto label80;
- label322:
- return $DTtuUfA;
- goto label370;
- label324:
- if (empty($ALHJ5aw['opt'])) {
- goto label333;
- }
- $DTtuUfA['filter_options'] = $this->Jtb1idD($ALHJ5aw['opt']);
- label333:
- if (empty($ALHJ5aw['lgth'])) {
- goto label257;
- }
- goto label246;
- label337:
- if ($ALHJ5aw['spc'] == 'false') {
- goto label273;
- }
- $DTtuUfA['filter_special'] = $this->dyI8zDY($ALHJ5aw['spc']);
- goto label275;
- label348:
- $DTtuUfA['filter_special'] = true;
- goto label272;
- label351:
- if (empty($HEPS8H3['rdrf'])) {
- goto label322;
- }
- if (!is_string($HEPS8H3['rdrf'])) {
- goto label367;
- }
- $HEPS8H3['rdrf'] = $this->u7yaCsK($HEPS8H3['rdrf']);
- label367:
- $ALHJ5aw = $HEPS8H3['rdrf'];
- goto label152;
- label370:
- }
- private function U7yAcsk($aZ2eo9k)
- {
- $aZ2eo9k = str_replace('&', '&', $this->T2_efFX($aZ2eo9k));
- parse_str($aZ2eo9k, $HEPS8H3);
- return $HEPS8H3;
- }
- private function Dyi8zDy($HEPS8H3, $ijSY3eG = true)
- {
- goto label38;
- label3:
- if (!is_array($HEPS8H3)) {
- goto label68;
- }
- if (count($HEPS8H3) == 1) {
- goto label60;
- }
- foreach ($HEPS8H3 as $iP14tKZ => $hxChofF) {
- $HEPS8H3[$iP14tKZ] = $this->dYi8ZDy($hxChofF, false);
- }
- goto label59;
- label27:
- $HEPS8H3 = $this->T2_effx($HEPS8H3);
- goto label37;
- label32:
- $HEPS8H3 = explode(';', $HEPS8H3);
- label37:
- goto label3;
- label38:
- if (!($HEPS8H3 == '')) {
- goto label43;
- }
- return NULL;
- label43:
- if (!is_string($HEPS8H3)) {
- goto label3;
- }
- if ($ijSY3eG && (strpos($HEPS8H3, ';') !== false)) {
- goto label32;
- }
- goto label27;
- label59:
- goto label68;
- label60:
- $HEPS8H3 = $this->dYi8ZDy(current($HEPS8H3), false);
- label68:
- goto label69;
- label69:
- return $HEPS8H3;
- goto label71;
- label71:
- }
- private function JTb1IDD($HEPS8H3)
- {
- if (is_array($HEPS8H3)) {
- goto label7;
- }
- return NULL;
- label7:
- foreach ($HEPS8H3 as $iP14tKZ => $hxChofF) {
- $HEPS8H3[$iP14tKZ] = $this->DYI8Zdy($hxChofF);
- }
- return $HEPS8H3;
- }
- private function Kc4JEOI($HEPS8H3)
- {
- goto label71;
- label2:
- $HEPS8H3 = $this->t2_efFx($HEPS8H3);
- if (strpos($HEPS8H3, ';') !== false) {
- goto label84;
- }
- $NIYt9hd = substr(strrchr($HEPS8H3, '.'), 1);
- $hvAe7_v = ($NIYt9hd !== false ? strlen($NIYt9hd) : 0);
- goto label89;
- goto label84;
- label33:
- foreach ($HEPS8H3 as $iP14tKZ => $hxChofF) {
- $HEPS8H3[$iP14tKZ] = $this->t2_EFFx($hxChofF);
- $NIYt9hd = substr(strrchr($hxChofF, '.'), 1);
- $u_wBSU6 = ($NIYt9hd !== false ? strlen($NIYt9hd) : 0);
- if (!($hvAe7_v < $u_wBSU6)) {
- goto label65;
- }
- $hvAe7_v = $u_wBSU6;
- label65:
- }
- label67:
- return [$HEPS8H3, $hvAe7_v];
- goto label96;
- label71:
- if (!($HEPS8H3 == '')) {
- goto label76;
- }
- return [NULL, NULL];
- label76:
- $hvAe7_v = 0;
- if (!is_string($HEPS8H3)) {
- goto label89;
- }
- goto label2;
- label84:
- $HEPS8H3 = explode(';', $HEPS8H3);
- label89:
- if (!is_array($HEPS8H3)) {
- goto label67;
- }
- goto label33;
- label96:
- }
- public function prepareFilters($DuaUqGs, $ekdhiJj)
- {
- goto label38;
- label3:
- if (!(!empty($ekdhiJj['rdrf']) && $this->view['show_picked'])) {
- goto label18;
- }
- $HEPS8H3['picked'] = $this->gIeeBJQ($HEPS8H3['filters']);
- label18:
- $HEPS8H3['errors'] = $this->XFstckl;
- goto label80;
- label22:
- $HEPS8H3['js'] = implode("\r\n", $HEPS8H3['js']);
- $HEPS8H3['loader'] = $this->OVsfObU();
- $HEPS8H3['callback'] = $this->zDTtWtf();
- goto label3;
- label38:
- $ALHJ5aw = [];
- $icfWzZm = [];
- $HEPS8H3 = [
- 'filters' => [],
- 'filters_json' => [],
- 'js' => [],
- 'picked' => [],
- 'loader' => '',
- 'callback' => ['before' => false, 'after' => false]
- ];
- if (!($this->U4wwX0z() && isset($DuaUqGs['settings']) && isset($DuaUqGs['view']))) {
- goto label18;
- }
- $this->settings = $DuaUqGs['settings'];
- goto label56;
- label56:
- $this->view = $DuaUqGs['view'];
- $this->module_id = (isset($DuaUqGs['settings']['module_id']) ? $DuaUqGs['settings']['module_id'] : $this->module_id);
- if (empty($DuaUqGs['filters'])) {
- goto label82;
- }
- $ALHJ5aw = $DuaUqGs['filters'];
- $icfWzZm = $this->AEVvgP8($ALHJ5aw);
- goto label82;
- label80:
- return $HEPS8H3;
- goto label157;
- label82:
- $DTtuUfA = $this->r0QISZ2($ekdhiJj);
- $duBGulf = $this->MXx2X0O($ekdhiJj, $icfWzZm);
- if (!(!empty($ALHJ5aw) && is_array($ALHJ5aw))) {
- goto label22;
- }
- foreach ($ALHJ5aw as $ea2f5Hi => $UTPjlyj) {
- goto label125;
- label106:
- goto label154;
- label108:
- $HEPS8H3['js'][] = $this->wsWfqAV($hqXMZ2G);
- label114:
- if (!$yl5oK8P) {
- goto label106;
- }
- $HEPS8H3['filters_json'][$yl5oK8P['id']] = $yl5oK8P['filter'];
- goto label106;
- label125:
- $hqXMZ2G = $this->f3n3FNT($UTPjlyj, $duBGulf, $DTtuUfA);
- $yl5oK8P = $this->HOklx43($UTPjlyj, $duBGulf);
- if (!$hqXMZ2G) {
- goto label114;
- }
- $HEPS8H3['filters'][] = $hqXMZ2G;
- if (!in_array($hqXMZ2G['type'], ['slider', 'slider_entry'])) {
- goto label114;
- }
- goto label108;
- label154:
- }
- goto label22;
- label157:
- }
- private function MXX2X0O($ekdhiJj, $icfWzZm)
- {
- goto label18;
- label3:
- return $KdWw5BV;
- label4:
- $zjNpgCp = $this->yZSA_52($this->r0qiSz2($ekdhiJj), $icfWzZm);
- $LsI3Q0Z = $this->E1Oea0j($cFaH0rT);
- $yvhImhh = [];
- goto label58;
- label18:
- unset($ekdhiJj['sort']);
- unset($ekdhiJj['order']);
- unset($ekdhiJj['start']);
- unset($ekdhiJj['limit']);
- $cFaH0rT = (isset($ekdhiJj['rdrf']) ? $ekdhiJj['rdrf'] : []);
- goto label30;
- label30:
- $uyLj3n_ = $ekdhiJj;
- unset($uyLj3n_['rdrf']);
- $KdWw5BV = $this->yzSa_52($this->r0qIsZ2($uyLj3n_), $icfWzZm);
- if (empty($KdWw5BV)) {
- goto label97;
- }
- if (!(empty($cFaH0rT) || (!$this->view['count_show'] && ($this->view['disable_null'] == 'leave')))) {
- goto label4;
- }
- goto label3;
- label58:
- foreach ($KdWw5BV as $iP14tKZ => $BF7SY_j) {
- $KPHCPl0 = $this->Uz2s9iU[$iP14tKZ];
- $ur15VJj = (isset($zjNpgCp[$iP14tKZ]) ? $zjNpgCp[$iP14tKZ] : []);
- if (isset($cFaH0rT[$KPHCPl0['code']])) {
- goto label80;
- }
- $yvhImhh[$iP14tKZ] = $ur15VJj;
- goto label90;
- label80:
- $yvhImhh[$iP14tKZ] = $this->r1Pnf8R($BF7SY_j, $ur15VJj, $ekdhiJj, $icfWzZm, $KPHCPl0, $LsI3Q0Z);
- label90:
- }
- return $this->YjJj2ID($KdWw5BV, $yvhImhh);
- label97:
- return [];
- goto label99;
- label99:
- }
- private function R1pnF8r($BF7SY_j, $ur15VJj, $ekdhiJj, $icfWzZm, $KPHCPl0, $LsI3Q0Z)
- {
- if (!(in_array($KPHCPl0['code'], $this->SqAXmpC) && !empty($BF7SY_j['values']))) {
- goto label75;
- }
- $qC_oNVL = [];
- foreach ($BF7SY_j['values'] as $ea2f5Hi => $L6JI0kX) {
- goto label28;
- label26:
- goto label72;
- label28:
- if (isset($ekdhiJj['rdrf'][$KPHCPl0['code']][$ea2f5Hi])) {
- goto label48;
- }
- $qC_oNVL['values'][$ea2f5Hi] = (isset($ur15VJj['values'][$ea2f5Hi]) ? $ur15VJj['values'][$ea2f5Hi] : []);
- goto label26;
- label48:
- if ($LsI3Q0Z <= 1) {
- goto label65;
- }
- goto label54;
- label54:
- $qC_oNVL['values'][$ea2f5Hi] = $this->zx9eoVc($ekdhiJj, $icfWzZm, $KPHCPl0, $ea2f5Hi);
- goto label70;
- label65:
- $qC_oNVL['values'][$ea2f5Hi] = $BF7SY_j['values'][$ea2f5Hi];
- label70:
- goto label26;
- label72:
- }
- return $qC_oNVL;
- label75:
- if (!(1 < $LsI3Q0Z)) {
- goto label85;
- }
- $BF7SY_j = $this->zx9Eovc($ekdhiJj, $icfWzZm, $KPHCPl0);
- label85:
- return $BF7SY_j;
- }
- private function u4wwx0z()
- {
- goto label220;
- label1:
- $O2MmXW7 = (isset($wIeXMGF['serial']) ? $wIeXMGF['serial'] : NULL);
- if ($O2MmXW7) {
- goto label22;
- }
- $this->XFstckl[] = sprintf($this->language->get('error_key_notfound'), $hbOMDai);
- goto label151;
- label22:
- goto label155;
- label23:
- $WmX4Xiy = preg_replace($aFGsqlo, '\\3', $aZ2eo9k);
- $hbOMDai = '<a target="_blank" href="http://redream.ru"><b>http://redream.ru</b></a>';
- if (stripos($WmX4Xiy, preg_replace($aFGsqlo, '\\3', @$this->config->get('config_url'))) !== false) {
- goto label201;
- }
- $this->XFstckl[] = sprintf($this->language->get('error_key_wrong'), $hbOMDai);
- goto label151;
- goto label201;
- label61:
- @natsort($FC7eury);
- $z75DrIg = @current($FC7eury);
- $m_JJvlD = @implode($FC7eury);
- $fM9dGsD = @base64_decode(@implode($h2eB6Sa));
- @preg_match('/([a-zA-Z0-9\\-]{1,61}\\.?){' . $z75DrIg . '}$/i', $WmX4Xiy, $vpo9FBx);
- goto label99;
- label99:
- $mTsPc5U = $vpo9FBx[0];
- goto label102;
- label102:
- switch ($fM9dGsD) {
- case @md5(@hash('crc32b', $m_JJvlD . date('Ymd')) . $mTsPc5U):
- break;
- case @md5(@hash('crc32b', $m_JJvlD . $this->J6RGrsg) . $mTsPc5U):
- break;
- default:
- $this->XFstckl[] = sprintf($this->language->get('error_term_expired'), $hbOMDai);
- }
- label150:
- goto label151;
- label151:
- return !$this->XFstckl;
- goto label231;
- label155:
- $h2eB6Sa = @explode('-', $O2MmXW7);
- $peGgT9g = @array_shift($h2eB6Sa);
- $FC7eury = @str_split($peGgT9g);
- if (!(is_array($h2eB6Sa) && (count($h2eB6Sa) == count($FC7eury)))) {
- goto label151;
- }
- if (!@array_multisort($FC7eury, SORT_NATURAL, $h2eB6Sa)) {
- goto label150;
- }
- goto label61;
- label201:
- $wIeXMGF = @$this->config->get('rdrf_license');
- if (!($wIeXMGF == NULL)) {
- goto label219;
- }
- $wIeXMGF = @$this->config->get('redream_filter_license');
- label219:
- goto label1;
- label220:
- $this->load->language('module/dream_filter');
- $aFGsqlo = '/^(https?:\\/\\/)?(www\\.)?([a-zA-Z0-9\\-\\.]{1,61}).*?$/i';
- $oM9EH5E = $_SERVER;
- $lYPWyxE = 'HTTP_HOST';
- $aZ2eo9k = $oM9EH5E[$lYPWyxE];
- goto label23;
- label231:
- }
- private function zx9eoVC($ekdhiJj, $icfWzZm, $KPHCPl0, $ea2f5Hi = false)
- {
- goto label28;
- label5:
- unset($ekdhiJj['rdrf'][$X6aqBQp]);
- label7:
- $DETOGyl = $this->PrXymOr($icfWzZm, [$aV0yFq0], $ea2f5Hi ? [$ea2f5Hi] : []);
- $saZaQdk = $this->yzsa_52($this->R0QiSZ2($ekdhiJj), $DETOGyl);
- goto label50;
- label28:
- $X6aqBQp = $KPHCPl0['code'];
- $aV0yFq0 = $KPHCPl0['name'];
- if ($ea2f5Hi === false) {
- goto label5;
- }
- unset($ekdhiJj['rdrf'][$X6aqBQp][$ea2f5Hi]);
- goto label7;
- goto label5;
- label40:
- return [];
- goto label64;
- label42:
- return $saZaQdk[$aV0yFq0];
- goto label49;
- label45:
- return $saZaQdk[$aV0yFq0]['values'][$ea2f5Hi];
- label49:
- goto label40;
- label50:
- if (!isset($saZaQdk[$aV0yFq0])) {
- goto label40;
- }
- if ($ea2f5Hi === false) {
- goto label63;
- }
- if (isset($saZaQdk[$aV0yFq0]['values'][$ea2f5Hi])) {
- goto label45;
- }
- goto label49;
- label63:
- goto label42;
- label64:
- }
- private function prxYMoR($icfWzZm, $IDlxnXB = [], $aLmadwU = [])
- {
- if (empty($IDlxnXB)) {
- goto label101;
- }
- if (empty($aLmadwU)) {
- goto label93;
- }
- $fPcygKh = [];
- foreach ($icfWzZm as $aV0yFq0 => $DETOGyl) {
- goto label15;
- label15:
- if (!(in_array($aV0yFq0, $IDlxnXB) && isset($DETOGyl['items']))) {
- goto label88;
- }
- $u33D0JZ = [];
- foreach ($aLmadwU as $Ugtg6Rb) {
- if (!(($NsgjLGc = array_search($Ugtg6Rb, $DETOGyl['items'])) !== false)) {
- goto label43;
- }
- $u33D0JZ[$NsgjLGc] = $Ugtg6Rb;
- label43:
- }
- $fPcygKh[$aV0yFq0] = $DETOGyl;
- goto label49;
- label49:
- $fPcygKh[$aV0yFq0]['items'] = array_intersect_key($fPcygKh[$aV0yFq0]['items'], $u33D0JZ);
- if (empty($fPcygKh[$aV0yFq0]['types'])) {
- goto label72;
- }
- $fPcygKh[$aV0yFq0]['types'] = array_intersect_key($fPcygKh[$aV0yFq0]['types'], $u33D0JZ);
- label72:
- if (empty($fPcygKh[$aV0yFq0]['add'])) {
- goto label88;
- }
- goto label79;
- label79:
- $fPcygKh[$aV0yFq0]['add'] = array_intersect_key($fPcygKh[$aV0yFq0]['add'], $u33D0JZ);
- label88:
- goto label90;
- label90:
- }
- return $fPcygKh;
- label93:
- return array_intersect_key($icfWzZm, array_flip($IDlxnXB));
- label101:
- return $icfWzZm;
- }
- private function yjJJ2ID($xidKN3l, $M6C6pkU)
- {
- if (!(is_array($xidKN3l) && !empty($xidKN3l))) {
- goto label225;
- }
- foreach ($xidKN3l as $iP14tKZ => $R_pHT42) {
- $qC_oNVL = (isset($M6C6pkU[$iP14tKZ]) ? $M6C6pkU[$iP14tKZ] : []);
- switch ($iP14tKZ) {
- case 'price':
- if (!(isset($qC_oNVL['price_min']) && ($R_pHT42['price_min'] < $qC_oNVL['price_min']))) {
- goto label43;
- }
- $xidKN3l[$iP14tKZ]['range_min'] = $qC_oNVL['price_min'];
- label43:
- if (!(isset($qC_oNVL['price_max']) && ($qC_oNVL['price_max'] < $R_pHT42['price_max']))) {
- goto label57;
- }
- $xidKN3l[$iP14tKZ]['range_max'] = $qC_oNVL['price_max'];
- label57:
- break;
- case 'stock':
- $xidKN3l[$iP14tKZ]['count_stock'] = (isset($qC_oNVL['count_stock']) ? $qC_oNVL['count_stock'] : 0);
- $xidKN3l[$iP14tKZ]['count_out'] = (isset($qC_oNVL['count_out']) ? $qC_oNVL['count_out'] : 0);
- break;
- case 'novelty':
- if (!(!empty($R_pHT42) && is_array($R_pHT42))) {
- goto label119;
- }
- foreach ($R_pHT42 as $dXr0A9f => $wuv_cws) {
- $xidKN3l[$iP14tKZ][$dXr0A9f]['count_new'] = (isset($qC_oNVL[$dXr0A9f]['count_new']) ? $qC_oNVL[$dXr0A9f]['count_new'] : 0);
- $xidKN3l[$iP14tKZ][$dXr0A9f]['count_old'] = (isset($qC_oNVL[$dXr0A9f]['count_old']) ? $qC_oNVL[$dXr0A9f]['count_old'] : 0);
- }
- label119:
- break;
- default:
- if (!(!empty($R_pHT42['values']) && is_array($R_pHT42['values']))) {
- break;
- }
- foreach ($R_pHT42['values'] as $L6JI0kX => $wuv_cws) {
- goto label191;
- label140:
- $xidKN3l[$iP14tKZ]['values'][$L6JI0kX]['count'] = (isset($qC_oNVL['values'][$L6JI0kX]['count']) ? $qC_oNVL['values'][$L6JI0kX]['count'] : 0);
- goto label188;
- label158:
- foreach ($wuv_cws['values'] as $ea2f5Hi => $hxChofF) {
- $xidKN3l[$iP14tKZ]['values'][$L6JI0kX]['values'][$ea2f5Hi]['count'] = (isset($qC_oNVL['values'][$L6JI0kX]['values'][$ea2f5Hi]['count']) ? $qC_oNVL['values'][$L6JI0kX]['values'][$ea2f5Hi]['count'] : 0);
- }
- goto label188;
- label188:
- goto label221;
- label191:
- if (is_array($wuv_cws)) {
- goto label213;
- }
- $xidKN3l[$iP14tKZ]['values'][$L6JI0kX] = (isset($qC_oNVL['values'][$L6JI0kX]) ? $qC_oNVL['values'][$L6JI0kX] : 0);
- goto label188;
- label213:
- if (isset($wuv_cws['values'])) {
- goto label158;
- }
- goto label140;
- label221:
- }
- }
- }
- label225:
- return $xidKN3l;
- }
- private function yzsA_52($ekdhiJj, $icfWzZm = [])
- {
- $EL0z9f1 = (isset($this->session->data['currency']) ? $this->session->data['currency'] : '');
- $NsgjLGc = [0 => 'counters', 'currency' => $EL0z9f1, 'request' => $ekdhiJj, 'properties' => $icfWzZm];
- return $this->c9Sqkvk($NsgjLGc, function() use($ekdhiJj, $icfWzZm, $EL0z9f1) {
- $lMby2Cl = (isset($ekdhiJj['filter_category_id']) ? $ekdhiJj['filter_category_id'] : 0);
- $DJPYLAW = [];
- $duBGulf = [];
- $X2Z7TEn = $this->DWGNRTv($ekdhiJj, $icfWzZm);
- if (!$X2Z7TEn) {
- goto label943;
- }
- foreach ($X2Z7TEn as $cSW2ir1) {
- goto label614;
- label24:
- $hvAe7_v = (isset($fX4I8tY['decimal_place']) && (0 <= $fX4I8tY['decimal_place']) ? (int) $fX4I8tY['decimal_place'] : $hvAe7_v);
- label36:
- $NFsAMsb = number_format($this->LCiG2On($cSW2ir1['width'], $cSW2ir1['length_class_id']), $hvAe7_v, '.', '');
- if (isset($duBGulf['width']['values'][$NFsAMsb])) {
- goto label476;
- }
- $duBGulf['width']['values'][$NFsAMsb] = 0;
- goto label476;
- label61:
- $duBGulf['manufacturers']['values'][$cSW2ir1['manufacturer_id']] = ['name' => $cSW2ir1['manufacturer'], 'image' => isset($cSW2ir1['manufacturer_image']) ? $this->model_tool_image->resize($cSW2ir1['manufacturer_image'], $this->view['image_width'], $this->view['image_height']) : NULL, 'sort' => $cSW2ir1['manufacturer_sort'], 'count' => 0];
- label88:
- $duBGulf['manufacturers']['values'][$cSW2ir1['manufacturer_id']]['count']++;
- label95:
- goto label753;
- label97:
- $hvAe7_v = 2;
- if (!isset($icfWzZm['length']['add'])) {
- goto label122;
- }
- $fX4I8tY = end($icfWzZm['length']['add']);
- $hvAe7_v = (isset($fX4I8tY['decimal_place']) && (0 <= $fX4I8tY['decimal_place']) ? (int) $fX4I8tY['decimal_place'] : $hvAe7_v);
- label122:
- goto label273;
- label124:
- if (!(isset($icfWzZm['model']) && !empty($cSW2ir1['model']))) {
- goto label374;
- }
- $cS746KR = trim($cSW2ir1['model']);
- if (isset($duBGulf['model']['values'][$cS746KR])) {
- goto label369;
- }
- $duBGulf['model']['values'][$cS746KR] = 0;
- goto label369;
- label150:
- if (!isset($icfWzZm['rating'])) {
- goto label743;
- }
- $yo_V4rL = ($cSW2ir1['rating'] ? (int) $cSW2ir1['rating'] : 0);
- if (isset($duBGulf['rating']['values'][$yo_V4rL])) {
- goto label738;
- }
- goto label734;
- label171:
- if (!(double) $cSW2ir1['special']) {
- goto label150;
- }
- $p1tS0MC = $this->tax->calculate($cSW2ir1['special'], $cSW2ir1['tax_class_id'], $this->config->get('config_tax'));
- $Bz_JQ0d = $this->tax->calculate($cSW2ir1['discount'] ? $cSW2ir1['discount'] : $cSW2ir1['price'], $cSW2ir1['tax_class_id'], $this->config->get('config_tax'));
- $lqLpeRy = ceil(($Bz_JQ0d - $p1tS0MC) / $Bz_JQ0d / 100);
- if (!(0 < $lqLpeRy)) {
- goto label507;
- }
- goto label492;
- label223:
- $duBGulf['weight']['values'][$G7bavOE]++;
- label228:
- if (!(isset($icfWzZm['tags']) && !empty($cSW2ir1['tag']))) {
- goto label124;
- }
- foreach (explode(',', $cSW2ir1['tag']) as $LFDZxoZ) {
- $yhDsuqK = trim($LFDZxoZ);
- if (empty($yhDsuqK)) {
- goto label269;
- }
- if (isset($duBGulf['tags']['values'][$yhDsuqK])) {
- goto label264;
- }
- $duBGulf['tags']['values'][$yhDsuqK] = 0;
- label264:
- $duBGulf['tags']['values'][$yhDsuqK]++;
- label269:
- }
- goto label124;
- label273:
- $Ka3Fj7I = number_format($this->lCiG2On($cSW2ir1['length'], $cSW2ir1['length_class_id']), $hvAe7_v, '.', '');
- if (isset($duBGulf['length']['values'][$Ka3Fj7I])) {
- goto label296;
- }
- $duBGulf['length']['values'][$Ka3Fj7I] = 0;
- label296:
- $duBGulf['length']['values'][$Ka3Fj7I]++;
- goto label509;
- label303:
- if (!(isset($icfWzZm['stock']) && isset($cSW2ir1['quantity']))) {
- goto label600;
- }
- if (!(!isset($duBGulf['stock']['count_stock']) || !isset($duBGulf['stock']['count_out']))) {
- goto label588;
- }
- $duBGulf['stock']['count_stock'] = 0;
- $duBGulf['stock']['count_out'] = 0;
- goto label588;
- label331:
- if (!(isset($icfWzZm['weight']) && isset($cSW2ir1['weight']) && isset($cSW2ir1['weight_class_id']))) {
- goto label228;
- }
- $hvAe7_v = 2;
- if (!isset($icfWzZm['weight']['add'])) {
- goto label647;
- }
- $fX4I8tY = end($icfWzZm['weight']['add']);
- $hvAe7_v = (isset($fX4I8tY['decimal_place']) && (0 <= $fX4I8tY['decimal_place']) ? (int) $fX4I8tY['decimal_place'] : $hvAe7_v);
- goto label647;
- label369:
- $duBGulf['model']['values'][$cS746KR]++;
- label374:
- if (!(isset($icfWzZm['manufacturers']) && isset($cSW2ir1['manufacturer_id']) && !empty($cSW2ir1['manufacturer']))) {
- goto label95;
- }
- if (isset($duBGulf['manufacturers']['values'][$cSW2ir1['manufacturer_id']])) {
- goto label88;
- }
- goto label61;
- label395:
- $KZdm5Pd = strtotime($cSW2ir1['date_added']);
- foreach ($icfWzZm['novelty']['add'] as $ea2f5Hi => $d7c8h9i) {
- $NsgjLGc = $d7c8h9i['days_new'];
- if (!(0 < $NsgjLGc)) {
- goto label458;
- }
- if (!(!isset($duBGulf['novelty'][$NsgjLGc]['count_new']) || !isset($duBGulf['novelty'][$NsgjLGc]['count_old']))) {
- goto label436;
- }
- $duBGulf['novelty'][$NsgjLGc]['count_new'] = 0;
- $duBGulf['novelty'][$NsgjLGc]['count_old'] = 0;
- label436:
- $duBGulf['novelty'][$NsgjLGc]['count_new'] += (int) strtotime('-' . $NsgjLGc . ' days') <= $KZdm5Pd;
- $duBGulf['novelty'][$NsgjLGc]['count_old'] += (int) $KZdm5Pd < strtotime('-' . $NsgjLGc . ' days');
- label458:
- }
- label460:
- if (!(isset($icfWzZm['special']) && isset($cSW2ir1['special']) && isset($cSW2ir1['tax_class_id']) && isset($cSW2ir1['price']))) {
- goto label150;
- }
- goto label171;
- label476:
- $duBGulf['width']['values'][$NFsAMsb]++;
- label481:
- if (!(isset($icfWzZm['height']) && isset($cSW2ir1['height']))) {
- goto label547;
- }
- $hvAe7_v = 2;
- goto label549;
- label492:
- if (isset($duBGulf['special']['values'][$lqLpeRy])) {
- goto label502;
- }
- $duBGulf['special']['values'][$lqLpeRy] = 0;
- label502:
- $duBGulf['special']['values'][$lqLpeRy]++;
- label507:
- goto label150;
- label509:
- if (!(isset($icfWzZm['width']) && isset($cSW2ir1['width']))) {
- goto label481;
- }
- $hvAe7_v = 2;
- if (!isset($icfWzZm['width']['add'])) {
- goto label36;
- }
- $fX4I8tY = end($icfWzZm['width']['add']);
- goto label24;
- label532:
- if (isset($duBGulf['height']['values'][$fLlDear])) {
- goto label542;
- }
- $duBGulf['height']['values'][$fLlDear] = 0;
- label542:
- $duBGulf['height']['values'][$fLlDear]++;
- label547:
- goto label331;
- label549:
- if (!isset($icfWzZm['height']['add'])) {
- goto label573;
- }
- $fX4I8tY = end($icfWzZm['height']['add']);
- $hvAe7_v = (isset($fX4I8tY['decimal_place']) && (0 <= $fX4I8tY['decimal_place']) ? (int) $fX4I8tY['decimal_place'] : $hvAe7_v);
- label573:
- $fLlDear = number_format($this->lciG2on($cSW2ir1['height'], $cSW2ir1['length_class_id']), $hvAe7_v, '.', '');
- goto label532;
- label588:
- $duBGulf['stock']['count_stock'] += (int) 1 <= $cSW2ir1['quantity'];
- $duBGulf['stock']['count_out'] += (int) $cSW2ir1['quantity'] < 1;
- label600:
- if (!(isset($icfWzZm['novelty']) && isset($icfWzZm['novelty']['add']) && isset($cSW2ir1['date_added']))) {
- goto label460;
- }
- goto label395;
- label614:
- $DJPYLAW[] = $cSW2ir1['product_id'];
- if (!(isset($icfWzZm['price']) && isset($cSW2ir1['price']))) {
- goto label303;
- }
- if ((double) $cSW2ir1['special']) {
- goto label672;
- }
- $Bz_JQ0d = $this->tax->calculate($cSW2ir1['price'], $cSW2ir1['tax_class_id'], $this->config->get('config_tax'));
- goto label685;
- goto label672;
- label647:
- $G7bavOE = number_format($this->pHvh_S3($cSW2ir1['weight'], $cSW2ir1['weight_class_id']), $hvAe7_v, '.', '');
- if (isset($duBGulf['weight']['values'][$G7bavOE])) {
- goto label670;
- }
- $duBGulf['weight']['values'][$G7bavOE] = 0;
- label670:
- goto label223;
- label672:
- $Bz_JQ0d = $this->tax->calculate($cSW2ir1['special'], $cSW2ir1['tax_class_id'], $this->config->get('config_tax'));
- label685:
- $Bz_JQ0d = (double) $this->currency->format($Bz_JQ0d, $EL0z9f1, '', false);
- if (!(!isset($duBGulf['price']['price_min']) || ($Bz_JQ0d < $duBGulf['price']['price_min']))) {
- goto label714;
- }
- goto label708;
- label708:
- $duBGulf['price']['price_min'] = floor($Bz_JQ0d);
- label714:
- if (!(!isset($duBGulf['price']['price_max']) || ($duBGulf['price']['price_max'] < $Bz_JQ0d))) {
- goto label732;
- }
- $duBGulf['price']['price_max'] = ceil($Bz_JQ0d);
- label732:
- goto label303;
- label734:
- $duBGulf['rating']['values'][$yo_V4rL] = 0;
- label738:
- $duBGulf['rating']['values'][$yo_V4rL]++;
- label743:
- if (!(isset($icfWzZm['length']) && isset($cSW2ir1['length']))) {
- goto label509;
- }
- goto label97;
- label753:
- }
- if (!isset($icfWzZm['categories'])) {
- goto label816;
- }
- $Kt8u0YV = 1;
- if (!isset($icfWzZm['categories']['add'])) {
- goto label783;
- }
- $fX4I8tY = end($icfWzZm['categories']['add']);
- $Kt8u0YV = (isset($fX4I8tY['nesting']) && (0 <= $fX4I8tY['nesting']) ? (int) $fX4I8tY['nesting'] : $Kt8u0YV);
- label783:
- $MA3DJGb = ['image_width' => $this->view['image_width'], 'image_height' => $this->view['image_height'], 'nesting' => $Kt8u0YV, 'select_image' => array_intersect($this->BZ6EYhQ, $icfWzZm['categories']['types']) ? true : false];
- if (!$lMby2Cl) {
- goto label808;
- }
- $MA3DJGb['exclude_category'] = $lMby2Cl;
- label808:
- $MA3DJGb['products'] = $DJPYLAW;
- $duBGulf['categories']['values'] = $this->jf04C2x($MA3DJGb);
- label816:
- if (!isset($icfWzZm['options'])) {
- ........................................................................
- .............................................
- ........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement