Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
/* Decoded by unphp.net */ <?php ${"GLOBALS"}["yfahhijg"]="id_tab";${"GLOBALS"}["lkpqow..
Decoded Output download
/* Decoded by unphp.net */
<?php ${"GLOBALS"}["yfahhijg"]="id_tab";${"GLOBALS"}["lkpqowclp"]="cust";${"GLOBALS"}["krpiwgmuqtmp"]="tabcust";${"GLOBALS"}["ggxfjjs"]="custid";${"GLOBALS"}["mplaryts"]="dirdest";${"GLOBALS"}["pynkpv"]="invoice_ref";${"GLOBALS"}["ggnrfh"]="message";${"GLOBALS"}["daejaicqwop"]="tracknum";${"GLOBALS"}["kxiofammg"]="carrier_id";${"GLOBALS"}["vrndtmx"]="ord";${"GLOBALS"}["njwujlwlk"]="ordid";${"GLOBALS"}["kbsxjtvhkgqq"]="orderid";${"GLOBALS"}["nuimlcihgqs"]="catid";${"GLOBALS"}["tpxbljvy"]="prodlist";${"GLOBALS"}["waenbcpxptsi"]="price";${"GLOBALS"}["ivpbgliywf"]="decli";${"GLOBALS"}["bnunepg"]="attid";${"GLOBALS"}["vntbtfv"]="errors";${"GLOBALS"}["qlbeymapdmt"]="stockliste";${"GLOBALS"}["bjumjetl"]="qty";${"GLOBALS"}["uryvolexhkx"]="optionname";${"GLOBALS"}["pquxszes"]="idoption";${"GLOBALS"}["npuioymp"]="valuename";${"GLOBALS"}["xjbfcukw"]="status";${"GLOBALS"}["emhdxrfxrjl"]="pid";${"GLOBALS"}["keecpjl"]="attributeid";${"GLOBALS"}["swdirlokxcik"]="idshop";${"GLOBALS"}["fmbtfhbk"]="prd";${"GLOBALS"}["qjnqdmb"]="dir";${"GLOBALS"}["nejpsleeyk"]="lg";${"GLOBALS"}["udnlowqv"]="content";${"GLOBALS"}["onouqhbpkct"]="args";${"GLOBALS"}["amcidfxlp"]="file";${"GLOBALS"}["ggexccgh"]="filesarray";${"GLOBALS"}["wkoscw"]="cover";${"GLOBALS"}["jezoagpo"]="id_attribute";${"GLOBALS"}["isqgxqntffc"]="id_product";${"GLOBALS"}["nxwtecpk"]="data";${"GLOBALS"}["yqqnvf"]="elt";${"GLOBALS"}["flmgiszj"]="productlist";${"GLOBALS"}["fgwxjerwgp"]="tabmod";${"GLOBALS"}["nwbjvud"]="idattribute";${"GLOBALS"}["ufuiujabn"]="idprod";${"GLOBALS"}["bogjtuyy"]="prod";${"GLOBALS"}["vbuulhqmp"]="limit";${"GLOBALS"}["txjrmdihqkh"]="custshopid";${"GLOBALS"}["egdejbyit"]="prodid";${"GLOBALS"}["ippczqriv"]="productclass";${"GLOBALS"}["honslcbg"]="result";${"GLOBALS"}["mivvzbnnkqv"]="paramsclass";${"GLOBALS"}["zbfamjc"]="config";${"GLOBALS"}["ippjbhtzk"]="sum32";${"GLOBALS"}["yujkio"]="b";${"GLOBALS"}["oelyvlt"]="sum";${"GLOBALS"}["tshyyy"]="str";${"GLOBALS"}["qfiedmgchu"]="a";${"GLOBALS"}["gpeqmhviimr"]="extrabit";${"GLOBALS"}["nxlhref"]="i";${"GLOBALS"}["frgvko"]="p1len";${"GLOBALS"}["pridwkwe"]="p1str";${"GLOBALS"}["lorcgda"]="software";${"GLOBALS"}["ekyvvucfj"]="fullcode";${"GLOBALS"}["xpdqvol"]="extendedcode";${"GLOBALS"}["sxmgyglfkd"]="initcode";${"GLOBALS"}["aguriwiw"]="initlen";${"GLOBALS"}["qkoeoqw"]="thislen";${"GLOBALS"}["ylhouspu"]="name";${"GLOBALS"}["mkwvdf"]="serial";${"GLOBALS"}["cyhrzym"]="shopid";${"GLOBALS"}["iqejdcdpnsh"]="row";${"GLOBALS"}["pxbpcdwph"]="sql";${"GLOBALS"}["rjkiynh"]="res";${"GLOBALS"}["syhopn"]="urls";${"GLOBALS"}["tjihupydl"]="protocolos";${"GLOBALS"}["fzuyffwxrj"]="url";$aotetbwllf="path";$yewphfe="path";$hnckxmmz="path";$jiuieonc="path";${$yewphfe}=dirname(__FILE__);${"GLOBALS"}["wjitymx"]="path";$vmzuhyyqqox="path";${${"GLOBALS"}["wjitymx"]}=realpath(${$hnckxmmz}."/../");${"GLOBALS"}["umumkfyc"]="path";${"GLOBALS"}["pwhtxtucgfe"]="path";$ejhowzimsqot="path";require_once(${$vmzuhyyqqox}."/lib/dolicom.lib.php");require_once(${$jiuieonc}."/class/ws_params.class.php");require_once(${$aotetbwllf}."/class/ws_products.class.php");require_once(${$ejhowzimsqot}."/class/ws_categories.class.php");require_once(${${"GLOBALS"}["umumkfyc"]}."/class/ws_orders.class.php");require_once(${${"GLOBALS"}["pwhtxtucgfe"]}."/class/ws_customers.class.php");Class ws_Doli{var$result;var$data;var$key='';var$softname='';var$debug=false;var$log=false;var$keylen=20;var$logstring;function __construct($soft=''){$nxjwsrvuty="soft";$this->result=array();$this->data=array();$tnewhqxpeyvu="soft";$this->softname=${$nxjwsrvuty};if(!${$tnewhqxpeyvu}){$this->softname=get_soft_name();}$this->key=get_key();return 1;}function key_isvalid(){${${"GLOBALS"}["fzuyffwxrj"]}=$_SERVER["HTTP_HOST"];$nmvjuzmpt="url";${"GLOBALS"}["keopddf"]="protocolos";${"GLOBALS"}["tejwdcqnvff"]="urls";if(Configuration::get("PS_MULTISHOP_FEATURE_ACTIVE")){${${"GLOBALS"}["fzuyffwxrj"]}=$this->getmainshopurl();if($this->log)$this->logstring.="shop ".$_SERVER["HTTP_HOST"]." base ".${${"GLOBALS"}["fzuyffwxrj"]}."
";if($this->log)$this->logstring.="multishop est actif"."
";return true;}else if($this->log)$this->logstring.="multishop dsactiv"."
";${${"GLOBALS"}["tjihupydl"]}=array("http://","https://","ftp://","www.");${${"GLOBALS"}["syhopn"]}=explode("/",str_replace(${${"GLOBALS"}["keopddf"]},"",${$nmvjuzmpt}));${"GLOBALS"}["sxfqyruoavu"]="res";${${"GLOBALS"}["fzuyffwxrj"]}=${${"GLOBALS"}["tejwdcqnvff"]}[0];${${"GLOBALS"}["rjkiynh"]}=$this->_codeValidate($this->key,${${"GLOBALS"}["fzuyffwxrj"]});if($this->log)$this->logstring.=__FUNCTION__." result $res url $url key ".$this->key;return${${"GLOBALS"}["sxfqyruoavu"]};}function getmainshopurl(){${${"GLOBALS"}["pxbpcdwph"]}="SELECT domain, domain_ssl FROM "._DB_PREFIX_."shop_url
WHERE main = 1
AND id_shop = 1";${${"GLOBALS"}["iqejdcdpnsh"]}=Db::getInstance()->getRow(${${"GLOBALS"}["pxbpcdwph"]});return${${"GLOBALS"}["iqejdcdpnsh"]}["domain"];}function get_shopid(){$qfxexcbx="shopid";if(Configuration::get("PS_MULTISHOP_FEATURE_ACTIVE")){if(Shop::isFeatureActive()){$tihcjzdyim="shopid";${$tihcjzdyim}=Shop::getContextShopID();}}else${$qfxexcbx}=0;return${${"GLOBALS"}["cyhrzym"]};}function get_shopid2byte(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$mofgfjsvd="sql";$lgpvdyqt="sql";${${"GLOBALS"}["pxbpcdwph"]}="SELECT s.id_shop as shop_id, s.name as shop_name";${"GLOBALS"}["wdlbqntnu"]="sql";${${"GLOBALS"}["wdlbqntnu"]}.=" FROM "._DB_PREFIX_."shop s";${$mofgfjsvd}.=" WHERE s.active=1";$fozbigc="result";$blxnxyu="sql";${$lgpvdyqt}.=" ORDER BY s.id_shop ASC";if(!${$fozbigc}=Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(${$blxnxyu})){$this->result["code"]=-1;$this->result["message"]="Error: request ".${${"GLOBALS"}["pxbpcdwph"]}.": ".Db::getInstance()->getMsgError();}else{${"GLOBALS"}["krnghkh"]="result";$this->data=${${"GLOBALS"}["krnghkh"]};$this->result["sql"]=${${"GLOBALS"}["pxbpcdwph"]};}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}private function _get_domain(){$avgktl="url";${$avgktl}=getUrl();${"GLOBALS"}["iglxsfbyfj"]="url";$ecpiubqh="url";${"GLOBALS"}["tseyetbxsy"]="url";${${"GLOBALS"}["tjihupydl"]}=array("http://","https://","ftp://","www.");${${"GLOBALS"}["tseyetbxsy"]}=explode("/",str_replace(${${"GLOBALS"}["tjihupydl"]},"",${$ecpiubqh}));return${${"GLOBALS"}["iglxsfbyfj"]}[0];}function _codeValidate($serial,$name=""){${"GLOBALS"}["megdyb"]="serial";$utwruhgienj="name";${"GLOBALS"}["mkgzhdcmpbk"]="serial";${"GLOBALS"}["osnkmkvx"]="serial";${"GLOBALS"}["jybofp"]="serial";if(empty(${${"GLOBALS"}["mkwvdf"]})||${${"GLOBALS"}["osnkmkvx"]}==""){$unpscqbl="name";$znkhptdrwdk="name";if(${$znkhptdrwdk}=="localhost"||${$unpscqbl}=="docker.local"){return true;}else{return false;}}${"GLOBALS"}["ybmmvtjgfj"]="name";if(${${"GLOBALS"}["ylhouspu"]}=="docker.local")return true;$zyibmpyb="extendedcode";if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["mkwvdf"]}." url ".${$utwruhgienj}."</p>";if($this->log)$this->logstring.="
".__FUNCTION__."::cl ".${${"GLOBALS"}["mkgzhdcmpbk"]}." url ".${${"GLOBALS"}["ybmmvtjgfj"]}."
";${"GLOBALS"}["xlnoebu"]="serial";${${"GLOBALS"}["mkwvdf"]}=str_replace("-","",${${"GLOBALS"}["mkwvdf"]});${${"GLOBALS"}["mkwvdf"]}=strtoupper(${${"GLOBALS"}["megdyb"]});${"GLOBALS"}["klqfqqcoovn"]="thislen";${"GLOBALS"}["kktaaauzelua"]="initlen";$xewrwbzpahur="serial";${${"GLOBALS"}["mkwvdf"]}=str_replace(array("0","1","O","I",),array("","","","",),${${"GLOBALS"}["mkwvdf"]});${${"GLOBALS"}["klqfqqcoovn"]}=strlen(${${"GLOBALS"}["xlnoebu"]});if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["jybofp"]}." longueur ".$this->keylen." reel ".${${"GLOBALS"}["qkoeoqw"]}."</p>";$tuwwmrq="thislen";if($this->keylen<>${$tuwwmrq})return false;${${"GLOBALS"}["aguriwiw"]}=$this->_initLen();if($this->debug)print"<p>".__FUNCTION__."::cl ".${$xewrwbzpahur}." initlen ".${${"GLOBALS"}["kktaaauzelua"]}."</p>";${${"GLOBALS"}["sxmgyglfkd"]}=substr(${${"GLOBALS"}["mkwvdf"]},0,${${"GLOBALS"}["aguriwiw"]});$rmdkdbqzi="serial";if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["mkwvdf"]}." initcode ".${${"GLOBALS"}["sxmgyglfkd"]}."</p>";${${"GLOBALS"}["xpdqvol"]}=$this->_extendCode(${${"GLOBALS"}["sxmgyglfkd"]},${${"GLOBALS"}["ylhouspu"]});if($this->debug)print"<p>".__FUNCTION__."::cl ".${$rmdkdbqzi}." extendcode ".${${"GLOBALS"}["xpdqvol"]}."</p>";$beeorymjb="fullcode";${${"GLOBALS"}["ekyvvucfj"]}=substr(${$zyibmpyb},0,$this->keylen);if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["mkwvdf"]}." fullcode ".${${"GLOBALS"}["ekyvvucfj"]}."</p>";if(${$beeorymjb}==${${"GLOBALS"}["mkwvdf"]})return true;else return false;}function _extendCode($initcode,$name=''){${"GLOBALS"}["wiimheafu"]="p1str";${"GLOBALS"}["grgabsxi"]="software";${"GLOBALS"}["qdgkidomjjhq"]="p1str";$rtaspp="software";${"GLOBALS"}["levmmd"]="p1str";${"GLOBALS"}["ykynxp"]="name";${"GLOBALS"}["etvqedmipev"]="initcode";$kbonndxosw="extrabit";${"GLOBALS"}["jwbywpbt"]="extrabit";${"GLOBALS"}["ylpgskc"]="p1str";${${"GLOBALS"}["grgabsxi"]}=$this->softname;${${"GLOBALS"}["qdgkidomjjhq"]}=$this->_sumDigit(${${"GLOBALS"}["etvqedmipev"]});if($this->debug)print"<p>code ".${${"GLOBALS"}["sxmgyglfkd"]}." name ".${${"GLOBALS"}["ykynxp"]}." soft ".${${"GLOBALS"}["lorcgda"]}." plstr ".${${"GLOBALS"}["levmmd"]}."</p>";${${"GLOBALS"}["wiimheafu"]}.=$this->_add32(${${"GLOBALS"}["sxmgyglfkd"]},${${"GLOBALS"}["ylhouspu"]}.${$rtaspp}."abhishek");${${"GLOBALS"}["pridwkwe"]}=strtoupper(${${"GLOBALS"}["ylpgskc"]});${${"GLOBALS"}["pridwkwe"]}=str_replace(array("0","1","O","I",),array("","","","",),${${"GLOBALS"}["pridwkwe"]});${${"GLOBALS"}["frgvko"]}=strlen(${${"GLOBALS"}["pridwkwe"]});${$kbonndxosw}="";${${"GLOBALS"}["nxlhref"]}=0;while(strlen(${${"GLOBALS"}["jwbywpbt"]})<$this->keylen-2){${"GLOBALS"}["lbppkmhd"]="extrabit";$fvmczppmlx="i";${"GLOBALS"}["xbrplyvic"]="p1str";${"GLOBALS"}["pwrurs"]="i";${${"GLOBALS"}["lbppkmhd"]}.=substr(${${"GLOBALS"}["xbrplyvic"]},${$fvmczppmlx},1);${${"GLOBALS"}["gpeqmhviimr"]}.=substr(${${"GLOBALS"}["pridwkwe"]},${${"GLOBALS"}["frgvko"]}-${${"GLOBALS"}["pwrurs"]}-1,1);${${"GLOBALS"}["nxlhref"]}++;}return${${"GLOBALS"}["sxmgyglfkd"]}.${${"GLOBALS"}["gpeqmhviimr"]}."6F75";}function _sumDigit($str){${"GLOBALS"}["gimrekulj"]="sum";${${"GLOBALS"}["qfiedmgchu"]}=str_split(${${"GLOBALS"}["tshyyy"]});$mnfvuxxgp="i";${"GLOBALS"}["bdeitj"]="sum";${${"GLOBALS"}["gimrekulj"]}=0;for(${${"GLOBALS"}["nxlhref"]}=0;${${"GLOBALS"}["nxlhref"]}<count(${${"GLOBALS"}["qfiedmgchu"]});${$mnfvuxxgp}++)${${"GLOBALS"}["oelyvlt"]}=${${"GLOBALS"}["oelyvlt"]}+base_convert(${${"GLOBALS"}["qfiedmgchu"]}[${${"GLOBALS"}["nxlhref"]}],36,10);${"GLOBALS"}["xggufpq"]="sum";${${"GLOBALS"}["xggufpq"]}=str_replace(array("0","1","O","I","o","i"),array("AZ","BY","29","38","29","38",),${${"GLOBALS"}["bdeitj"]});return${${"GLOBALS"}["oelyvlt"]};}function _add32($a,$b){${"GLOBALS"}["dyifrlpejxk"]="sum";$hyrqpcmu="sum32";$fpbhlevx="sum32";${${"GLOBALS"}["oelyvlt"]}=base_convert(${${"GLOBALS"}["qfiedmgchu"]},36,10)+base_convert(${${"GLOBALS"}["yujkio"]},36,10);$cpcswixfk="sum32";${$hyrqpcmu}=base_convert(${${"GLOBALS"}["dyifrlpejxk"]},10,36);${${"GLOBALS"}["ippjbhtzk"]}=str_replace(array("0","1","O","I","o","i"),array("","","","","","",),${$fpbhlevx});if($this->debug)echo" ADD32 $a + $b = $sum32<br/>";return${$cpcswixfk};}function _initLen(){$yxhuxulfop="initlen";${"GLOBALS"}["tufscbgcsa"]="initlen";$dfdxew="initlen";${${"GLOBALS"}["tufscbgcsa"]}=intval($this->keylen/3);${$yxhuxulfop}=max(${$dfdxew},1);return${${"GLOBALS"}["aguriwiw"]};}function get_module_info(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$this->data["module_version"]=get_module_version();$this->data["ecom_version"]=get_cms_version();$this->data["ecommerce"]=get_cms_type();$ijdldforkzg="dims";$this->data["invoicedir"]=get_invoicedir();$this->data["facture"]="invoicepath";${"GLOBALS"}["qutdlmj"]="dims";$this->data["params"]=${${"GLOBALS"}["zbfamjc"]};$this->data["key"]=$this->key;$this->data["idshop"]=$this->get_shopid();$pxnkth="dims";${$ijdldforkzg}=get_units();$this->data["weight_unit"]=${${"GLOBALS"}["qutdlmj"]}["weight_unit"];$this->data["length_unit"]=${$pxnkth}["length_unit"];}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}if($this->log)$this->result["log"]=$this->logstring;return 1;}function get_shopsid(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$ejmibsvent="sql";${$ejmibsvent}="SELECT s.id_shop as shop_id, s.name as shop_name";${"GLOBALS"}["qisntic"]="sql";$hpdezsykgx="sql";${${"GLOBALS"}["qisntic"]}.=" FROM "._DB_PREFIX_."shop s";${${"GLOBALS"}["pxbpcdwph"]}.=" WHERE s.active=1";${"GLOBALS"}["ugvvzwsu"]="sql";${"GLOBALS"}["unshhpqwjm"]="result";${${"GLOBALS"}["ugvvzwsu"]}.=" ORDER BY s.id_shop ASC";if(!${${"GLOBALS"}["unshhpqwjm"]}=Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(${$hpdezsykgx})){$this->result["code"]=1;$this->result["message"]=Db::getInstance()->getMsgError();}else{$sywjrgfojpyd="result";$this->data["shops"]=${$sywjrgfojpyd};}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}if($this->log)$this->result["log"]=$this->logstring;return 1;}function get_taxes(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["lrewbcswfhc"]="paramsclass";${"GLOBALS"}["ftwspkjudi"]="res";${${"GLOBALS"}["lrewbcswfhc"]}=new WS_Params();$mrdcxdpt="res";${${"GLOBALS"}["ftwspkjudi"]}=$paramsclass->get_taxes();if(${$mrdcxdpt}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_methodes_exped(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["incooymkd"]="paramsclass";${${"GLOBALS"}["incooymkd"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_meth_expedition();$kcqlkktf="res";if(${$kcqlkktf}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_customertypes(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${${"GLOBALS"}["mivvzbnnkqv"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_customer_types();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_suppliers(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$vipkgvsq="res";$xwigpry="res";${"GLOBALS"}["ghfolxbtdr"]="paramsclass";${${"GLOBALS"}["ghfolxbtdr"]}=new WS_Params();${$vipkgvsq}=$paramsclass->get_suppliers();if(${$xwigpry}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_languages(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["ldhykwzh"]="paramsclass";${"GLOBALS"}["yjswoir"]="res";$jycixulyk="res";${${"GLOBALS"}["ldhykwzh"]}=new WS_Params();${$jycixulyk}=$paramsclass->get_languages();if(${${"GLOBALS"}["yjswoir"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_paymentmethods(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["euvqxcbgykk"]="res";${${"GLOBALS"}["mivvzbnnkqv"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_paymentmethods();if(${${"GLOBALS"}["euvqxcbgykk"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}$this->result["debug"]=$paramsclass->debug;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_manufacturers(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$xfqvmnhgjulo="paramsclass";${$xfqvmnhgjulo}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_manufacturers();${"GLOBALS"}["gcwxbkiuol"]="res";if(${${"GLOBALS"}["gcwxbkiuol"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_orderstatus(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$jzyzejz="paramsclass";$riigoeqbml="res";${$jzyzejz}=new WS_Params();${$riigoeqbml}=$paramsclass->get_orderstatus();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_options(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["uotdstaxute"]="paramsclass";${${"GLOBALS"}["uotdstaxute"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_prodoptions();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_optionsvals(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["vfvurrxp"]="res";${"GLOBALS"}["fezyso"]="paramsclass";${${"GLOBALS"}["fezyso"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_prodoptionvals();if(${${"GLOBALS"}["vfvurrxp"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_features(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["vxndgip"]="res";${"GLOBALS"}["wltcecskdz"]="paramsclass";${${"GLOBALS"}["wltcecskdz"]}=new WS_Params();${${"GLOBALS"}["vxndgip"]}=$paramsclass->get_product_features();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_article($id='',$attribut='',$ref='',$attributid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["mznrmpt"]="id";$xbnbvvlrbk="productclass";${"GLOBALS"}["ecxsedaednm"]="attribut";${"GLOBALS"}["ckcxlslcrg"]="attributid";${"GLOBALS"}["yjsdghvgej"]="ref";${$xbnbvvlrbk}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$productclass->fetch(${${"GLOBALS"}["mznrmpt"]},${${"GLOBALS"}["yjsdghvgej"]},${${"GLOBALS"}["ecxsedaednm"]},${${"GLOBALS"}["ckcxlslcrg"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]=$productclass->error;}else{$this->data=$productclass->prodresult;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_article_info($prodid,$custshopid=0,$limit=0){$this->result["code"]=0;$this->result["message"]="";$this->result["debug"]="prodid $prodid shopid $custshopid
";if($this->key_isvalid($this->key)){${${"GLOBALS"}["ippczqriv"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$productclass->get_article_info(${${"GLOBALS"}["egdejbyit"]},${${"GLOBALS"}["txjrmdihqkh"]},${${"GLOBALS"}["vbuulhqmp"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=${${"GLOBALS"}["honslcbg"]};$this->result["message"]=$productclass->error;}else$this->data=$productclass->products_list;$this->result["sql"]=$productclass->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_new_products($pid,$limit='1',$shopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$ftdjdfemuph="shopid";${"GLOBALS"}["kpwzqjbpkgg"]="pid";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();if($prod->get_products_list(${${"GLOBALS"}["kpwzqjbpkgg"]},${${"GLOBALS"}["vbuulhqmp"]},${$ftdjdfemuph})<1){$this->result["code"]=-1;$this->result["message"]="Error ".$prod->error;}else$this->data=$prod->products_list;$this->result["sql"]=$prod->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_productimages($idprod,$idattribute,$ref){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["jpyxpw"]="ref";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();if($prod->get_products_images(${${"GLOBALS"}["ufuiujabn"]},${${"GLOBALS"}["nwbjvud"]},${${"GLOBALS"}["jpyxpw"]})<1){$this->result["code"]=-1;$this->result["message"]="Error ".$prod->error;}else$this->data=$prod->products_list;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function modif_article($tabmod,$prodid){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$jdjarzrkcpae="prod";${"GLOBALS"}["hlfxfeg"]="prodid";${$jdjarzrkcpae}=new WS_Product();if($prod->updateproduct(${${"GLOBALS"}["hlfxfeg"]},${${"GLOBALS"}["fgwxjerwgp"]})<0){$this->result["code"]=1;$this->result["message"]=$prod->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}$this->result["debug"]=$prod->debug;return 1;}function update_productlist($productlist){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$mwnrwirwyu="productlist";$fpmwbnfdyu="elt";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();if(!is_array(${${"GLOBALS"}["flmgiszj"]})){$this->result["code"]=-11;$this->result["message"]="No list to treat";return-1;}foreach(${$mwnrwirwyu} as${$fpmwbnfdyu}){$urlfqpwaaoo="elt";if($prod->updateproduct(${${"GLOBALS"}["yqqnvf"]}["prodid"],${$urlfqpwaaoo}["datas"])<0){$xbpjmrcv="elt";$gkvorcqi="elt";$this->data[]=array("prodid"=>${${"GLOBALS"}["yqqnvf"]}["prodid"],"attributeid"=>${$xbpjmrcv}["datas"]["attributid"],"code"=>1,"message"=>$prod->error,"result"=>${$gkvorcqi});}else{${"GLOBALS"}["rqdgxxml"]="elt";$this->data[]=array("prodid"=>${${"GLOBALS"}["yqqnvf"]}["prodid"],"attributeid"=>${${"GLOBALS"}["rqdgxxml"]}["datas"]["attributid"],"code"=>0,"message"=>"","result"=>${${"GLOBALS"}["yqqnvf"]});}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}$this->result["debug"]=$prod->debug;return 1;}function modif_article_old($tabmod,$prodid){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$kslfftbrt="tabmod";$mjsmkferciw="tabmod";${"GLOBALS"}["hvspwpbymi"]="prod";$hiedvnc="tabmod";${${"GLOBALS"}["hvspwpbymi"]}=new WS_Product();${"GLOBALS"}["epdtkyvuyi"]="tabmod";$prod->id_product=${${"GLOBALS"}["egdejbyit"]};${"GLOBALS"}["xdrdwqgb"]="tabmod";$ehdvkfhxg="tabmod";$hvtlvam="tabmod";if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["price"]))$prod->price=${${"GLOBALS"}["fgwxjerwgp"]}["price"];else$prod->price=null;$hzuanhtk="tabmod";$uhbvdicaj="tabmod";$gwpbuehyfb="tabmod";$gupcem="tabmod";${"GLOBALS"}["aodsonfpdtkb"]="data";if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["quantity"]))$prod->quantity=${${"GLOBALS"}["epdtkyvuyi"]}["quantity"];if(is_numeric(${$gwpbuehyfb}["weight"]))$prod->weight=${$kslfftbrt}["weight"];if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["categ"]))$prod->categ_id=${${"GLOBALS"}["fgwxjerwgp"]}["categ"];${"GLOBALS"}["xrrxvbe"]="tabmod";if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["ecotax"]))$prod->ecotax_rate=${$ehdvkfhxg}["ecotax"];$xyugpm="tabmod";if(is_numeric(${$mjsmkferciw}["taxid"]))$prod->tax_id=${${"GLOBALS"}["fgwxjerwgp"]}["taxid"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["features"]))$prod->features=${${"GLOBALS"}["fgwxjerwgp"]}["features"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["declinaison"]))$prod->declinaison=${$xyugpm}["declinaison"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["name"]))$prod->name=${${"GLOBALS"}["xrrxvbe"]}["name"];if(isset(${$hzuanhtk}["desc_short"]))$prod->description_short=${${"GLOBALS"}["fgwxjerwgp"]}["desc_short"];if(isset(${$uhbvdicaj}["long_desc"]))$prod->description=${$hvtlvam}["long_desc"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["qtymini"]))$prod->qtymini=${${"GLOBALS"}["xdrdwqgb"]}["qtymini"];if($prod->updateproduct(${$gupcem}["attributid"],${${"GLOBALS"}["fgwxjerwgp"]}["custshopid"])<0){$this->result["code"]=1;$this->result["message"]=$prod->error;$this->result["debug"]=$prod->debug;return-1;}$this->result["debug"]=$prod->debug;${${"GLOBALS"}["aodsonfpdtkb"]}["sql"]="pas de select";${${"GLOBALS"}["nxwtecpk"]}["result"]=print_r(${${"GLOBALS"}["fgwxjerwgp"]},true);${${"GLOBALS"}["nxwtecpk"]}["prix"]=${${"GLOBALS"}["fgwxjerwgp"]}["price"]." - ".$prod->price;${${"GLOBALS"}["nxwtecpk"]}["qte"]=${$hiedvnc}["quantity"]." - ".$prod->quantity;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function replace_image($id_product,$id_attribute=0,$filesarray=array()){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$xhgtnxbelti="dir";${"GLOBALS"}["yhtfsppadhw"]="prd";${$xhgtnxbelti}=realpath(dirname(__FILE__)."/../tmp/")."/";${${"GLOBALS"}["yhtfsppadhw"]}=new WS_Product();if($prd->delete_product_images(${${"GLOBALS"}["isqgxqntffc"]},${${"GLOBALS"}["jezoagpo"]})<0){$this->result["code"]=-1;$this->result["message"].=$prd->error."
";}else{${"GLOBALS"}["uiifkrkjq"]="args";${${"GLOBALS"}["wkoscw"]}=1;foreach(${${"GLOBALS"}["ggexccgh"]} as${${"GLOBALS"}["uiifkrkjq"]}){$zeuktvh="file";${"GLOBALS"}["wwscge"]="dir";${${"GLOBALS"}["amcidfxlp"]}=${${"GLOBALS"}["wwscge"]}.${${"GLOBALS"}["onouqhbpkct"]}["name"];${"GLOBALS"}["gtpeprvl"]="content";${${"GLOBALS"}["udnlowqv"]}=file_get_contents(${${"GLOBALS"}["onouqhbpkct"]}["data"]);${"GLOBALS"}["vyedaxjuue"]="cover";if(${${"GLOBALS"}["gtpeprvl"]}===false)${${"GLOBALS"}["nxwtecpk"]}["error"]="error reading data for ".${$zeuktvh};else{${"GLOBALS"}["yocvfdc"]="file";${"GLOBALS"}["fmwdibkcotpk"]="data";$qdrbvf="content";${"GLOBALS"}["eksjmejmkc"]="file";${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${${"GLOBALS"}["eksjmejmkc"]},${$qdrbvf});${"GLOBALS"}["qmlpkpjvpl"]="lg";if(${${"GLOBALS"}["qmlpkpjvpl"]}===false)${${"GLOBALS"}["fmwdibkcotpk"]}["error"].="error writing data for ".${${"GLOBALS"}["yocvfdc"]}." ".strlen(${${"GLOBALS"}["udnlowqv"]});else{${"GLOBALS"}["yuhrrsb"]="lg";$bmiqwg="id_product";${"GLOBALS"}["xbroksqmpe"]="args";$ykwumwbdwcuu="data";${$ykwumwbdwcuu}[]=array("file"=>${${"GLOBALS"}["xbroksqmpe"]}["name"],"length"=>${${"GLOBALS"}["yuhrrsb"]});if($prd->add_product_image(${${"GLOBALS"}["amcidfxlp"]},${$bmiqwg},${${"GLOBALS"}["jezoagpo"]},${${"GLOBALS"}["wkoscw"]})<0){$obvttve="data";${$obvttve}["error"].=$prd->error."
";}}}${${"GLOBALS"}["vyedaxjuue"]}=0;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function replace_documents($id_product,$id_attribute=0,$filesarray=array()){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${${"GLOBALS"}["qjnqdmb"]}=dirname(__FILE__)."/../tmp/";${${"GLOBALS"}["fmbtfhbk"]}=new WS_Product();$xkmsugvigl="id_product";if($prd->delete_product_documents(${$xkmsugvigl},${${"GLOBALS"}["jezoagpo"]})<0){$this->result["code"]=-1;$this->result["message"].=$prd->error."
";}else{${"GLOBALS"}["fqvqqmx"]="filesarray";foreach(${${"GLOBALS"}["fqvqqmx"]} as${${"GLOBALS"}["onouqhbpkct"]}){${"GLOBALS"}["icyupdk"]="id_product";${"GLOBALS"}["krxbrskoi"]="args";$nlpdtvcb="id_attribute";${${"GLOBALS"}["amcidfxlp"]}=${${"GLOBALS"}["qjnqdmb"]}.${${"GLOBALS"}["krxbrskoi"]}["name"];${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${${"GLOBALS"}["amcidfxlp"]},file_get_contents(${${"GLOBALS"}["onouqhbpkct"]}["data"]));if($prd->add_product_doc(${${"GLOBALS"}["amcidfxlp"]},${${"GLOBALS"}["icyupdk"]},${$nlpdtvcb})<0){${${"GLOBALS"}["nxwtecpk"]}["error"].=$prd->error."
";}}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function send_article($prod,$filesarray=array(),$docsarray=array(),$idshop=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["hjriwm"]="prod";$this->data=array("article"=>0,"error"=>"");${"GLOBALS"}["bogqwkg"]="dir";$yduqtqvvn="res";${"GLOBALS"}["iufefvts"]="id_product";$hvlbduyqa="docsarray";${"GLOBALS"}["tapujbwluo"]="attributeid";${${"GLOBALS"}["fmbtfhbk"]}=new WS_Product();${${"GLOBALS"}["rjkiynh"]}=$prd->create(${${"GLOBALS"}["bogjtuyy"]},${${"GLOBALS"}["swdirlokxcik"]});if(${$yduqtqvvn}<0){$this->data["article"]=-1;$this->result["message"]=$prd->error;$this->result["code"]=-1;$this->result["debug"]=$prd->debug;return-1;}$this->data=$prd->prodresult;$this->result["debugdoliclass"]=print_r(${${"GLOBALS"}["bogjtuyy"]},true)." shopid $idshop";if(${${"GLOBALS"}["rjkiynh"]}==2){$this->result["message"]="produit dj existant";$this->result["debug"]=$prd->debug;return 1;}${${"GLOBALS"}["iufefvts"]}=$prd->prodresult["productid"];${${"GLOBALS"}["tapujbwluo"]}=$prd->prodresult["attributeid"];$this->result["debug"]=$prd->debug;${${"GLOBALS"}["bogqwkg"]}=realpath(dirname(__FILE__)."/../tmp/")."/";if(empty(${${"GLOBALS"}["hjriwm"]}["modelid"])||${${"GLOBALS"}["bogjtuyy"]}["modelid"]==-1)${${"GLOBALS"}["wkoscw"]}=1;foreach(${${"GLOBALS"}["ggexccgh"]} as${${"GLOBALS"}["onouqhbpkct"]}){$lcjusiimss="args";$vmibcpfdrcb="content";${"GLOBALS"}["hkdmoojdwx"]="file";${${"GLOBALS"}["hkdmoojdwx"]}=${${"GLOBALS"}["qjnqdmb"]}.${$lcjusiimss}["name"];${$vmibcpfdrcb}=file_get_contents(${${"GLOBALS"}["onouqhbpkct"]}["data"]);if(${${"GLOBALS"}["udnlowqv"]}===false)$this->data["error"]="error reading data for ".${${"GLOBALS"}["amcidfxlp"]};else{${"GLOBALS"}["usmqddxfjf"]="id_product";${"GLOBALS"}["mtoynrcx"]="file";$qkdplfyygv="cover";${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${${"GLOBALS"}["mtoynrcx"]},${${"GLOBALS"}["udnlowqv"]});if(${${"GLOBALS"}["nejpsleeyk"]}===false)$this->data["error"]="error creating ".${${"GLOBALS"}["amcidfxlp"]};elseif($prd->add_product_image(${${"GLOBALS"}["amcidfxlp"]},${${"GLOBALS"}["usmqddxfjf"]},${${"GLOBALS"}["keecpjl"]},${${"GLOBALS"}["wkoscw"]})<0){$this->data["error"].=$prd->error."
";}else${$qkdplfyygv}=0;}}foreach(${$hvlbduyqa} as${${"GLOBALS"}["onouqhbpkct"]}){$utxtkkzwht="content";${"GLOBALS"}["uhrkytts"]="content";$gphmlj="args";$usfnol="dir";${"GLOBALS"}["lpqkliht"]="file";${"GLOBALS"}["cdeqekbwhd"]="file";${${"GLOBALS"}["lpqkliht"]}=${$usfnol}.${${"GLOBALS"}["onouqhbpkct"]}["name"];${$utxtkkzwht}=file_get_contents(${$gphmlj}["data"]);if(${${"GLOBALS"}["uhrkytts"]}===false)$this->data["error"]="error reading data for ".${${"GLOBALS"}["cdeqekbwhd"]};else{$sjmnqssiu="file";$txrknlens="content";${"GLOBALS"}["ykhqdkvlk"]="file";${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${$sjmnqssiu},${$txrknlens});$mxfljwquv="id_product";$locppsivfs="attributeid";if(${${"GLOBALS"}["nejpsleeyk"]}===false)$this->data["error"]="error creating ".${${"GLOBALS"}["ykhqdkvlk"]};elseif($prd->add_product_doc(${${"GLOBALS"}["amcidfxlp"]},${$mxfljwquv},${$locppsivfs})<0){$this->data["error"].=$prd->error."
";}}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_labels($pid,$attribid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["cvuizmtwnre"]="attribid";${"GLOBALS"}["ymdeayft"]="prod";${${"GLOBALS"}["ymdeayft"]}=new WS_Product();$this->data=$prod->get_attributes_lib(${${"GLOBALS"}["emhdxrfxrjl"]},${${"GLOBALS"}["cvuizmtwnre"]});if(!is_array(${${"GLOBALS"}["nxwtecpk"]})){$this->result["code"]=-1;$this->result["message"]=$prod->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_productstatus($prodid,$status){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){$ihgajqckrln="prodid";if(empty(${$ihgajqckrln})){${"GLOBALS"}["cxptrpkgw"]="prodid";$this->result["code"]=${${"GLOBALS"}["cxptrpkgw"]};$this->result["stat"]=" productid not set : ";}else{${"GLOBALS"}["gfeukpza"]="prod";${${"GLOBALS"}["gfeukpza"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$prod->updatestatus(${${"GLOBALS"}["egdejbyit"]},${${"GLOBALS"}["xjbfcukw"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]="error setting status : ".${${"GLOBALS"}["xjbfcukw"]}." for product $prodid ".$prod->error;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_product_attribute($idoption,$optionname,$idvalue,$valuename){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){$fdpjqkumgpr="optionname";if(empty(${$fdpjqkumgpr})&&empty(${${"GLOBALS"}["npuioymp"]})){$ycmqsvigbrgd="prodid";$this->result["code"]=${$ycmqsvigbrgd};$this->result["message"]=" aucune nom pour l'attribut ou sa valeur : ";}else{$eqajrya="result";${"GLOBALS"}["tmbsjjhk"]="idvalue";${"GLOBALS"}["lcoecoeqiizy"]="prod";$yzcjocdkk="valuename";${${"GLOBALS"}["lcoecoeqiizy"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$prod->set_option(${${"GLOBALS"}["pquxszes"]},${${"GLOBALS"}["uryvolexhkx"]},${${"GLOBALS"}["tmbsjjhk"]},${$yzcjocdkk});$this->result["debug"]=$prod->debug;if(${$eqajrya}<0){$this->result["code"]=-1;$this->result["message"]="error setting option : $optionname / $valuename ".$prod->error;}else$this->data=array("ecomoption"=>$prod->optionid,"ecomvalue"=>$prod->valueid);}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_productstock($idprod,$idattrib,$qty){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${"GLOBALS"}["ftvusggrcje"]="result";${"GLOBALS"}["hplkpsquns"]="prod";$quvrhscvmzq="idprod";${"GLOBALS"}["ixsokndmjw"]="qty";${${"GLOBALS"}["hplkpsquns"]}=new WS_Product();$crqkldc="idattrib";${${"GLOBALS"}["honslcbg"]}=$prod->update_productstock(${$quvrhscvmzq},${$crqkldc},${${"GLOBALS"}["ixsokndmjw"]});if(${${"GLOBALS"}["ftvusggrcje"]}<0){$this->result["code"]=-1;$this->result["message"]="error setting stock : $idprod / $idattrib ".$prod->error;}else$this->data=array("stock"=>${${"GLOBALS"}["bjumjetl"]});}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_stocklist($stockliste){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${"GLOBALS"}["tsysnujbmncx"]="stockliste";$wrbtvd="stockliste";$gbfiarixr="elt";if(!is_array(${${"GLOBALS"}["qlbeymapdmt"]})||count(${${"GLOBALS"}["tsysnujbmncx"]})==0){$this->result["code"]=-1;$this->result["message"]="nothing to do";return 1;}${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();foreach(${$wrbtvd} as${$gbfiarixr}){$ipfwwqmto="elt";${"GLOBALS"}["ojnfmwcsne"]="result";$vtnqefqsdt="prodid";${"GLOBALS"}["iohpjerrhcn"]="elt";${"GLOBALS"}["cdklgfb"]="elt";if(empty(${${"GLOBALS"}["yqqnvf"]}["productid"])){${"GLOBALS"}["cnwjhyxwuqws"]="errors";${${"GLOBALS"}["cnwjhyxwuqws"]}[]="productid vide";continue;}if(!is_numeric(${${"GLOBALS"}["cdklgfb"]}["qty"])){${"GLOBALS"}["ueyydmsk"]="errors";${${"GLOBALS"}["ueyydmsk"]}[]="quantit errone";continue;}${"GLOBALS"}["epzoaweu"]="elt";$vnjphsctkl="elt";${"GLOBALS"}["ryjfsufqiwr"]="attributeid";${${"GLOBALS"}["egdejbyit"]}=${$ipfwwqmto}["productid"];${${"GLOBALS"}["ryjfsufqiwr"]}=(empty(${${"GLOBALS"}["iohpjerrhcn"]}["attributeid"]))?0:${$vnjphsctkl}["attributeid"];${${"GLOBALS"}["bjumjetl"]}=${${"GLOBALS"}["epzoaweu"]}["qty"];$dnnpguol="result";${$dnnpguol}=$prod->update_productstock(${$vtnqefqsdt},${${"GLOBALS"}["keecpjl"]},${${"GLOBALS"}["bjumjetl"]});if(${${"GLOBALS"}["ojnfmwcsne"]}<0){$this->result["code"]=-1;$this->result["message"].="error setting stock : $prodid / $attributeid ".$prod->error."
";}else{$brxrnxti="prodid";${"GLOBALS"}["dfqpovvslhds"]="attributeid";$this->data[]=array("productid"=>${$brxrnxti},"attributeid"=>${${"GLOBALS"}["dfqpovvslhds"]},"qty"=>${${"GLOBALS"}["bjumjetl"]});}}if(count(${${"GLOBALS"}["vntbtfv"]}))$this->result["errors"]=${${"GLOBALS"}["vntbtfv"]};}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_product_attribute($pid,$attid,$decli){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){if(empty(${${"GLOBALS"}["emhdxrfxrjl"]})||empty(${${"GLOBALS"}["bnunepg"]})||empty(${${"GLOBALS"}["ivpbgliywf"]})){$this->result["code"]=-1;$this->result["message"]=" Erreur paramtres produit $pid attribut $attid decli $decli ";}else{$jipqgqrfwq="result";$rdoeldqsaf="attid";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();${$jipqgqrfwq}=$prod->update_attribute(${${"GLOBALS"}["emhdxrfxrjl"]},${$rdoeldqsaf},${${"GLOBALS"}["ivpbgliywf"]});$this->result["debug"]=$prod->debug;${"GLOBALS"}["ympeoj"]="result";if(${${"GLOBALS"}["ympeoj"]}<0){$this->result["code"]=-1;$this->result["message"]="error updating attribute : $pid attribut $attid decli $decli ".$prod->error;}else$this->data=array();}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_price($prodid,$attributeid=0,$minqty,$price){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){if(empty(${${"GLOBALS"}["egdejbyit"]})){$this->result["code"]=-1;$this->result["message"]=" Erreur paramtres produit $prodid attribut $attributeid ";}else{${"GLOBALS"}["camxbr"]="minqty";$yrvrml="result";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();${$yrvrml}=$prod->update_price(${${"GLOBALS"}["egdejbyit"]},${${"GLOBALS"}["keecpjl"]},${${"GLOBALS"}["camxbr"]},${${"GLOBALS"}["waenbcpxptsi"]});$this->result["debug"]=$prod->debug;if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]="error updating attribute : $pid attribut $attid decli $decli ".$prod->error;$this->result["debug"]=$prod->debug;}else$this->data=array();}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_prices($prodlist){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$prod->update_prices(${${"GLOBALS"}["tpxbljvy"]});$this->result["debug"]=$prod->debug;$this->result["debugprice"]=$prod->debugprice;if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]="error updating attribute : $pid attribut $attid decli $decli ".$prod->error;}$this->data=$prod->prodresult;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function save_image($filesarray){$cmlesl="dir";print"<p> entree ".print_r(${${"GLOBALS"}["ggexccgh"]},true)."</p>";${$cmlesl}=realpath(dirname(__FILE__)."/../tmp/")."/";foreach(${${"GLOBALS"}["ggexccgh"]} as${${"GLOBALS"}["onouqhbpkct"]}){${"GLOBALS"}["dntncjs"]="file";${"GLOBALS"}["ddpompuf"]="args";${"GLOBALS"}["nzusnhq"]="content";$klerovgtwcrj="args";$ypvosojcewj="args";${${"GLOBALS"}["dntncjs"]}=${${"GLOBALS"}["qjnqdmb"]}.${${"GLOBALS"}["ddpompuf"]}["name"];print"<p> traitement de ".${${"GLOBALS"}["amcidfxlp"]}."</p>";${${"GLOBALS"}["udnlowqv"]}=file_get_contents(${$ypvosojcewj}["data"]);if(${${"GLOBALS"}["nzusnhq"]}===false)print"<p> erreur lecture ".${$klerovgtwcrj}["name"]."</p>";else{$xdfwtibrsobj="lg";$yeevtv="file";${$xdfwtibrsobj}=file_put_contents(${$yeevtv},${${"GLOBALS"}["udnlowqv"]});$vlhygvuqie="file";if(${${"GLOBALS"}["nejpsleeyk"]}===false)print"<p> error creating ".${$vlhygvuqie}."</p>";}}return 1;}function get_categorie($catid,$custshopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$dftvobnsep="result";${"GLOBALS"}["epccmlmif"]="cat";$cjdqxewic="result";${${"GLOBALS"}["epccmlmif"]}=new WS_Category();${$cjdqxewic}=$cat->fetch(${${"GLOBALS"}["nuimlcihgqs"]},${${"GLOBALS"}["txjrmdihqkh"]});if(${$dftvobnsep}<0){$this->result["code"]=${${"GLOBALS"}["honslcbg"]};$this->result["message"]=$cat->error;}else$this->data=$cat->catresult;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_categorylist($catid,$limit=0,$custshopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$cithdxatr="cat";$idrufboumff="custshopid";${"GLOBALS"}["szmfuwmt"]="catid";${$cithdxatr}=new WS_Category();if($cat->get_cat_list(${${"GLOBALS"}["szmfuwmt"]},${${"GLOBALS"}["vbuulhqmp"]},${$idrufboumff})<0){$this->result["code"]=-1;$this->result["message"]=$cat->error;}else$this->data=$cat->liste;$this->result["sql"]=$cat->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_NewOrder($orderid="0",$limit="0",$shopid=0){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){$rqgsckcfpc="ord";${"GLOBALS"}["nfditjcag"]="shopid";$dgcrfqbdkry="limit";${"GLOBALS"}["jiqjqrlhp"]="result";${$rqgsckcfpc}=new WS_Order();${${"GLOBALS"}["jiqjqrlhp"]}=$ord->get_order_list(${${"GLOBALS"}["kbsxjtvhkgqq"]},${$dgcrfqbdkry},${${"GLOBALS"}["nfditjcag"]});if(${${"GLOBALS"}["honslcbg"]}>0){$this->data=$ord->order_list;}else{$this->result["code"]=-1;$this->result["message"]=$ord->error;}$this->result["sql"]=$ord->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_Order($orderid="0"){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${"GLOBALS"}["jrffwgqpek"]="orderid";${"GLOBALS"}["yruwpsohmf"]="ord";${"GLOBALS"}["ydbfhqivq"]="res";${${"GLOBALS"}["yruwpsohmf"]}=new WS_Order();${"GLOBALS"}["lfoaoyude"]="res";${${"GLOBALS"}["ydbfhqivq"]}=$ord->fetch(${${"GLOBALS"}["jrffwgqpek"]});if(${${"GLOBALS"}["lfoaoyude"]}>0){$this->data=$ord->order_data;}else{$yosjfsucjnh="res";$this->result["code"]=${$yosjfsucjnh};$this->result["message"]=" Error ".$ord->error;}$this->result["sql"]=$ord->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_status($ordid,$status){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$yyqtfiynk="status";if((!${$yyqtfiynk})||(!${${"GLOBALS"}["njwujlwlk"]})){$phnqdnflvos="status";$this->result["ord"]=${${"GLOBALS"}["njwujlwlk"]};$this->result["stat"]="status : ".${$phnqdnflvos}."erreur ";return${${"GLOBALS"}["rjkiynh"]};}else{${${"GLOBALS"}["vrndtmx"]}=new WS_Order();$ord->orders_id=${${"GLOBALS"}["njwujlwlk"]};${${"GLOBALS"}["honslcbg"]}=$ord->updatestatus(${${"GLOBALS"}["xjbfcukw"]});if(${${"GLOBALS"}["honslcbg"]}<0){$xxxjjsa="status";$this->result["ord"]=${${"GLOBALS"}["njwujlwlk"]};$this->result["stat"]="status : ".${$xxxjjsa}."erreur ".$ord->error;}}$this->result["sql"]=$ord->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_tracknum($orderid,$carrier_id,$tracknum,$message=''){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){if(empty(${${"GLOBALS"}["kbsxjtvhkgqq"]})||empty(${${"GLOBALS"}["kxiofammg"]})||empty(${${"GLOBALS"}["daejaicqwop"]})){$this->result["code"]=-1;$this->result["message"]="orderid, carrier_id and tracnum can not be empty";}else{${"GLOBALS"}["jxouwlnhg"]="ord";${${"GLOBALS"}["jxouwlnhg"]}=new WS_Order();${${"GLOBALS"}["honslcbg"]}=$ord->set_tracknum(${${"GLOBALS"}["kbsxjtvhkgqq"]},${${"GLOBALS"}["daejaicqwop"]},${${"GLOBALS"}["kxiofammg"]},${${"GLOBALS"}["ggnrfh"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]=$ord->error;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function send_invoice($order_id,$invoice_ref,$filesarray){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["ebcnluytflz"]="order_id";$fgdnan="order";${$fgdnan}=new WS_Order();if($order->fetch(${${"GLOBALS"}["ebcnluytflz"]})<0){$this->result["erreur"]="Error fetch order ".$order->error;$this->result["fichier"]="";return-1;}if(!${${"GLOBALS"}["pynkpv"]}){$this->result["erreur"]="No invoice ref";$this->result["fichier"]=${${"GLOBALS"}["pynkpv"]};return-1;}${"GLOBALS"}["rcubzkyrh"]="filesarray";${${"GLOBALS"}["qjnqdmb"]}=realpath(dirname(__FILE__)."/../tmp/");$ipypvucmn="args";foreach(${${"GLOBALS"}["rcubzkyrh"]} as${$ipypvucmn}){$kbbztpjsihj="dir";$ddmklyivlj="args";${"GLOBALS"}["htfnlz"]="file";$trultgkigt="dirdest";$vcncufdqx="args";${"GLOBALS"}["bqjlfnwnime"]="dirdest";$nqgkfcygnsr="lg";$exchetnbdeme="dirdest";${${"GLOBALS"}["amcidfxlp"]}=${$kbbztpjsihj}."/".${${"GLOBALS"}["onouqhbpkct"]}["name"];${"GLOBALS"}["mzxnspe"]="order_id";${$nqgkfcygnsr}=file_put_contents(${${"GLOBALS"}["htfnlz"]},file_get_contents(${$ddmklyivlj}["data"]));${${"GLOBALS"}["nxwtecpk"]}[]=array("file"=>${$vcncufdqx}["name"],"length"=>${${"GLOBALS"}["nejpsleeyk"]});if(!file_exists(${${"GLOBALS"}["amcidfxlp"]})){$this->result["code"]=1;$this->result["message"]=${${"GLOBALS"}["amcidfxlp"]}." absent";return-1;}${$exchetnbdeme}=$order->get_order_doc_dir(${${"GLOBALS"}["mzxnspe"]},"invoice");$bdggalz="file";if(!dirdest){$this->result["code"]=1;$this->result["message"]="Erreur dtermination rpertoire ".$order->error;return-1;}if(!is_dir(${${"GLOBALS"}["bqjlfnwnime"]})){if(!mkdir(${${"GLOBALS"}["mplaryts"]},0777,true)){$this->result["code"]=1;$this->result["message"]="Cration impossible $dirdest";return-1;}}if(!rename(${${"GLOBALS"}["amcidfxlp"]},${$trultgkigt}.basename(${$bdggalz}))){$this->result["code"]=1;$this->result["message"]="dplacement impossible ".${${"GLOBALS"}["mplaryts"]}.${${"GLOBALS"}["pynkpv"]}.".pdf";return-1;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_Client($custid='',$shopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["fowqiqsdtio"]="result";$memlbtg="result";${"GLOBALS"}["ndvjqbojb"]="cust";${${"GLOBALS"}["ndvjqbojb"]}=new WS_Customer();${${"GLOBALS"}["fowqiqsdtio"]}=$cust->fetch(${${"GLOBALS"}["ggxfjjs"]},${${"GLOBALS"}["cyhrzym"]});if(${$memlbtg}>0){$this->data=$cust->custdata;}else{$this->result["code"]=${${"GLOBALS"}["honslcbg"]};$this->result["message"]=$cust->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_newProspects($custid,$limit,$shopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["hnqivkqhqa"]="limit";$yhemmihlowzn="custid";$dbkxrne="result";${"GLOBALS"}["icgfjdbhois"]="cust";${"GLOBALS"}["bipnqwamgq"]="result";${${"GLOBALS"}["icgfjdbhois"]}=new WS_Customer();${${"GLOBALS"}["bipnqwamgq"]}=$cust->get_prospects_list(${$yhemmihlowzn},${${"GLOBALS"}["hnqivkqhqa"]},${${"GLOBALS"}["cyhrzym"]});if(${$dbkxrne}>0){$this->data=$cust->custlist;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function create_customer($tabcust){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$pgpwbvkdcvdi="tabcust";$fuhuppyy="tabcust";$yqwbermpio="tabcust";$wbswrhb="tabcust";if(!is_array(${$yqwbermpio})){$cipkjmbtx="tabcust";$this->result["message"]="tableau de paramtre n'est pas un array ".gettype(${$cipkjmbtx})." ".print_r(${${"GLOBALS"}["krpiwgmuqtmp"]},true);$this->result["code"]=1;}$svqenirxgc="tabcust";${${"GLOBALS"}["lkpqowclp"]}=new WS_Customer();$cust->email=${$pgpwbvkdcvdi}["email"];${"GLOBALS"}["tyhnpvkyml"]="tabcust";$cust->id_gender=convert_dol_civility(${$fuhuppyy}["gender"]);${"GLOBALS"}["prtfkdl"]="tabcust";$cust->lastname=${${"GLOBALS"}["krpiwgmuqtmp"]}["lastname"];$cust->firstname=${${"GLOBALS"}["prtfkdl"]}["firstname"];$cust->company=${$svqenirxgc}["company"];$cust->address1=${${"GLOBALS"}["tyhnpvkyml"]}["address1"];$mvndwoks="tabcust";$cust->address2=isset(${${"GLOBALS"}["krpiwgmuqtmp"]}["address2"])?${${"GLOBALS"}["krpiwgmuqtmp"]}["address2"]:"";$cust->postcode=${$mvndwoks}["postcode"];$cust->city=${${"GLOBALS"}["krpiwgmuqtmp"]}["city"];$cust->phone=${$wbswrhb}["phone"];$cust->phone_mobile=${${"GLOBALS"}["krpiwgmuqtmp"]}["phone_mobile"];$cust->country_iso_code=${${"GLOBALS"}["krpiwgmuqtmp"]}["country"];$cust->default_group=${${"GLOBALS"}["krpiwgmuqtmp"]}["default_group"];if($cust->test_cust_create()){$fqremvg="custshopid";${${"GLOBALS"}["txjrmdihqkh"]}=0;${${"GLOBALS"}["yfahhijg"]}=$cust->create_customer(${$fqremvg});if(!is_array(${${"GLOBALS"}["yfahhijg"]})){$this->result["code"]=1;$this->result["message"]="Error creating customer ".$cust->error;}else{$this->data["customer_id"]=${${"GLOBALS"}["yfahhijg"]}["id_cust"];$this->data["address_id"]=${${"GLOBALS"}["yfahhijg"]}["id_adr"];}}else{$this->result["code"]=1;$this->result["message"]="Error customer exists";}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_customer_group($custid,$groupid,$default=false){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$hiintwizsbj="groupid";$qwgcmsmhj="cust";${"GLOBALS"}["pgqrfbr"]="default";${$qwgcmsmhj}=new WS_Customer();if($cust->change_group(${${"GLOBALS"}["ggxfjjs"]},${$hiintwizsbj},${${"GLOBALS"}["pgqrfbr"]})<0){$this->result["code"]=1;$this->result["message"]="Erroro setting group ".$cust->error;}else{$this->data["custid"]=${${"GLOBALS"}["ggxfjjs"]};$this->data["defaultgroup"]=$cust->default_group;$this->data["groups"]=implode(";",$cust->groups);}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_customer($custid,$tabmod){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${${"GLOBALS"}["lkpqowclp"]}=new WS_Customer();if($cust->update_customer(${${"GLOBALS"}["ggxfjjs"]},${${"GLOBALS"}["fgwxjerwgp"]})<0){$this->result["code"]=1;$this->result["message"]="Erroro updatiing customer ".$cust->error;}$this->data["custid"]=${${"GLOBALS"}["ggxfjjs"]};$this->data["defaultgroup"]=$cust->default_group;$this->data["groups"]=implode(";",$cust->groups);}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_cust_adresses($custid){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$ronmpmvgovw="cust";$trkdtlvaox="custid";${$ronmpmvgovw}=new WS_Customer();if($cust->get_custadresses(${$trkdtlvaox})<0){$this->result["code"]=1;$this->result["message"]="Error getting customer adresses ".$cust->error;}$this->data=$cust->data;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}}
?>
Did this file decode correctly?
Original Code
/* Decoded by unphp.net */
<?php ${"GLOBALS"}["yfahhijg"]="id_tab";${"GLOBALS"}["lkpqowclp"]="cust";${"GLOBALS"}["krpiwgmuqtmp"]="tabcust";${"GLOBALS"}["ggxfjjs"]="custid";${"GLOBALS"}["mplaryts"]="dirdest";${"GLOBALS"}["pynkpv"]="invoice_ref";${"GLOBALS"}["ggnrfh"]="message";${"GLOBALS"}["daejaicqwop"]="tracknum";${"GLOBALS"}["kxiofammg"]="carrier_id";${"GLOBALS"}["vrndtmx"]="ord";${"GLOBALS"}["njwujlwlk"]="ordid";${"GLOBALS"}["kbsxjtvhkgqq"]="orderid";${"GLOBALS"}["nuimlcihgqs"]="catid";${"GLOBALS"}["tpxbljvy"]="prodlist";${"GLOBALS"}["waenbcpxptsi"]="price";${"GLOBALS"}["ivpbgliywf"]="decli";${"GLOBALS"}["bnunepg"]="attid";${"GLOBALS"}["vntbtfv"]="errors";${"GLOBALS"}["qlbeymapdmt"]="stockliste";${"GLOBALS"}["bjumjetl"]="qty";${"GLOBALS"}["uryvolexhkx"]="optionname";${"GLOBALS"}["pquxszes"]="idoption";${"GLOBALS"}["npuioymp"]="valuename";${"GLOBALS"}["xjbfcukw"]="status";${"GLOBALS"}["emhdxrfxrjl"]="pid";${"GLOBALS"}["keecpjl"]="attributeid";${"GLOBALS"}["swdirlokxcik"]="idshop";${"GLOBALS"}["fmbtfhbk"]="prd";${"GLOBALS"}["qjnqdmb"]="dir";${"GLOBALS"}["nejpsleeyk"]="lg";${"GLOBALS"}["udnlowqv"]="content";${"GLOBALS"}["onouqhbpkct"]="args";${"GLOBALS"}["amcidfxlp"]="file";${"GLOBALS"}["ggexccgh"]="filesarray";${"GLOBALS"}["wkoscw"]="cover";${"GLOBALS"}["jezoagpo"]="id_attribute";${"GLOBALS"}["isqgxqntffc"]="id_product";${"GLOBALS"}["nxwtecpk"]="data";${"GLOBALS"}["yqqnvf"]="elt";${"GLOBALS"}["flmgiszj"]="productlist";${"GLOBALS"}["fgwxjerwgp"]="tabmod";${"GLOBALS"}["nwbjvud"]="idattribute";${"GLOBALS"}["ufuiujabn"]="idprod";${"GLOBALS"}["bogjtuyy"]="prod";${"GLOBALS"}["vbuulhqmp"]="limit";${"GLOBALS"}["txjrmdihqkh"]="custshopid";${"GLOBALS"}["egdejbyit"]="prodid";${"GLOBALS"}["ippczqriv"]="productclass";${"GLOBALS"}["honslcbg"]="result";${"GLOBALS"}["mivvzbnnkqv"]="paramsclass";${"GLOBALS"}["zbfamjc"]="config";${"GLOBALS"}["ippjbhtzk"]="sum32";${"GLOBALS"}["yujkio"]="b";${"GLOBALS"}["oelyvlt"]="sum";${"GLOBALS"}["tshyyy"]="str";${"GLOBALS"}["qfiedmgchu"]="a";${"GLOBALS"}["gpeqmhviimr"]="extrabit";${"GLOBALS"}["nxlhref"]="i";${"GLOBALS"}["frgvko"]="p1len";${"GLOBALS"}["pridwkwe"]="p1str";${"GLOBALS"}["lorcgda"]="software";${"GLOBALS"}["ekyvvucfj"]="fullcode";${"GLOBALS"}["xpdqvol"]="extendedcode";${"GLOBALS"}["sxmgyglfkd"]="initcode";${"GLOBALS"}["aguriwiw"]="initlen";${"GLOBALS"}["qkoeoqw"]="thislen";${"GLOBALS"}["ylhouspu"]="name";${"GLOBALS"}["mkwvdf"]="serial";${"GLOBALS"}["cyhrzym"]="shopid";${"GLOBALS"}["iqejdcdpnsh"]="row";${"GLOBALS"}["pxbpcdwph"]="sql";${"GLOBALS"}["rjkiynh"]="res";${"GLOBALS"}["syhopn"]="urls";${"GLOBALS"}["tjihupydl"]="protocolos";${"GLOBALS"}["fzuyffwxrj"]="url";$aotetbwllf="path";$yewphfe="path";$hnckxmmz="path";$jiuieonc="path";${$yewphfe}=dirname(__FILE__);${"GLOBALS"}["wjitymx"]="path";$vmzuhyyqqox="path";${${"GLOBALS"}["wjitymx"]}=realpath(${$hnckxmmz}."/../");${"GLOBALS"}["umumkfyc"]="path";${"GLOBALS"}["pwhtxtucgfe"]="path";$ejhowzimsqot="path";require_once(${$vmzuhyyqqox}."/lib/dolicom.lib.php");require_once(${$jiuieonc}."/class/ws_params.class.php");require_once(${$aotetbwllf}."/class/ws_products.class.php");require_once(${$ejhowzimsqot}."/class/ws_categories.class.php");require_once(${${"GLOBALS"}["umumkfyc"]}."/class/ws_orders.class.php");require_once(${${"GLOBALS"}["pwhtxtucgfe"]}."/class/ws_customers.class.php");Class ws_Doli{var$result;var$data;var$key='';var$softname='';var$debug=false;var$log=false;var$keylen=20;var$logstring;function __construct($soft=''){$nxjwsrvuty="soft";$this->result=array();$this->data=array();$tnewhqxpeyvu="soft";$this->softname=${$nxjwsrvuty};if(!${$tnewhqxpeyvu}){$this->softname=get_soft_name();}$this->key=get_key();return 1;}function key_isvalid(){${${"GLOBALS"}["fzuyffwxrj"]}=$_SERVER["HTTP_HOST"];$nmvjuzmpt="url";${"GLOBALS"}["keopddf"]="protocolos";${"GLOBALS"}["tejwdcqnvff"]="urls";if(Configuration::get("PS_MULTISHOP_FEATURE_ACTIVE")){${${"GLOBALS"}["fzuyffwxrj"]}=$this->getmainshopurl();if($this->log)$this->logstring.="shop ".$_SERVER["HTTP_HOST"]." base ".${${"GLOBALS"}["fzuyffwxrj"]}."
";if($this->log)$this->logstring.="multishop est actif"."
";return true;}else if($this->log)$this->logstring.="multishop dsactiv"."
";${${"GLOBALS"}["tjihupydl"]}=array("http://","https://","ftp://","www.");${${"GLOBALS"}["syhopn"]}=explode("/",str_replace(${${"GLOBALS"}["keopddf"]},"",${$nmvjuzmpt}));${"GLOBALS"}["sxfqyruoavu"]="res";${${"GLOBALS"}["fzuyffwxrj"]}=${${"GLOBALS"}["tejwdcqnvff"]}[0];${${"GLOBALS"}["rjkiynh"]}=$this->_codeValidate($this->key,${${"GLOBALS"}["fzuyffwxrj"]});if($this->log)$this->logstring.=__FUNCTION__." result $res url $url key ".$this->key;return${${"GLOBALS"}["sxfqyruoavu"]};}function getmainshopurl(){${${"GLOBALS"}["pxbpcdwph"]}="SELECT domain, domain_ssl FROM "._DB_PREFIX_."shop_url
WHERE main = 1
AND id_shop = 1";${${"GLOBALS"}["iqejdcdpnsh"]}=Db::getInstance()->getRow(${${"GLOBALS"}["pxbpcdwph"]});return${${"GLOBALS"}["iqejdcdpnsh"]}["domain"];}function get_shopid(){$qfxexcbx="shopid";if(Configuration::get("PS_MULTISHOP_FEATURE_ACTIVE")){if(Shop::isFeatureActive()){$tihcjzdyim="shopid";${$tihcjzdyim}=Shop::getContextShopID();}}else${$qfxexcbx}=0;return${${"GLOBALS"}["cyhrzym"]};}function get_shopid2byte(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$mofgfjsvd="sql";$lgpvdyqt="sql";${${"GLOBALS"}["pxbpcdwph"]}="SELECT s.id_shop as shop_id, s.name as shop_name";${"GLOBALS"}["wdlbqntnu"]="sql";${${"GLOBALS"}["wdlbqntnu"]}.=" FROM "._DB_PREFIX_."shop s";${$mofgfjsvd}.=" WHERE s.active=1";$fozbigc="result";$blxnxyu="sql";${$lgpvdyqt}.=" ORDER BY s.id_shop ASC";if(!${$fozbigc}=Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(${$blxnxyu})){$this->result["code"]=-1;$this->result["message"]="Error: request ".${${"GLOBALS"}["pxbpcdwph"]}.": ".Db::getInstance()->getMsgError();}else{${"GLOBALS"}["krnghkh"]="result";$this->data=${${"GLOBALS"}["krnghkh"]};$this->result["sql"]=${${"GLOBALS"}["pxbpcdwph"]};}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}private function _get_domain(){$avgktl="url";${$avgktl}=getUrl();${"GLOBALS"}["iglxsfbyfj"]="url";$ecpiubqh="url";${"GLOBALS"}["tseyetbxsy"]="url";${${"GLOBALS"}["tjihupydl"]}=array("http://","https://","ftp://","www.");${${"GLOBALS"}["tseyetbxsy"]}=explode("/",str_replace(${${"GLOBALS"}["tjihupydl"]},"",${$ecpiubqh}));return${${"GLOBALS"}["iglxsfbyfj"]}[0];}function _codeValidate($serial,$name=""){${"GLOBALS"}["megdyb"]="serial";$utwruhgienj="name";${"GLOBALS"}["mkgzhdcmpbk"]="serial";${"GLOBALS"}["osnkmkvx"]="serial";${"GLOBALS"}["jybofp"]="serial";if(empty(${${"GLOBALS"}["mkwvdf"]})||${${"GLOBALS"}["osnkmkvx"]}==""){$unpscqbl="name";$znkhptdrwdk="name";if(${$znkhptdrwdk}=="localhost"||${$unpscqbl}=="docker.local"){return true;}else{return false;}}${"GLOBALS"}["ybmmvtjgfj"]="name";if(${${"GLOBALS"}["ylhouspu"]}=="docker.local")return true;$zyibmpyb="extendedcode";if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["mkwvdf"]}." url ".${$utwruhgienj}."</p>";if($this->log)$this->logstring.="
".__FUNCTION__."::cl ".${${"GLOBALS"}["mkgzhdcmpbk"]}." url ".${${"GLOBALS"}["ybmmvtjgfj"]}."
";${"GLOBALS"}["xlnoebu"]="serial";${${"GLOBALS"}["mkwvdf"]}=str_replace("-","",${${"GLOBALS"}["mkwvdf"]});${${"GLOBALS"}["mkwvdf"]}=strtoupper(${${"GLOBALS"}["megdyb"]});${"GLOBALS"}["klqfqqcoovn"]="thislen";${"GLOBALS"}["kktaaauzelua"]="initlen";$xewrwbzpahur="serial";${${"GLOBALS"}["mkwvdf"]}=str_replace(array("0","1","O","I",),array("","","","",),${${"GLOBALS"}["mkwvdf"]});${${"GLOBALS"}["klqfqqcoovn"]}=strlen(${${"GLOBALS"}["xlnoebu"]});if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["jybofp"]}." longueur ".$this->keylen." reel ".${${"GLOBALS"}["qkoeoqw"]}."</p>";$tuwwmrq="thislen";if($this->keylen<>${$tuwwmrq})return false;${${"GLOBALS"}["aguriwiw"]}=$this->_initLen();if($this->debug)print"<p>".__FUNCTION__."::cl ".${$xewrwbzpahur}." initlen ".${${"GLOBALS"}["kktaaauzelua"]}."</p>";${${"GLOBALS"}["sxmgyglfkd"]}=substr(${${"GLOBALS"}["mkwvdf"]},0,${${"GLOBALS"}["aguriwiw"]});$rmdkdbqzi="serial";if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["mkwvdf"]}." initcode ".${${"GLOBALS"}["sxmgyglfkd"]}."</p>";${${"GLOBALS"}["xpdqvol"]}=$this->_extendCode(${${"GLOBALS"}["sxmgyglfkd"]},${${"GLOBALS"}["ylhouspu"]});if($this->debug)print"<p>".__FUNCTION__."::cl ".${$rmdkdbqzi}." extendcode ".${${"GLOBALS"}["xpdqvol"]}."</p>";$beeorymjb="fullcode";${${"GLOBALS"}["ekyvvucfj"]}=substr(${$zyibmpyb},0,$this->keylen);if($this->debug)print"<p>".__FUNCTION__."::cl ".${${"GLOBALS"}["mkwvdf"]}." fullcode ".${${"GLOBALS"}["ekyvvucfj"]}."</p>";if(${$beeorymjb}==${${"GLOBALS"}["mkwvdf"]})return true;else return false;}function _extendCode($initcode,$name=''){${"GLOBALS"}["wiimheafu"]="p1str";${"GLOBALS"}["grgabsxi"]="software";${"GLOBALS"}["qdgkidomjjhq"]="p1str";$rtaspp="software";${"GLOBALS"}["levmmd"]="p1str";${"GLOBALS"}["ykynxp"]="name";${"GLOBALS"}["etvqedmipev"]="initcode";$kbonndxosw="extrabit";${"GLOBALS"}["jwbywpbt"]="extrabit";${"GLOBALS"}["ylpgskc"]="p1str";${${"GLOBALS"}["grgabsxi"]}=$this->softname;${${"GLOBALS"}["qdgkidomjjhq"]}=$this->_sumDigit(${${"GLOBALS"}["etvqedmipev"]});if($this->debug)print"<p>code ".${${"GLOBALS"}["sxmgyglfkd"]}." name ".${${"GLOBALS"}["ykynxp"]}." soft ".${${"GLOBALS"}["lorcgda"]}." plstr ".${${"GLOBALS"}["levmmd"]}."</p>";${${"GLOBALS"}["wiimheafu"]}.=$this->_add32(${${"GLOBALS"}["sxmgyglfkd"]},${${"GLOBALS"}["ylhouspu"]}.${$rtaspp}."abhishek");${${"GLOBALS"}["pridwkwe"]}=strtoupper(${${"GLOBALS"}["ylpgskc"]});${${"GLOBALS"}["pridwkwe"]}=str_replace(array("0","1","O","I",),array("","","","",),${${"GLOBALS"}["pridwkwe"]});${${"GLOBALS"}["frgvko"]}=strlen(${${"GLOBALS"}["pridwkwe"]});${$kbonndxosw}="";${${"GLOBALS"}["nxlhref"]}=0;while(strlen(${${"GLOBALS"}["jwbywpbt"]})<$this->keylen-2){${"GLOBALS"}["lbppkmhd"]="extrabit";$fvmczppmlx="i";${"GLOBALS"}["xbrplyvic"]="p1str";${"GLOBALS"}["pwrurs"]="i";${${"GLOBALS"}["lbppkmhd"]}.=substr(${${"GLOBALS"}["xbrplyvic"]},${$fvmczppmlx},1);${${"GLOBALS"}["gpeqmhviimr"]}.=substr(${${"GLOBALS"}["pridwkwe"]},${${"GLOBALS"}["frgvko"]}-${${"GLOBALS"}["pwrurs"]}-1,1);${${"GLOBALS"}["nxlhref"]}++;}return${${"GLOBALS"}["sxmgyglfkd"]}.${${"GLOBALS"}["gpeqmhviimr"]}."6F75";}function _sumDigit($str){${"GLOBALS"}["gimrekulj"]="sum";${${"GLOBALS"}["qfiedmgchu"]}=str_split(${${"GLOBALS"}["tshyyy"]});$mnfvuxxgp="i";${"GLOBALS"}["bdeitj"]="sum";${${"GLOBALS"}["gimrekulj"]}=0;for(${${"GLOBALS"}["nxlhref"]}=0;${${"GLOBALS"}["nxlhref"]}<count(${${"GLOBALS"}["qfiedmgchu"]});${$mnfvuxxgp}++)${${"GLOBALS"}["oelyvlt"]}=${${"GLOBALS"}["oelyvlt"]}+base_convert(${${"GLOBALS"}["qfiedmgchu"]}[${${"GLOBALS"}["nxlhref"]}],36,10);${"GLOBALS"}["xggufpq"]="sum";${${"GLOBALS"}["xggufpq"]}=str_replace(array("0","1","O","I","o","i"),array("AZ","BY","29","38","29","38",),${${"GLOBALS"}["bdeitj"]});return${${"GLOBALS"}["oelyvlt"]};}function _add32($a,$b){${"GLOBALS"}["dyifrlpejxk"]="sum";$hyrqpcmu="sum32";$fpbhlevx="sum32";${${"GLOBALS"}["oelyvlt"]}=base_convert(${${"GLOBALS"}["qfiedmgchu"]},36,10)+base_convert(${${"GLOBALS"}["yujkio"]},36,10);$cpcswixfk="sum32";${$hyrqpcmu}=base_convert(${${"GLOBALS"}["dyifrlpejxk"]},10,36);${${"GLOBALS"}["ippjbhtzk"]}=str_replace(array("0","1","O","I","o","i"),array("","","","","","",),${$fpbhlevx});if($this->debug)echo" ADD32 $a + $b = $sum32<br/>";return${$cpcswixfk};}function _initLen(){$yxhuxulfop="initlen";${"GLOBALS"}["tufscbgcsa"]="initlen";$dfdxew="initlen";${${"GLOBALS"}["tufscbgcsa"]}=intval($this->keylen/3);${$yxhuxulfop}=max(${$dfdxew},1);return${${"GLOBALS"}["aguriwiw"]};}function get_module_info(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$this->data["module_version"]=get_module_version();$this->data["ecom_version"]=get_cms_version();$this->data["ecommerce"]=get_cms_type();$ijdldforkzg="dims";$this->data["invoicedir"]=get_invoicedir();$this->data["facture"]="invoicepath";${"GLOBALS"}["qutdlmj"]="dims";$this->data["params"]=${${"GLOBALS"}["zbfamjc"]};$this->data["key"]=$this->key;$this->data["idshop"]=$this->get_shopid();$pxnkth="dims";${$ijdldforkzg}=get_units();$this->data["weight_unit"]=${${"GLOBALS"}["qutdlmj"]}["weight_unit"];$this->data["length_unit"]=${$pxnkth}["length_unit"];}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}if($this->log)$this->result["log"]=$this->logstring;return 1;}function get_shopsid(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$ejmibsvent="sql";${$ejmibsvent}="SELECT s.id_shop as shop_id, s.name as shop_name";${"GLOBALS"}["qisntic"]="sql";$hpdezsykgx="sql";${${"GLOBALS"}["qisntic"]}.=" FROM "._DB_PREFIX_."shop s";${${"GLOBALS"}["pxbpcdwph"]}.=" WHERE s.active=1";${"GLOBALS"}["ugvvzwsu"]="sql";${"GLOBALS"}["unshhpqwjm"]="result";${${"GLOBALS"}["ugvvzwsu"]}.=" ORDER BY s.id_shop ASC";if(!${${"GLOBALS"}["unshhpqwjm"]}=Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(${$hpdezsykgx})){$this->result["code"]=1;$this->result["message"]=Db::getInstance()->getMsgError();}else{$sywjrgfojpyd="result";$this->data["shops"]=${$sywjrgfojpyd};}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}if($this->log)$this->result["log"]=$this->logstring;return 1;}function get_taxes(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["lrewbcswfhc"]="paramsclass";${"GLOBALS"}["ftwspkjudi"]="res";${${"GLOBALS"}["lrewbcswfhc"]}=new WS_Params();$mrdcxdpt="res";${${"GLOBALS"}["ftwspkjudi"]}=$paramsclass->get_taxes();if(${$mrdcxdpt}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_methodes_exped(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["incooymkd"]="paramsclass";${${"GLOBALS"}["incooymkd"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_meth_expedition();$kcqlkktf="res";if(${$kcqlkktf}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_customertypes(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${${"GLOBALS"}["mivvzbnnkqv"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_customer_types();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_suppliers(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$vipkgvsq="res";$xwigpry="res";${"GLOBALS"}["ghfolxbtdr"]="paramsclass";${${"GLOBALS"}["ghfolxbtdr"]}=new WS_Params();${$vipkgvsq}=$paramsclass->get_suppliers();if(${$xwigpry}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_languages(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["ldhykwzh"]="paramsclass";${"GLOBALS"}["yjswoir"]="res";$jycixulyk="res";${${"GLOBALS"}["ldhykwzh"]}=new WS_Params();${$jycixulyk}=$paramsclass->get_languages();if(${${"GLOBALS"}["yjswoir"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_paymentmethods(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["euvqxcbgykk"]="res";${${"GLOBALS"}["mivvzbnnkqv"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_paymentmethods();if(${${"GLOBALS"}["euvqxcbgykk"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}$this->result["debug"]=$paramsclass->debug;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_manufacturers(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$xfqvmnhgjulo="paramsclass";${$xfqvmnhgjulo}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_manufacturers();${"GLOBALS"}["gcwxbkiuol"]="res";if(${${"GLOBALS"}["gcwxbkiuol"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_orderstatus(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$jzyzejz="paramsclass";$riigoeqbml="res";${$jzyzejz}=new WS_Params();${$riigoeqbml}=$paramsclass->get_orderstatus();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_options(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["uotdstaxute"]="paramsclass";${${"GLOBALS"}["uotdstaxute"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_prodoptions();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_optionsvals(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["vfvurrxp"]="res";${"GLOBALS"}["fezyso"]="paramsclass";${${"GLOBALS"}["fezyso"]}=new WS_Params();${${"GLOBALS"}["rjkiynh"]}=$paramsclass->get_prodoptionvals();if(${${"GLOBALS"}["vfvurrxp"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_features(){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["vxndgip"]="res";${"GLOBALS"}["wltcecskdz"]="paramsclass";${${"GLOBALS"}["wltcecskdz"]}=new WS_Params();${${"GLOBALS"}["vxndgip"]}=$paramsclass->get_product_features();if(${${"GLOBALS"}["rjkiynh"]}>0)$this->data=$paramsclass->param_datas;else{$this->result["code"]=-1;$this->result["message"]=$paramsclass->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_article($id='',$attribut='',$ref='',$attributid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["mznrmpt"]="id";$xbnbvvlrbk="productclass";${"GLOBALS"}["ecxsedaednm"]="attribut";${"GLOBALS"}["ckcxlslcrg"]="attributid";${"GLOBALS"}["yjsdghvgej"]="ref";${$xbnbvvlrbk}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$productclass->fetch(${${"GLOBALS"}["mznrmpt"]},${${"GLOBALS"}["yjsdghvgej"]},${${"GLOBALS"}["ecxsedaednm"]},${${"GLOBALS"}["ckcxlslcrg"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]=$productclass->error;}else{$this->data=$productclass->prodresult;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_article_info($prodid,$custshopid=0,$limit=0){$this->result["code"]=0;$this->result["message"]="";$this->result["debug"]="prodid $prodid shopid $custshopid
";if($this->key_isvalid($this->key)){${${"GLOBALS"}["ippczqriv"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$productclass->get_article_info(${${"GLOBALS"}["egdejbyit"]},${${"GLOBALS"}["txjrmdihqkh"]},${${"GLOBALS"}["vbuulhqmp"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=${${"GLOBALS"}["honslcbg"]};$this->result["message"]=$productclass->error;}else$this->data=$productclass->products_list;$this->result["sql"]=$productclass->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_new_products($pid,$limit='1',$shopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$ftdjdfemuph="shopid";${"GLOBALS"}["kpwzqjbpkgg"]="pid";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();if($prod->get_products_list(${${"GLOBALS"}["kpwzqjbpkgg"]},${${"GLOBALS"}["vbuulhqmp"]},${$ftdjdfemuph})<1){$this->result["code"]=-1;$this->result["message"]="Error ".$prod->error;}else$this->data=$prod->products_list;$this->result["sql"]=$prod->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_productimages($idprod,$idattribute,$ref){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["jpyxpw"]="ref";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();if($prod->get_products_images(${${"GLOBALS"}["ufuiujabn"]},${${"GLOBALS"}["nwbjvud"]},${${"GLOBALS"}["jpyxpw"]})<1){$this->result["code"]=-1;$this->result["message"]="Error ".$prod->error;}else$this->data=$prod->products_list;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function modif_article($tabmod,$prodid){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$jdjarzrkcpae="prod";${"GLOBALS"}["hlfxfeg"]="prodid";${$jdjarzrkcpae}=new WS_Product();if($prod->updateproduct(${${"GLOBALS"}["hlfxfeg"]},${${"GLOBALS"}["fgwxjerwgp"]})<0){$this->result["code"]=1;$this->result["message"]=$prod->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}$this->result["debug"]=$prod->debug;return 1;}function update_productlist($productlist){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$mwnrwirwyu="productlist";$fpmwbnfdyu="elt";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();if(!is_array(${${"GLOBALS"}["flmgiszj"]})){$this->result["code"]=-11;$this->result["message"]="No list to treat";return-1;}foreach(${$mwnrwirwyu} as${$fpmwbnfdyu}){$urlfqpwaaoo="elt";if($prod->updateproduct(${${"GLOBALS"}["yqqnvf"]}["prodid"],${$urlfqpwaaoo}["datas"])<0){$xbpjmrcv="elt";$gkvorcqi="elt";$this->data[]=array("prodid"=>${${"GLOBALS"}["yqqnvf"]}["prodid"],"attributeid"=>${$xbpjmrcv}["datas"]["attributid"],"code"=>1,"message"=>$prod->error,"result"=>${$gkvorcqi});}else{${"GLOBALS"}["rqdgxxml"]="elt";$this->data[]=array("prodid"=>${${"GLOBALS"}["yqqnvf"]}["prodid"],"attributeid"=>${${"GLOBALS"}["rqdgxxml"]}["datas"]["attributid"],"code"=>0,"message"=>"","result"=>${${"GLOBALS"}["yqqnvf"]});}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}$this->result["debug"]=$prod->debug;return 1;}function modif_article_old($tabmod,$prodid){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$kslfftbrt="tabmod";$mjsmkferciw="tabmod";${"GLOBALS"}["hvspwpbymi"]="prod";$hiedvnc="tabmod";${${"GLOBALS"}["hvspwpbymi"]}=new WS_Product();${"GLOBALS"}["epdtkyvuyi"]="tabmod";$prod->id_product=${${"GLOBALS"}["egdejbyit"]};${"GLOBALS"}["xdrdwqgb"]="tabmod";$ehdvkfhxg="tabmod";$hvtlvam="tabmod";if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["price"]))$prod->price=${${"GLOBALS"}["fgwxjerwgp"]}["price"];else$prod->price=null;$hzuanhtk="tabmod";$uhbvdicaj="tabmod";$gwpbuehyfb="tabmod";$gupcem="tabmod";${"GLOBALS"}["aodsonfpdtkb"]="data";if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["quantity"]))$prod->quantity=${${"GLOBALS"}["epdtkyvuyi"]}["quantity"];if(is_numeric(${$gwpbuehyfb}["weight"]))$prod->weight=${$kslfftbrt}["weight"];if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["categ"]))$prod->categ_id=${${"GLOBALS"}["fgwxjerwgp"]}["categ"];${"GLOBALS"}["xrrxvbe"]="tabmod";if(is_numeric(${${"GLOBALS"}["fgwxjerwgp"]}["ecotax"]))$prod->ecotax_rate=${$ehdvkfhxg}["ecotax"];$xyugpm="tabmod";if(is_numeric(${$mjsmkferciw}["taxid"]))$prod->tax_id=${${"GLOBALS"}["fgwxjerwgp"]}["taxid"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["features"]))$prod->features=${${"GLOBALS"}["fgwxjerwgp"]}["features"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["declinaison"]))$prod->declinaison=${$xyugpm}["declinaison"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["name"]))$prod->name=${${"GLOBALS"}["xrrxvbe"]}["name"];if(isset(${$hzuanhtk}["desc_short"]))$prod->description_short=${${"GLOBALS"}["fgwxjerwgp"]}["desc_short"];if(isset(${$uhbvdicaj}["long_desc"]))$prod->description=${$hvtlvam}["long_desc"];if(isset(${${"GLOBALS"}["fgwxjerwgp"]}["qtymini"]))$prod->qtymini=${${"GLOBALS"}["xdrdwqgb"]}["qtymini"];if($prod->updateproduct(${$gupcem}["attributid"],${${"GLOBALS"}["fgwxjerwgp"]}["custshopid"])<0){$this->result["code"]=1;$this->result["message"]=$prod->error;$this->result["debug"]=$prod->debug;return-1;}$this->result["debug"]=$prod->debug;${${"GLOBALS"}["aodsonfpdtkb"]}["sql"]="pas de select";${${"GLOBALS"}["nxwtecpk"]}["result"]=print_r(${${"GLOBALS"}["fgwxjerwgp"]},true);${${"GLOBALS"}["nxwtecpk"]}["prix"]=${${"GLOBALS"}["fgwxjerwgp"]}["price"]." - ".$prod->price;${${"GLOBALS"}["nxwtecpk"]}["qte"]=${$hiedvnc}["quantity"]." - ".$prod->quantity;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function replace_image($id_product,$id_attribute=0,$filesarray=array()){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$xhgtnxbelti="dir";${"GLOBALS"}["yhtfsppadhw"]="prd";${$xhgtnxbelti}=realpath(dirname(__FILE__)."/../tmp/")."/";${${"GLOBALS"}["yhtfsppadhw"]}=new WS_Product();if($prd->delete_product_images(${${"GLOBALS"}["isqgxqntffc"]},${${"GLOBALS"}["jezoagpo"]})<0){$this->result["code"]=-1;$this->result["message"].=$prd->error."
";}else{${"GLOBALS"}["uiifkrkjq"]="args";${${"GLOBALS"}["wkoscw"]}=1;foreach(${${"GLOBALS"}["ggexccgh"]} as${${"GLOBALS"}["uiifkrkjq"]}){$zeuktvh="file";${"GLOBALS"}["wwscge"]="dir";${${"GLOBALS"}["amcidfxlp"]}=${${"GLOBALS"}["wwscge"]}.${${"GLOBALS"}["onouqhbpkct"]}["name"];${"GLOBALS"}["gtpeprvl"]="content";${${"GLOBALS"}["udnlowqv"]}=file_get_contents(${${"GLOBALS"}["onouqhbpkct"]}["data"]);${"GLOBALS"}["vyedaxjuue"]="cover";if(${${"GLOBALS"}["gtpeprvl"]}===false)${${"GLOBALS"}["nxwtecpk"]}["error"]="error reading data for ".${$zeuktvh};else{${"GLOBALS"}["yocvfdc"]="file";${"GLOBALS"}["fmwdibkcotpk"]="data";$qdrbvf="content";${"GLOBALS"}["eksjmejmkc"]="file";${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${${"GLOBALS"}["eksjmejmkc"]},${$qdrbvf});${"GLOBALS"}["qmlpkpjvpl"]="lg";if(${${"GLOBALS"}["qmlpkpjvpl"]}===false)${${"GLOBALS"}["fmwdibkcotpk"]}["error"].="error writing data for ".${${"GLOBALS"}["yocvfdc"]}." ".strlen(${${"GLOBALS"}["udnlowqv"]});else{${"GLOBALS"}["yuhrrsb"]="lg";$bmiqwg="id_product";${"GLOBALS"}["xbroksqmpe"]="args";$ykwumwbdwcuu="data";${$ykwumwbdwcuu}[]=array("file"=>${${"GLOBALS"}["xbroksqmpe"]}["name"],"length"=>${${"GLOBALS"}["yuhrrsb"]});if($prd->add_product_image(${${"GLOBALS"}["amcidfxlp"]},${$bmiqwg},${${"GLOBALS"}["jezoagpo"]},${${"GLOBALS"}["wkoscw"]})<0){$obvttve="data";${$obvttve}["error"].=$prd->error."
";}}}${${"GLOBALS"}["vyedaxjuue"]}=0;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function replace_documents($id_product,$id_attribute=0,$filesarray=array()){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${${"GLOBALS"}["qjnqdmb"]}=dirname(__FILE__)."/../tmp/";${${"GLOBALS"}["fmbtfhbk"]}=new WS_Product();$xkmsugvigl="id_product";if($prd->delete_product_documents(${$xkmsugvigl},${${"GLOBALS"}["jezoagpo"]})<0){$this->result["code"]=-1;$this->result["message"].=$prd->error."
";}else{${"GLOBALS"}["fqvqqmx"]="filesarray";foreach(${${"GLOBALS"}["fqvqqmx"]} as${${"GLOBALS"}["onouqhbpkct"]}){${"GLOBALS"}["icyupdk"]="id_product";${"GLOBALS"}["krxbrskoi"]="args";$nlpdtvcb="id_attribute";${${"GLOBALS"}["amcidfxlp"]}=${${"GLOBALS"}["qjnqdmb"]}.${${"GLOBALS"}["krxbrskoi"]}["name"];${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${${"GLOBALS"}["amcidfxlp"]},file_get_contents(${${"GLOBALS"}["onouqhbpkct"]}["data"]));if($prd->add_product_doc(${${"GLOBALS"}["amcidfxlp"]},${${"GLOBALS"}["icyupdk"]},${$nlpdtvcb})<0){${${"GLOBALS"}["nxwtecpk"]}["error"].=$prd->error."
";}}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function send_article($prod,$filesarray=array(),$docsarray=array(),$idshop=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["hjriwm"]="prod";$this->data=array("article"=>0,"error"=>"");${"GLOBALS"}["bogqwkg"]="dir";$yduqtqvvn="res";${"GLOBALS"}["iufefvts"]="id_product";$hvlbduyqa="docsarray";${"GLOBALS"}["tapujbwluo"]="attributeid";${${"GLOBALS"}["fmbtfhbk"]}=new WS_Product();${${"GLOBALS"}["rjkiynh"]}=$prd->create(${${"GLOBALS"}["bogjtuyy"]},${${"GLOBALS"}["swdirlokxcik"]});if(${$yduqtqvvn}<0){$this->data["article"]=-1;$this->result["message"]=$prd->error;$this->result["code"]=-1;$this->result["debug"]=$prd->debug;return-1;}$this->data=$prd->prodresult;$this->result["debugdoliclass"]=print_r(${${"GLOBALS"}["bogjtuyy"]},true)." shopid $idshop";if(${${"GLOBALS"}["rjkiynh"]}==2){$this->result["message"]="produit dj existant";$this->result["debug"]=$prd->debug;return 1;}${${"GLOBALS"}["iufefvts"]}=$prd->prodresult["productid"];${${"GLOBALS"}["tapujbwluo"]}=$prd->prodresult["attributeid"];$this->result["debug"]=$prd->debug;${${"GLOBALS"}["bogqwkg"]}=realpath(dirname(__FILE__)."/../tmp/")."/";if(empty(${${"GLOBALS"}["hjriwm"]}["modelid"])||${${"GLOBALS"}["bogjtuyy"]}["modelid"]==-1)${${"GLOBALS"}["wkoscw"]}=1;foreach(${${"GLOBALS"}["ggexccgh"]} as${${"GLOBALS"}["onouqhbpkct"]}){$lcjusiimss="args";$vmibcpfdrcb="content";${"GLOBALS"}["hkdmoojdwx"]="file";${${"GLOBALS"}["hkdmoojdwx"]}=${${"GLOBALS"}["qjnqdmb"]}.${$lcjusiimss}["name"];${$vmibcpfdrcb}=file_get_contents(${${"GLOBALS"}["onouqhbpkct"]}["data"]);if(${${"GLOBALS"}["udnlowqv"]}===false)$this->data["error"]="error reading data for ".${${"GLOBALS"}["amcidfxlp"]};else{${"GLOBALS"}["usmqddxfjf"]="id_product";${"GLOBALS"}["mtoynrcx"]="file";$qkdplfyygv="cover";${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${${"GLOBALS"}["mtoynrcx"]},${${"GLOBALS"}["udnlowqv"]});if(${${"GLOBALS"}["nejpsleeyk"]}===false)$this->data["error"]="error creating ".${${"GLOBALS"}["amcidfxlp"]};elseif($prd->add_product_image(${${"GLOBALS"}["amcidfxlp"]},${${"GLOBALS"}["usmqddxfjf"]},${${"GLOBALS"}["keecpjl"]},${${"GLOBALS"}["wkoscw"]})<0){$this->data["error"].=$prd->error."
";}else${$qkdplfyygv}=0;}}foreach(${$hvlbduyqa} as${${"GLOBALS"}["onouqhbpkct"]}){$utxtkkzwht="content";${"GLOBALS"}["uhrkytts"]="content";$gphmlj="args";$usfnol="dir";${"GLOBALS"}["lpqkliht"]="file";${"GLOBALS"}["cdeqekbwhd"]="file";${${"GLOBALS"}["lpqkliht"]}=${$usfnol}.${${"GLOBALS"}["onouqhbpkct"]}["name"];${$utxtkkzwht}=file_get_contents(${$gphmlj}["data"]);if(${${"GLOBALS"}["uhrkytts"]}===false)$this->data["error"]="error reading data for ".${${"GLOBALS"}["cdeqekbwhd"]};else{$sjmnqssiu="file";$txrknlens="content";${"GLOBALS"}["ykhqdkvlk"]="file";${${"GLOBALS"}["nejpsleeyk"]}=file_put_contents(${$sjmnqssiu},${$txrknlens});$mxfljwquv="id_product";$locppsivfs="attributeid";if(${${"GLOBALS"}["nejpsleeyk"]}===false)$this->data["error"]="error creating ".${${"GLOBALS"}["ykhqdkvlk"]};elseif($prd->add_product_doc(${${"GLOBALS"}["amcidfxlp"]},${$mxfljwquv},${$locppsivfs})<0){$this->data["error"].=$prd->error."
";}}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_product_labels($pid,$attribid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["cvuizmtwnre"]="attribid";${"GLOBALS"}["ymdeayft"]="prod";${${"GLOBALS"}["ymdeayft"]}=new WS_Product();$this->data=$prod->get_attributes_lib(${${"GLOBALS"}["emhdxrfxrjl"]},${${"GLOBALS"}["cvuizmtwnre"]});if(!is_array(${${"GLOBALS"}["nxwtecpk"]})){$this->result["code"]=-1;$this->result["message"]=$prod->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_productstatus($prodid,$status){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){$ihgajqckrln="prodid";if(empty(${$ihgajqckrln})){${"GLOBALS"}["cxptrpkgw"]="prodid";$this->result["code"]=${${"GLOBALS"}["cxptrpkgw"]};$this->result["stat"]=" productid not set : ";}else{${"GLOBALS"}["gfeukpza"]="prod";${${"GLOBALS"}["gfeukpza"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$prod->updatestatus(${${"GLOBALS"}["egdejbyit"]},${${"GLOBALS"}["xjbfcukw"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]="error setting status : ".${${"GLOBALS"}["xjbfcukw"]}." for product $prodid ".$prod->error;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_product_attribute($idoption,$optionname,$idvalue,$valuename){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){$fdpjqkumgpr="optionname";if(empty(${$fdpjqkumgpr})&&empty(${${"GLOBALS"}["npuioymp"]})){$ycmqsvigbrgd="prodid";$this->result["code"]=${$ycmqsvigbrgd};$this->result["message"]=" aucune nom pour l'attribut ou sa valeur : ";}else{$eqajrya="result";${"GLOBALS"}["tmbsjjhk"]="idvalue";${"GLOBALS"}["lcoecoeqiizy"]="prod";$yzcjocdkk="valuename";${${"GLOBALS"}["lcoecoeqiizy"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$prod->set_option(${${"GLOBALS"}["pquxszes"]},${${"GLOBALS"}["uryvolexhkx"]},${${"GLOBALS"}["tmbsjjhk"]},${$yzcjocdkk});$this->result["debug"]=$prod->debug;if(${$eqajrya}<0){$this->result["code"]=-1;$this->result["message"]="error setting option : $optionname / $valuename ".$prod->error;}else$this->data=array("ecomoption"=>$prod->optionid,"ecomvalue"=>$prod->valueid);}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_productstock($idprod,$idattrib,$qty){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${"GLOBALS"}["ftvusggrcje"]="result";${"GLOBALS"}["hplkpsquns"]="prod";$quvrhscvmzq="idprod";${"GLOBALS"}["ixsokndmjw"]="qty";${${"GLOBALS"}["hplkpsquns"]}=new WS_Product();$crqkldc="idattrib";${${"GLOBALS"}["honslcbg"]}=$prod->update_productstock(${$quvrhscvmzq},${$crqkldc},${${"GLOBALS"}["ixsokndmjw"]});if(${${"GLOBALS"}["ftvusggrcje"]}<0){$this->result["code"]=-1;$this->result["message"]="error setting stock : $idprod / $idattrib ".$prod->error;}else$this->data=array("stock"=>${${"GLOBALS"}["bjumjetl"]});}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_stocklist($stockliste){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${"GLOBALS"}["tsysnujbmncx"]="stockliste";$wrbtvd="stockliste";$gbfiarixr="elt";if(!is_array(${${"GLOBALS"}["qlbeymapdmt"]})||count(${${"GLOBALS"}["tsysnujbmncx"]})==0){$this->result["code"]=-1;$this->result["message"]="nothing to do";return 1;}${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();foreach(${$wrbtvd} as${$gbfiarixr}){$ipfwwqmto="elt";${"GLOBALS"}["ojnfmwcsne"]="result";$vtnqefqsdt="prodid";${"GLOBALS"}["iohpjerrhcn"]="elt";${"GLOBALS"}["cdklgfb"]="elt";if(empty(${${"GLOBALS"}["yqqnvf"]}["productid"])){${"GLOBALS"}["cnwjhyxwuqws"]="errors";${${"GLOBALS"}["cnwjhyxwuqws"]}[]="productid vide";continue;}if(!is_numeric(${${"GLOBALS"}["cdklgfb"]}["qty"])){${"GLOBALS"}["ueyydmsk"]="errors";${${"GLOBALS"}["ueyydmsk"]}[]="quantit errone";continue;}${"GLOBALS"}["epzoaweu"]="elt";$vnjphsctkl="elt";${"GLOBALS"}["ryjfsufqiwr"]="attributeid";${${"GLOBALS"}["egdejbyit"]}=${$ipfwwqmto}["productid"];${${"GLOBALS"}["ryjfsufqiwr"]}=(empty(${${"GLOBALS"}["iohpjerrhcn"]}["attributeid"]))?0:${$vnjphsctkl}["attributeid"];${${"GLOBALS"}["bjumjetl"]}=${${"GLOBALS"}["epzoaweu"]}["qty"];$dnnpguol="result";${$dnnpguol}=$prod->update_productstock(${$vtnqefqsdt},${${"GLOBALS"}["keecpjl"]},${${"GLOBALS"}["bjumjetl"]});if(${${"GLOBALS"}["ojnfmwcsne"]}<0){$this->result["code"]=-1;$this->result["message"].="error setting stock : $prodid / $attributeid ".$prod->error."
";}else{$brxrnxti="prodid";${"GLOBALS"}["dfqpovvslhds"]="attributeid";$this->data[]=array("productid"=>${$brxrnxti},"attributeid"=>${${"GLOBALS"}["dfqpovvslhds"]},"qty"=>${${"GLOBALS"}["bjumjetl"]});}}if(count(${${"GLOBALS"}["vntbtfv"]}))$this->result["errors"]=${${"GLOBALS"}["vntbtfv"]};}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_product_attribute($pid,$attid,$decli){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){if(empty(${${"GLOBALS"}["emhdxrfxrjl"]})||empty(${${"GLOBALS"}["bnunepg"]})||empty(${${"GLOBALS"}["ivpbgliywf"]})){$this->result["code"]=-1;$this->result["message"]=" Erreur paramtres produit $pid attribut $attid decli $decli ";}else{$jipqgqrfwq="result";$rdoeldqsaf="attid";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();${$jipqgqrfwq}=$prod->update_attribute(${${"GLOBALS"}["emhdxrfxrjl"]},${$rdoeldqsaf},${${"GLOBALS"}["ivpbgliywf"]});$this->result["debug"]=$prod->debug;${"GLOBALS"}["ympeoj"]="result";if(${${"GLOBALS"}["ympeoj"]}<0){$this->result["code"]=-1;$this->result["message"]="error updating attribute : $pid attribut $attid decli $decli ".$prod->error;}else$this->data=array();}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_price($prodid,$attributeid=0,$minqty,$price){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){if(empty(${${"GLOBALS"}["egdejbyit"]})){$this->result["code"]=-1;$this->result["message"]=" Erreur paramtres produit $prodid attribut $attributeid ";}else{${"GLOBALS"}["camxbr"]="minqty";$yrvrml="result";${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();${$yrvrml}=$prod->update_price(${${"GLOBALS"}["egdejbyit"]},${${"GLOBALS"}["keecpjl"]},${${"GLOBALS"}["camxbr"]},${${"GLOBALS"}["waenbcpxptsi"]});$this->result["debug"]=$prod->debug;if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]="error updating attribute : $pid attribut $attid decli $decli ".$prod->error;$this->result["debug"]=$prod->debug;}else$this->data=array();}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_prices($prodlist){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${${"GLOBALS"}["bogjtuyy"]}=new WS_Product();${${"GLOBALS"}["honslcbg"]}=$prod->update_prices(${${"GLOBALS"}["tpxbljvy"]});$this->result["debug"]=$prod->debug;$this->result["debugprice"]=$prod->debugprice;if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]="error updating attribute : $pid attribut $attid decli $decli ".$prod->error;}$this->data=$prod->prodresult;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function save_image($filesarray){$cmlesl="dir";print"<p> entree ".print_r(${${"GLOBALS"}["ggexccgh"]},true)."</p>";${$cmlesl}=realpath(dirname(__FILE__)."/../tmp/")."/";foreach(${${"GLOBALS"}["ggexccgh"]} as${${"GLOBALS"}["onouqhbpkct"]}){${"GLOBALS"}["dntncjs"]="file";${"GLOBALS"}["ddpompuf"]="args";${"GLOBALS"}["nzusnhq"]="content";$klerovgtwcrj="args";$ypvosojcewj="args";${${"GLOBALS"}["dntncjs"]}=${${"GLOBALS"}["qjnqdmb"]}.${${"GLOBALS"}["ddpompuf"]}["name"];print"<p> traitement de ".${${"GLOBALS"}["amcidfxlp"]}."</p>";${${"GLOBALS"}["udnlowqv"]}=file_get_contents(${$ypvosojcewj}["data"]);if(${${"GLOBALS"}["nzusnhq"]}===false)print"<p> erreur lecture ".${$klerovgtwcrj}["name"]."</p>";else{$xdfwtibrsobj="lg";$yeevtv="file";${$xdfwtibrsobj}=file_put_contents(${$yeevtv},${${"GLOBALS"}["udnlowqv"]});$vlhygvuqie="file";if(${${"GLOBALS"}["nejpsleeyk"]}===false)print"<p> error creating ".${$vlhygvuqie}."</p>";}}return 1;}function get_categorie($catid,$custshopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$dftvobnsep="result";${"GLOBALS"}["epccmlmif"]="cat";$cjdqxewic="result";${${"GLOBALS"}["epccmlmif"]}=new WS_Category();${$cjdqxewic}=$cat->fetch(${${"GLOBALS"}["nuimlcihgqs"]},${${"GLOBALS"}["txjrmdihqkh"]});if(${$dftvobnsep}<0){$this->result["code"]=${${"GLOBALS"}["honslcbg"]};$this->result["message"]=$cat->error;}else$this->data=$cat->catresult;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_categorylist($catid,$limit=0,$custshopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$cithdxatr="cat";$idrufboumff="custshopid";${"GLOBALS"}["szmfuwmt"]="catid";${$cithdxatr}=new WS_Category();if($cat->get_cat_list(${${"GLOBALS"}["szmfuwmt"]},${${"GLOBALS"}["vbuulhqmp"]},${$idrufboumff})<0){$this->result["code"]=-1;$this->result["message"]=$cat->error;}else$this->data=$cat->liste;$this->result["sql"]=$cat->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_NewOrder($orderid="0",$limit="0",$shopid=0){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){$rqgsckcfpc="ord";${"GLOBALS"}["nfditjcag"]="shopid";$dgcrfqbdkry="limit";${"GLOBALS"}["jiqjqrlhp"]="result";${$rqgsckcfpc}=new WS_Order();${${"GLOBALS"}["jiqjqrlhp"]}=$ord->get_order_list(${${"GLOBALS"}["kbsxjtvhkgqq"]},${$dgcrfqbdkry},${${"GLOBALS"}["nfditjcag"]});if(${${"GLOBALS"}["honslcbg"]}>0){$this->data=$ord->order_list;}else{$this->result["code"]=-1;$this->result["message"]=$ord->error;}$this->result["sql"]=$ord->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_Order($orderid="0"){$this->result["code"]=0;$this->result["message"]="";$this->data=array();if($this->key_isvalid($this->key)){${"GLOBALS"}["jrffwgqpek"]="orderid";${"GLOBALS"}["yruwpsohmf"]="ord";${"GLOBALS"}["ydbfhqivq"]="res";${${"GLOBALS"}["yruwpsohmf"]}=new WS_Order();${"GLOBALS"}["lfoaoyude"]="res";${${"GLOBALS"}["ydbfhqivq"]}=$ord->fetch(${${"GLOBALS"}["jrffwgqpek"]});if(${${"GLOBALS"}["lfoaoyude"]}>0){$this->data=$ord->order_data;}else{$yosjfsucjnh="res";$this->result["code"]=${$yosjfsucjnh};$this->result["message"]=" Error ".$ord->error;}$this->result["sql"]=$ord->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_status($ordid,$status){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$yyqtfiynk="status";if((!${$yyqtfiynk})||(!${${"GLOBALS"}["njwujlwlk"]})){$phnqdnflvos="status";$this->result["ord"]=${${"GLOBALS"}["njwujlwlk"]};$this->result["stat"]="status : ".${$phnqdnflvos}."erreur ";return${${"GLOBALS"}["rjkiynh"]};}else{${${"GLOBALS"}["vrndtmx"]}=new WS_Order();$ord->orders_id=${${"GLOBALS"}["njwujlwlk"]};${${"GLOBALS"}["honslcbg"]}=$ord->updatestatus(${${"GLOBALS"}["xjbfcukw"]});if(${${"GLOBALS"}["honslcbg"]}<0){$xxxjjsa="status";$this->result["ord"]=${${"GLOBALS"}["njwujlwlk"]};$this->result["stat"]="status : ".${$xxxjjsa}."erreur ".$ord->error;}}$this->result["sql"]=$ord->sql;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_tracknum($orderid,$carrier_id,$tracknum,$message=''){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){if(empty(${${"GLOBALS"}["kbsxjtvhkgqq"]})||empty(${${"GLOBALS"}["kxiofammg"]})||empty(${${"GLOBALS"}["daejaicqwop"]})){$this->result["code"]=-1;$this->result["message"]="orderid, carrier_id and tracnum can not be empty";}else{${"GLOBALS"}["jxouwlnhg"]="ord";${${"GLOBALS"}["jxouwlnhg"]}=new WS_Order();${${"GLOBALS"}["honslcbg"]}=$ord->set_tracknum(${${"GLOBALS"}["kbsxjtvhkgqq"]},${${"GLOBALS"}["daejaicqwop"]},${${"GLOBALS"}["kxiofammg"]},${${"GLOBALS"}["ggnrfh"]});if(${${"GLOBALS"}["honslcbg"]}<0){$this->result["code"]=-1;$this->result["message"]=$ord->error;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function send_invoice($order_id,$invoice_ref,$filesarray){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["ebcnluytflz"]="order_id";$fgdnan="order";${$fgdnan}=new WS_Order();if($order->fetch(${${"GLOBALS"}["ebcnluytflz"]})<0){$this->result["erreur"]="Error fetch order ".$order->error;$this->result["fichier"]="";return-1;}if(!${${"GLOBALS"}["pynkpv"]}){$this->result["erreur"]="No invoice ref";$this->result["fichier"]=${${"GLOBALS"}["pynkpv"]};return-1;}${"GLOBALS"}["rcubzkyrh"]="filesarray";${${"GLOBALS"}["qjnqdmb"]}=realpath(dirname(__FILE__)."/../tmp/");$ipypvucmn="args";foreach(${${"GLOBALS"}["rcubzkyrh"]} as${$ipypvucmn}){$kbbztpjsihj="dir";$ddmklyivlj="args";${"GLOBALS"}["htfnlz"]="file";$trultgkigt="dirdest";$vcncufdqx="args";${"GLOBALS"}["bqjlfnwnime"]="dirdest";$nqgkfcygnsr="lg";$exchetnbdeme="dirdest";${${"GLOBALS"}["amcidfxlp"]}=${$kbbztpjsihj}."/".${${"GLOBALS"}["onouqhbpkct"]}["name"];${"GLOBALS"}["mzxnspe"]="order_id";${$nqgkfcygnsr}=file_put_contents(${${"GLOBALS"}["htfnlz"]},file_get_contents(${$ddmklyivlj}["data"]));${${"GLOBALS"}["nxwtecpk"]}[]=array("file"=>${$vcncufdqx}["name"],"length"=>${${"GLOBALS"}["nejpsleeyk"]});if(!file_exists(${${"GLOBALS"}["amcidfxlp"]})){$this->result["code"]=1;$this->result["message"]=${${"GLOBALS"}["amcidfxlp"]}." absent";return-1;}${$exchetnbdeme}=$order->get_order_doc_dir(${${"GLOBALS"}["mzxnspe"]},"invoice");$bdggalz="file";if(!dirdest){$this->result["code"]=1;$this->result["message"]="Erreur dtermination rpertoire ".$order->error;return-1;}if(!is_dir(${${"GLOBALS"}["bqjlfnwnime"]})){if(!mkdir(${${"GLOBALS"}["mplaryts"]},0777,true)){$this->result["code"]=1;$this->result["message"]="Cration impossible $dirdest";return-1;}}if(!rename(${${"GLOBALS"}["amcidfxlp"]},${$trultgkigt}.basename(${$bdggalz}))){$this->result["code"]=1;$this->result["message"]="dplacement impossible ".${${"GLOBALS"}["mplaryts"]}.${${"GLOBALS"}["pynkpv"]}.".pdf";return-1;}}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_Client($custid='',$shopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["fowqiqsdtio"]="result";$memlbtg="result";${"GLOBALS"}["ndvjqbojb"]="cust";${${"GLOBALS"}["ndvjqbojb"]}=new WS_Customer();${${"GLOBALS"}["fowqiqsdtio"]}=$cust->fetch(${${"GLOBALS"}["ggxfjjs"]},${${"GLOBALS"}["cyhrzym"]});if(${$memlbtg}>0){$this->data=$cust->custdata;}else{$this->result["code"]=${${"GLOBALS"}["honslcbg"]};$this->result["message"]=$cust->error;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_newProspects($custid,$limit,$shopid=0){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${"GLOBALS"}["hnqivkqhqa"]="limit";$yhemmihlowzn="custid";$dbkxrne="result";${"GLOBALS"}["icgfjdbhois"]="cust";${"GLOBALS"}["bipnqwamgq"]="result";${${"GLOBALS"}["icgfjdbhois"]}=new WS_Customer();${${"GLOBALS"}["bipnqwamgq"]}=$cust->get_prospects_list(${$yhemmihlowzn},${${"GLOBALS"}["hnqivkqhqa"]},${${"GLOBALS"}["cyhrzym"]});if(${$dbkxrne}>0){$this->data=$cust->custlist;}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function create_customer($tabcust){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$pgpwbvkdcvdi="tabcust";$fuhuppyy="tabcust";$yqwbermpio="tabcust";$wbswrhb="tabcust";if(!is_array(${$yqwbermpio})){$cipkjmbtx="tabcust";$this->result["message"]="tableau de paramtre n'est pas un array ".gettype(${$cipkjmbtx})." ".print_r(${${"GLOBALS"}["krpiwgmuqtmp"]},true);$this->result["code"]=1;}$svqenirxgc="tabcust";${${"GLOBALS"}["lkpqowclp"]}=new WS_Customer();$cust->email=${$pgpwbvkdcvdi}["email"];${"GLOBALS"}["tyhnpvkyml"]="tabcust";$cust->id_gender=convert_dol_civility(${$fuhuppyy}["gender"]);${"GLOBALS"}["prtfkdl"]="tabcust";$cust->lastname=${${"GLOBALS"}["krpiwgmuqtmp"]}["lastname"];$cust->firstname=${${"GLOBALS"}["prtfkdl"]}["firstname"];$cust->company=${$svqenirxgc}["company"];$cust->address1=${${"GLOBALS"}["tyhnpvkyml"]}["address1"];$mvndwoks="tabcust";$cust->address2=isset(${${"GLOBALS"}["krpiwgmuqtmp"]}["address2"])?${${"GLOBALS"}["krpiwgmuqtmp"]}["address2"]:"";$cust->postcode=${$mvndwoks}["postcode"];$cust->city=${${"GLOBALS"}["krpiwgmuqtmp"]}["city"];$cust->phone=${$wbswrhb}["phone"];$cust->phone_mobile=${${"GLOBALS"}["krpiwgmuqtmp"]}["phone_mobile"];$cust->country_iso_code=${${"GLOBALS"}["krpiwgmuqtmp"]}["country"];$cust->default_group=${${"GLOBALS"}["krpiwgmuqtmp"]}["default_group"];if($cust->test_cust_create()){$fqremvg="custshopid";${${"GLOBALS"}["txjrmdihqkh"]}=0;${${"GLOBALS"}["yfahhijg"]}=$cust->create_customer(${$fqremvg});if(!is_array(${${"GLOBALS"}["yfahhijg"]})){$this->result["code"]=1;$this->result["message"]="Error creating customer ".$cust->error;}else{$this->data["customer_id"]=${${"GLOBALS"}["yfahhijg"]}["id_cust"];$this->data["address_id"]=${${"GLOBALS"}["yfahhijg"]}["id_adr"];}}else{$this->result["code"]=1;$this->result["message"]="Error customer exists";}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function set_customer_group($custid,$groupid,$default=false){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$hiintwizsbj="groupid";$qwgcmsmhj="cust";${"GLOBALS"}["pgqrfbr"]="default";${$qwgcmsmhj}=new WS_Customer();if($cust->change_group(${${"GLOBALS"}["ggxfjjs"]},${$hiintwizsbj},${${"GLOBALS"}["pgqrfbr"]})<0){$this->result["code"]=1;$this->result["message"]="Erroro setting group ".$cust->error;}else{$this->data["custid"]=${${"GLOBALS"}["ggxfjjs"]};$this->data["defaultgroup"]=$cust->default_group;$this->data["groups"]=implode(";",$cust->groups);}}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function update_customer($custid,$tabmod){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){${${"GLOBALS"}["lkpqowclp"]}=new WS_Customer();if($cust->update_customer(${${"GLOBALS"}["ggxfjjs"]},${${"GLOBALS"}["fgwxjerwgp"]})<0){$this->result["code"]=1;$this->result["message"]="Erroro updatiing customer ".$cust->error;}$this->data["custid"]=${${"GLOBALS"}["ggxfjjs"]};$this->data["defaultgroup"]=$cust->default_group;$this->data["groups"]=implode(";",$cust->groups);}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}function get_cust_adresses($custid){$this->result["code"]=0;$this->result["message"]="";if($this->key_isvalid($this->key)){$ronmpmvgovw="cust";$trkdtlvaox="custid";${$ronmpmvgovw}=new WS_Customer();if($cust->get_custadresses(${$trkdtlvaox})<0){$this->result["code"]=1;$this->result["message"]="Error getting customer adresses ".$cust->error;}$this->data=$cust->data;}else{$this->result["code"]=1;$this->result["message"]="activation key is wrong";}return 1;}}
?>
Function Calls
None |
Stats
MD5 | 42c7aa9080de6cda2ccd98a61f90d884 |
Eval Count | 0 |
Decode Time | 439 ms |