....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 107.180.102.13  /  Your IP : 216.73.216.161
Web Server : Apache
System : Linux ip-107-180-102-13.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : nobody ( 99)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/egdeals/public_html/catalog/model/extension/module/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/egdeals/public_html/catalog/model/extension/module/isearch.php
<?php

class ModelExtensionModuleIsearch extends Model {
    protected $filter_data;
    protected $total = 0;
    protected $total_md5 = '';
    protected $module_config;
    protected $module_id;
    protected $now;

    protected $allowed_sort = array(
        'pd.name',
        'p.model',
        'p.quantity',
        'p.price',
        'rating',
        'p.number_sales',
        'p.date_added'
    );

    public function __construct($registry) {
        parent::__construct($registry);

        $this->now = time();

        $this->findEngine();
    }

    public function getTotalProducts($filter_data) {
        $this->setFilterData($filter_data);

        $this->cachedSearch();

        return $this->total;
    }

    public function saveSuggestion($keyword, $products) {
        $exists_longer = 0 < (int)$this->db->query("SELECT COUNT(*) as count FROM " . DB_PREFIX . "isearch_suggestion WHERE keyword LIKE '" . $this->db->escape($keyword) . "%' AND keyword != '" . $this->db->escape($keyword) . "'")->row['count'];

        if (!$exists_longer) {
            $this->db->query("DELETE FROM " . DB_PREFIX . "isearch_suggestion WHERE '" . $this->db->escape($keyword) . "' LIKE CONCAT(keyword, '%') AND keyword != '" . $this->db->escape($keyword) . "'");

            $this->db->query("INSERT INTO " . DB_PREFIX . "isearch_suggestion SET keyword='" . $this->db->escape($keyword) . "', products = '" . (int)$products . "' ON DUPLICATE KEY UPDATE products = '" . (int)$products . "'");
        }
    }

    public function getSuggestions($keyword) {
        $sql = "SELECT a.keyword FROM `" . DB_PREFIX . "isearch_suggestion` a WHERE a.keyword LIKE '" . $this->db->escape($keyword) . "%' AND a.keyword != '" . $this->db->escape($keyword) . "' GROUP BY a.products ORDER BY a.products ASC LIMIT 0, " . min(100, (int)abs($this->module_config->get('suggestion_limit')));

        return $this->db->query($sql)->rows;
    }

    public function getAllProducts() {
        $this->db->query("SET SESSION group_concat_max_len = 1000000;");

        //@todo - integrate AdvancedSorting options here
        $sql = "SELECT p.product_id, p.sort_order";

        $sql .= $this->selectSearchIns();

        $sql .= $this->selectLengthSorts();

        $sql .= $this->selectMatchSorts();

        $sql .= " FROM `" . DB_PREFIX . "product_to_store` p2s";

        $sql .= " LEFT JOIN " . DB_PREFIX . "product p ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = " . $this->config->get('config_store_id');

        if ($exclude_where = $this->getExcludeWheres()) {
            $sql .= " AND " . implode(" AND ", $exclude_where);
        }

        $sql .= " GROUP BY p.product_id ORDER BY p.product_id ASC LIMIT 0,10000";

        return $this->db->query($sql)->rows;
    }

    public function getProducts($filter_data) {
        $this->setFilterData($filter_data);

        $products = $this->cachedSearch();

        if ($products && isset($filter_data['filter_name'])) {
            $this->saveSuggestion($filter_data['filter_name'], $this->total);
        }

        //{HOOK_GET_PRODUCTS}

        return $products;
    }

    protected function getCache($key) {
        return $this->cache->get('product.' . $key . '.' . $this->getCacheKey());
    }

    protected function setCache($key, $data) {
        $this->cache->set('product.' . $key . '.' . $this->getCacheKey(), $data);
    }

    protected function getCacheKey() {
        $params = '';
        $params .= (int)$this->config->get('config_customer_price');
        $params .= (int)$this->getCustomerGroupId();
        $params .= (int)$this->config->get('config_language_id');
        $params .= (int)$this->config->get('config_store_id');
        $params .= serialize($this->filter_data);
        $params .= $this->session->data['currency'];

        return md5($params);
    }

    protected function getCustomerGroupId() {
        if ($this->customer->isLogged()) {
            return $this->customer->getGroupId();;
        } else {
            return $this->config->get('config_customer_group_id');
        }
    }

    protected function cachedSearch() {
        if ($total = $this->getCache('isearch.total')) {
            $this->total = $total;
        }

        if ($result = $this->getCache('isearch')) {
            return $result;
        }

        $result = $this->standardSearch();

        $this->setCache('isearch', $result);

        return $result;
    }

    protected function hasAdvancedSorting($type = null) {
        if ($this->module_config->get('sort') == 'advanced_sorting' && $this->config->has('advancedsorting')) {
            $adv_sorting = $this->config->get('advancedsorting');

            if (!empty($adv_sorting) && $adv_sorting['Enabled'] == 'yes' && $adv_sorting['SearchSortingStatus'] == 'yes') {
                if ($adv_sorting['SearchSortingOrder'] == 'RAND') {
                    if (!is_null($type)) {
                        return false;
                    } else {
                        return ' RAND()';
                    }
                } else {
                    if (!is_null($type) && $type == $adv_sorting['SearchSorting']) {
                        return true;
                    } else {
                        if ($adv_sorting['SearchSorting'] == 'p.number_sales') {
                            return ' SUM(op.`quantity`) ' . $adv_sorting['SearchSortingOrder'];
                        } else {
                            return ' ' . $adv_sorting['SearchSorting'] . ' ' . $adv_sorting['SearchSortingOrder'];
                        }
                    }
                }
            }
        }

        return false;
    }

    protected function hasDescriptionFilter() {
        return !empty($this->filter_data['filter_description']);
    }

    protected function hasKeywords() {
        return !empty($this->filter_data['filter_name']);
    }

    protected function getRuleOperator($candidate) {
        switch ($candidate) {
            case 'lt' : return '<';
            case 'gt' : return '>';
            case 'eq' : return '=';
            case 'ne' : return '!=';
        }
    }

    protected function getRuleCategoryIds($data) {
        $result = array();

        foreach ($data as $item) {
            $result[] = $item['category_id'];
        }

        return $result;
    }

    protected function getExcludeWheres() {
        $where = array();

        $not_where = array();

        if ($this->module_config->has('exclude')) {
            foreach ($this->module_config->get('exclude') as $rule) {
                switch ($rule['type']) {
                    case 'quantity' : {
                        $not_where[] = 'p.quantity ' . $this->getRuleOperator($rule['data']['operator']) . ' ' . (int)trim($rule['data']['value']);
                    } break;
                    case 'status' : {
                        $not_where[] = 'p.status = ' . (int)trim($rule['data']['value']);
                    } break;
                    case 'category_status' : {
                        $not_where[] = 'p.product_id IN (SELECT p2ct2.product_id FROM `' . DB_PREFIX . 'product_to_category` p2ct2 LEFT JOIN `' . DB_PREFIX . 'category` ct ON (ct.category_id = p2ct2.category_id) WHERE ct.status = ' . (int)trim($rule['data']['value']) . ')';
                    } break;
                    case 'category' : {
                        $category_ids = $this->getRuleCategoryIds($rule['data']);

                        if (!empty($category_ids)) {
                            $not_where[] = 'p.product_id IN (SELECT p2ct.product_id FROM `' . DB_PREFIX . 'product_to_category` p2ct WHERE p2ct.category_id IN (' . implode(',', $category_ids) . '))';
                        }
                    } break;
                    case 'product' : {
                        $product_ids = $this->getRuleProductIds($rule['data']);

                        if (!empty($product_ids)) {
                            $not_where[] = 'p.product_id IN (' . implode(',', $product_ids) . ')';
                        }
                    } break;
                    case 'stock_status' : {
                        $not_where[] = 'p.stock_status_id = ' . (int)trim($rule['data']['stock_status_id']);
                    } break;
                }
            }
        }

        if (!empty($not_where)) {
            $where[] = '!(' . implode(' OR ', $not_where) . ')';
        }

        return $where;
    }

    protected function getKeywords() {
        if ($this->module_config->get('strictness') == 'high') {
            return array($this->filter_data['filter_name']);
        } else {
            return explode(' ', $this->filter_data['filter_name']);
        }
    }

	protected function getRuleProductIds($data) {
        $result = array();

        foreach ($data as $item) {
            $result[] = $item['product_id'];
        }

        return $result;
    }

    // Produces a relation containing only product_ids meeting the search criteria, without limit and sort order
    public function filterSubquery($override_filter_data = null) {
        // Not used in the standard iSearch extension, but may be useful when called from a filter
        if (!is_null($override_filter_data)) {
            $this->setFilterData($override_filter_data);
        }

        $join = array();
        $where = $this->getExcludeWheres();

        if ($this->hasKeywords()) {
            // Searching in any field
            $keywords_where = array();

            foreach ($this->getKeywords() as $word) {
                $word_subquery = $this->wordSubquery($word);

                if (!empty($word_subquery)) {
                    $keywords_where[] = 'p.product_id IN (' . $word_subquery . ')';
                }
            }

            if (!empty($keywords_where)) {
                if ($this->module_config->get('strictness') == 'low') {
                    $where[] = '(' . implode(' OR ', $keywords_where) . ')';
                } else {
                    $where[] = '(' . implode(' AND ', $keywords_where) . ')';
                }
            }
        } else if (!empty($this->filter_data['filter_tag'])) {
            // Searching only in tags
            $this->insertJoin($join, 'description');
            $this->insertWhere($where, 'tag', $this->filter_data['filter_tag']);
        }

        $sql = "SELECT DISTINCT p.product_id FROM `" . DB_PREFIX . "product` p";

        if (!empty($join)) {
            $sql .= ' ' . implode(' ', $join);
        }

        if (!empty($where)) {
            $sql .= ' WHERE ' . implode(' AND ', $where);
        }

        $this->db->query("CREATE TEMPORARY TABLE IF NOT EXISTS " . $this->getTemporaryTableName() . " (`product_id` int(11) NOT NULL, PRIMARY KEY (`product_id`)) ENGINE=MyISAM");

        $temp_total = (int)$this->db->query("SELECT COUNT(*) as total FROM " . $this->getTemporaryTableName())->row['total'];

        if ($temp_total == 0) {
            $this->db->query("INSERT INTO " . $this->getTemporaryTableName() . " (product_id) " . $sql);
        }

        return "SELECT product_id FROM " . $this->getTemporaryTableName();
    }

    public function isSearchIn($key) {
        if (!empty($this->module_config) && $this->module_config->has('search_in')) {
            $search_in = $this->module_config->get('search_in');

            return isset($search_in[$key]);
        }

        return false;
    }

    protected function getTemporaryTableName() {
        return "`" . DB_PREFIX . "isearch_temp_" . md5($this->getCacheKey() . $this->now) . "`";
    }

    protected function selectMatchSorts() {
        if (strpos($this->module_config->get('sort'), 'match_') === FALSE) {
            return '';
        } else {
            $field = substr($this->module_config->get('sort'), 6);

            $result = '';

            $this->load->model('localisation/language');

            foreach ($this->model_localisation_language->getLanguages() as $language) {
                $result .= ', (' . $this->loadField($field)->selectSortByMatch($language['language_id']) . ') as sort_' . $language['language_id'];
            }

            return $result;
        }
    }

    protected function selectLengthSorts() {
        if (strpos($this->module_config->get('sort'), 'length_') === FALSE) {
            return '';
        } else {
            $field = substr($this->module_config->get('sort'), 7);

            $result = '';

            $this->load->model('localisation/language');

            foreach ($this->model_localisation_language->getLanguages() as $language) {
                $result .= ', IFNULL((' . $this->loadField($field)->selectSortByLength($language['language_id']) . '), 0) as sort_' . $language['language_id'];
            }

            return $result;
        }
    }

    protected function selectSearchIns() {
        $result = ', CONCAT_WS(" "';

        foreach (array_keys($this->module_config->get('search_in')) as $field) {
            $result .= ', (' . $this->loadField($field)->select($this->module_config->get('language') == 'all') . ')';
        }

        $result .= ") as search_data";

        return $result;
    }

    protected function wordSubquery($word) {
        $join = array();

        $keyword_where = array();

        //{HOOK_SUBQUERY_JOINS_AND_WHERES}

        if ($this->isSearchIn('name')) {
            $this->insertJoin($join, 'description');
            $this->insertWhere($keyword_where, 'name', $word);
        }

        if ($this->isSearchIn('model')) {
            $this->insertWhere($keyword_where, 'model', $word);
        }

        if ($this->isSearchIn('upc')) {
            $this->insertWhere($keyword_where, 'upc', $word);
        }

        if ($this->isSearchIn('sku')) {
            $this->insertWhere($keyword_where, 'sku', $word);
        }

        if ($this->isSearchIn('ean')) {
            $this->insertWhere($keyword_where, 'ean', $word);
        }

        if ($this->isSearchIn('jan')) {
            $this->insertWhere($keyword_where, 'jan', $word);
        }

        if ($this->isSearchIn('isbn')) {
            $this->insertWhere($keyword_where, 'isbn', $word);
        }

        if ($this->isSearchIn('mpn')) {
            $this->insertWhere($keyword_where, 'mpn', $word);
        }

        if ($this->isSearchIn('manufacturer')) {
            $this->insertJoin($join, 'manufacturer');
            $this->insertWhere($keyword_where, 'manufacturer', $word);
        }

        if ($this->isSearchIn('attribute')) {
            $this->insertJoin($join, 'attribute_value');
            $this->insertJoin($join, 'attribute');
            $this->insertWhere($keyword_where, 'attribute', $word);
        }

        if ($this->isSearchIn('attribute_value')) {
            $this->insertJoin($join, 'attribute_value');
            $this->insertWhere($keyword_where, 'attribute_value', $word);
        }

        if ($this->isSearchIn('attribute_group')) {
            $this->insertJoin($join, 'attribute_value');
            $this->insertJoin($join, 'attribute');
            $this->insertJoin($join, 'attribute_group');
            $this->insertWhere($keyword_where, 'attribute_group', $word);
        }

        if ($this->isSearchIn('category')) {
            $this->insertJoin($join, 'category');
            $this->insertWhere($keyword_where, 'category', $word);
        }

        if ($this->isSearchIn('filter')) {
            $this->insertJoin($join, 'filter');
            $this->insertWhere($keyword_where, 'filter', $word);
        }

        if ($this->isSearchIn('filter_group')) {
            $this->insertJoin($join, 'filter');
            $this->insertJoin($join, 'filter_group');
            $this->insertWhere($keyword_where, 'filter_group', $word);
        }

        if ($this->isSearchIn('description') || $this->hasDescriptionFilter()) {
            $this->insertJoin($join, 'description');
            $this->insertWhere($keyword_where, 'description', $word);
        }

        if ($this->isSearchIn('tag')) {
            $this->insertJoin($join, 'description');
            $this->insertWhere($keyword_where, 'tag', $word);
        }

        if ($this->isSearchIn('location')) {
            $this->insertWhere($keyword_where, 'location', $word);
        }

        if ($this->isSearchIn('option')) {
            $this->insertJoin($join, 'option');
            $this->insertWhere($keyword_where, 'option', $word);
        }

        if ($this->isSearchIn('option_value')) {
            $this->insertJoin($join, 'option');
            $this->insertJoin($join, 'option_value');
            $this->insertWhere($keyword_where, 'option_value', $word);
        }

        if ($this->isSearchIn('meta_description')) {
            $this->insertJoin($join, 'description');
            $this->insertWhere($keyword_where, 'meta_description', $word);
        }

        if ($this->isSearchIn('meta_keyword')) {
            $this->insertJoin($join, 'description');
            $this->insertWhere($keyword_where, 'meta_keyword', $word);
        }

        if ($this->isSearchIn('meta_title')) {
            $this->insertJoin($join, 'description');
            $this->insertWhere($keyword_where, 'meta_title', $word);
        }

        $sql = "SELECT DISTINCT p.product_id FROM `" . DB_PREFIX . "product` p";

        if (!empty($join)) {
            $sql .= ' ' . implode(' ', $join);
        }

        if (!empty($keyword_where)) {
            $sql .= ' WHERE ' . implode(' OR ', $keyword_where);
        }

        return $sql;
    }

    protected function standardSearch() {
        $sql = "SELECT SQL_CALC_FOUND_ROWS p.product_id";

        if ((isset($this->filter_data['sort']) && $this->filter_data['sort'] == 'rating') || $this->hasAdvancedSorting('rating')) {
            $sql .= ", (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating";
        }

        if (isset($this->filter_data['sort']) && $this->filter_data['sort'] == 'p.price') {
            $sql .= ", (SELECT price FROM " . DB_PREFIX . "product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM " . DB_PREFIX . "product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special";
        }

        if (!empty($this->filter_data['filter_category_id'])) {
            $sql .= " FROM " . DB_PREFIX . "category_path cp LEFT JOIN " . DB_PREFIX . "product_to_category p2c ON (cp.category_id = p2c.category_id)";

            if (!empty($this->filter_data['filter_filter'])) {
                $sql .= " LEFT JOIN " . DB_PREFIX . "product_filter pf ON (p2c.product_id = pf.product_id) LEFT JOIN " . DB_PREFIX . "product p ON (pf.product_id = p.product_id)";
            } else {
                $sql .= " LEFT JOIN " . DB_PREFIX . "product p ON (p2c.product_id = p.product_id)";
            }
        } else {
            $sql .= " FROM " . DB_PREFIX . "product p";
        }

        if ((isset($this->filter_data['sort']) && $this->filter_data['sort'] == 'p.number_sales') || $this->hasAdvancedSorting('p.number_sales')) {
            $sql .= " LEFT JOIN `" . DB_PREFIX . "order_product` AS `op` ON `op`.`product_id` = `p`.`product_id`";
        }

        $sql .= " LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = " . $this->config->get('config_store_id');

        if (!empty($this->filter_data['filter_category_id'])) {
            if (!empty($this->filter_data['filter_sub_category'])) {
                $sql .= " AND cp.path_id = '" . (int)$this->filter_data['filter_category_id'] . "'";
            } else {
                $sql .= " AND p2c.category_id = '" . (int)$this->filter_data['filter_category_id'] . "'";
            }

            if (!empty($this->filter_data['filter_filter'])) {
                $implode = array();

                $filters = explode(',', $this->filter_data['filter_filter']);

                foreach ($filters as $filter_id) {
                    $implode[] = (int)$filter_id;
                }

                $sql .= " AND pf.filter_id IN (" . implode(',', $implode) . ")";
            }
        }

        if ($this->hasKeywords() || !empty($this->filter_data['filter_tag'])) {
            $sql .= " AND p.product_id IN (" . $this->filterSubquery() . ")";
        }

        if (!empty($this->filter_data['filter_manufacturer_id'])) {
            $sql .= " AND p.manufacturer_id = '" . (int)$this->filter_data['filter_manufacturer_id'] . "'";
        }

        $sql .= " GROUP BY p.product_id";

        $sql .= " ORDER BY";

        if (isset($this->filter_data['sort']) && in_array($this->filter_data['sort'], $this->allowed_sort)) {
            if ($this->filter_data['sort'] == 'p.number_sales') {
                $sql .= " SUM(op.`quantity`)";
            } elseif ($this->filter_data['sort'] == 'pd.name' || $this->filter_data['sort'] == 'p.model') {
                $sql .= " LCASE(" . $this->filter_data['sort'] . ")";
            } elseif ($this->filter_data['sort'] == 'p.price') {
                $sql .= " (CASE WHEN special IS NOT NULL THEN special WHEN discount IS NOT NULL THEN discount ELSE p.price END)";
            } else {
                $sql .= " " . $this->filter_data['sort'];
            }

            if (isset($this->filter_data['order']) && ($this->filter_data['order'] == 'DESC')) {
                $sql .= " DESC";
            } else {
                $sql .= " ASC";
            }
        } else if ($this->hasKeywords()) {
            //{HOOK_ISEARCHCORP_SORTING}

            // Default sorting according to the iSearch settings
            if (strpos($this->module_config->get('sort'), 'match_') === 0) {
                // Match logic goes here
                $match_field = substr($this->module_config->get('sort'), 6);

                $sql .= $this->getSortByMatch($match_field);
            } else if (strpos($this->module_config->get('sort'), 'length_') === 0) {
                // Length logic goes here
                $length_field = substr($this->module_config->get('sort'), 7);

                $sql .= " (" . $this->loadField($length_field)->selectSortByLength($this->config->get('config_language_id')) . ") ASC";
            } else if ($this->module_config->get('sort') == 'advancedsorting' && $adv_sorting = $this->hasAdvancedSorting()) {
                $sql .= $adv_sorting;
            } else {
                $sql .= " " . $this->module_config->get('sort') . " ASC";
            }
        } else {
            // No keywords, so revert to sort_order
            $sql .= " p.sort_order ASC";
        }

        $sql .= ", p.product_id ASC";

        if (isset($this->filter_data['start']) || isset($this->filter_data['limit'])) {
            if ($this->filter_data['start'] < 0) {
                $this->filter_data['start'] = 0;
            }

            if ($this->filter_data['limit'] < 1) {
                $this->filter_data['limit'] = 20;
            }

            $sql .= " LIMIT " . (int)$this->filter_data['start'] . "," . (int)$this->filter_data['limit'];
        }

        $product_data = array();

        $query = $this->db->query($sql);

        $this->calculateTotal();

        $this->load->model('catalog/product');

        foreach ($query->rows as $result) {
            $product_data[$result['product_id']] = $this->model_catalog_product->getProduct($result['product_id']);
        }

        return $product_data;
    }

    protected function loadField($field) {
        $class = 'vendor\\isenselabs\\isearch\\field\\' . $field;

        return new $class($this->registry);
    }

    protected function insertWhere(&$where, $field, $word) {
        $where[] = $this->getWhere($field, $word);
    }

    protected function insertJoin(&$join, $field) {
        if (!array_key_exists($field, $join)) {
            $join[$field] = $this->getJoin($field);
        }
    }

    protected function getWhere($field, $word) {
        return $this->loadField($field)->where($word);
    }

    protected function getJoin($field) {
        return $this->loadField($field)->join($this->module_config->get('language') == 'all');
    }

    protected function getSortByMatch($field_name) {
        $full_phrase = implode(' ', $this->getKeywords());
        $keywords = explode(' ', $full_phrase);
        $magnitude = count($keywords);
        $field = $this->loadField($field_name);

        return " (CASE " .
            " WHEN EXISTS (". $field->matchPhraseBeginning($full_phrase) . ") THEN " . ($magnitude * 3 + 1) .
            " WHEN EXISTS (". $field->matchPhraseAnywhere($full_phrase) . ") THEN " . ($magnitude * 2 + 1) .
            " WHEN EXISTS (". $field->matchAnyKeywordBeginning($keywords) . ") THEN (" . $magnitude . " + (" . $field->matchSumKeywords($keywords) . "))" .
            " ELSE (" . $field->matchSumKeywords($keywords) . ") END) DESC";
    }

    protected function calculateTotal() {
        $total = (int)$this->db->query("SELECT FOUND_ROWS() as total")->row['total'];

        $this->setCache('isearch.total', $total);

        $this->total = $total;
    }

    protected function setFilterData($filter_data) {
        $this->setInternalEncoding("UTF-8");

        //{HOOK_SET_FILTER_DATA}

        // Keyword search improvements
        if (isset($filter_data['filter_tag'])) {
            $filter_data['filter_tag'] = $this->improveKeywords($filter_data['filter_tag']);
        }

        if (isset($filter_data['filter_name'])) {
            $filter_data['filter_name'] = $this->improveKeywords($filter_data['filter_name']);
        }

        // Sanitize filter data
        if (isset($filter_data['sort']) && !in_array($filter_data['sort'], $this->allowed_sort)) {
            unset($filter_data['sort']);
        }

        if (isset($filter_data['order']) && !in_array($filter_data['order'], array('ASC', 'DESC'))) {
            $filter_data['order'] = 'ASC';
        }

        if (isset($filter_data['filter_category_id']) && !is_numeric($filter_data['filter_category_id'])) {
            $filter_data['filter_category_id'] = 0;
        }

        if (isset($filter_data['filter_sub_category'])) {
            $filter_data['filter_sub_category'] = !empty($filter_data['filter_sub_category']);
        }

        // Set filter data
        $this->filter_data = $filter_data;
    }

    protected function convertIosSymbols($str) {
        $chr_map = array(
            // Windows codepage 1252
            "\xC2\x82" => "'", // U+0082⇒U+201A single low-9 quotation mark
            "\xC2\x84" => '"', // U+0084⇒U+201E double low-9 quotation mark
            "\xC2\x8B" => "'", // U+008B⇒U+2039 single left-pointing angle quotation mark
            "\xC2\x91" => "'", // U+0091⇒U+2018 left single quotation mark
            "\xC2\x92" => "'", // U+0092⇒U+2019 right single quotation mark
            "\xC2\x93" => '"', // U+0093⇒U+201C left double quotation mark
            "\xC2\x94" => '"', // U+0094⇒U+201D right double quotation mark
            "\xC2\x9B" => "'", // U+009B⇒U+203A single right-pointing angle quotation mark

            // Regular Unicode     // U+0022 quotation mark (")
                                   // U+0027 apostrophe     (')
            "\xC2\xAB"     => '"', // U+00AB left-pointing double angle quotation mark
            "\xC2\xBB"     => '"', // U+00BB right-pointing double angle quotation mark
            "\xE2\x80\x98" => "'", // U+2018 left single quotation mark
            "\xE2\x80\x99" => "'", // U+2019 right single quotation mark
            "\xE2\x80\x9A" => "'", // U+201A single low-9 quotation mark
            "\xE2\x80\x9B" => "'", // U+201B single high-reversed-9 quotation mark
            "\xE2\x80\x9C" => '"', // U+201C left double quotation mark
            "\xE2\x80\x9D" => '"', // U+201D right double quotation mark
            "\xE2\x80\x9E" => '"', // U+201E double low-9 quotation mark
            "\xE2\x80\x9F" => '"', // U+201F double high-reversed-9 quotation mark
            "\xE2\x80\xB9" => "'", // U+2039 single left-pointing angle quotation mark
            "\xE2\x80\xBA" => "'", // U+203A single right-pointing angle quotation mark
        );
        $chr = array_keys  ($chr_map); // but: for efficiency you should
        $rpl = array_values($chr_map); // pre-calculate these two arrays
        return str_replace($chr, $rpl, $str);
    }

    protected function improveKeywords($keywords) {
        $keywords = $this->convertIosSymbols($keywords);

        $keywords = $this->convertEncoding($keywords, "UTF-8");

        // Custom spell check
        if ($this->module_config->has('spell')) {
            foreach ($this->module_config->get('spell') as $values) {
                if (!empty($values['search'])) {
                    if ($values['search'][0] == '/') {
                        $keywords = preg_replace($values['search'], $values['replace'], $keywords);
                    } else {
                        $keywords = str_replace($values['search'], $values['replace'], $keywords);
                    }
                }
            }
        }

        // Singularize (works only when strict search is disabled)
        if ((bool)$this->module_config->get('singularization') && $this->module_config->get('strictness') != 'high') {
            $words = explode(' ', $keywords);

            foreach ($words as &$word) {
                $word = preg_replace('/(s|es)$/', '', $word);
            }

            $keywords = implode(' ', $words);
        }

        // Remove any extra white spaces
        if ($this->module_config->get('strictness') != 'high') {
            $keywords = trim(preg_replace('~\s+~', ' ', $keywords));
        }

        // Set to lowercase
        $keywords = $this->strtolower($keywords);

        return $keywords;
    }

    protected function setInternalEncoding($encoding) {
        // Set internal multibyte encoding to UTF-8
        if (function_exists('mb_internal_encoding')) {
            mb_internal_encoding($encoding);
        }
    }

    protected function convertEncoding($keywords, $encoding) {
        if (function_exists('mb_convert_encoding')) {
            $keywords = mb_convert_encoding($keywords, $encoding);
        }

        return $keywords;
    }

    public function getActiveEngines() {
        $result = array();

        foreach ($this->getModulesByCode('isearch') as $module) {
            $module_info = json_decode($module['setting'], true);

            if (empty($module_info['status'])) {
                continue;
            }

            $config = new Config();

            foreach ($module_info as $key => $value) {
                $config->set($key, $value);
            }

            $result[$module['module_id']] = $config;
        }

        return $result;
    }

    public function hasEngine() {
        return !empty($this->module_config);
    }

    public function findEngine() {
        foreach ($this->getActiveEngines() as $module_id => $config) {
            foreach ($config->get('store') as $store_id => $store_status) {
                if ($store_status && $store_id == $this->config->get('config_store_id')) {
                    $this->module_config = $config;
                    $this->module_id = $module_id;
                    return;
                }
            }
        }
    }

    public function getEngineId() {
        return $this->module_id;
    }

    public function getSetting($key) {
        if ($this->hasEngine()) {
            return $this->module_config->get($key);
        }
    }

    public function getModulesByCode($code) {
        $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "module` WHERE `code` = '" . $this->db->escape($code) . "' ORDER BY `name`");

        return $query->rows;
    }

    // Multibyte functions

    public function strtolower($string) {
        return (function_exists('mb_strtolower')) ? mb_strtolower($string) : strtolower($string);
    }

    public function strlen($string) {
        return (function_exists('mb_strlen')) ? mb_strlen($string) : strlen($string);
    }

    public function substr($string, $start) {
        $arg = func_get_args();
        if (isset($arg[2])) return (function_exists('mb_substr')) ? mb_substr($string, $start, $arg[2]) : substr($string, $start, $arg[2]);
        else return (function_exists('mb_substr')) ? mb_substr($string, $start) : substr($string, $start);
    }

    public function strstr($string, $needle) {
        $arg = func_get_args();
        if (isset($arg[2])) return (function_exists('mb_strstr')) ? mb_strstr($string, $needle, $arg[2]) : strstr($string, $needle, $arg[2]);
        else return (function_exists('mb_strstr')) ? mb_strstr($string, $needle) : strstr($string, $needle);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit