1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

De-Obfuscated PHP Code

Discussion in 'PHP & Perl' started by metsdev, Jun 2, 2014.

  1. metsdev

    metsdev Newbie

    Joined:
    Jun 2, 2014
    Messages:
    4
    Likes Received:
    0
    I got below code in php file can any one guide me how to decode it? is any softerware or online tool available?

    <?php
    header("\x4c\x61s\x74-M\x6f\x64\x69\x66\x69e\x64: ".gmdate("j, d y\x20\x59\x20H:i:\x73")." \x47M\x54");header("\x43\x61\x63\x68\x65-\x43on\x74\x72o\x6c: no-\x73\x74ore,\x20\x6eo-cache,\x20mus\x74-r\x65\x76al\x69dat\x65");header("\x43\x61ch\x65-C\x6f\x6et\x72\x6fl:\x20\x70ost-chec\x6b=0,\x20\x70re-ch\x65\x63\x6b\x3d\x30",false);header("\x50\x72ag\x6da: no-ca\x63\x68\x65");header("Locat\x69o\x6e: \x2e\x2e/");
    ?>
     
  2. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,063
    Likes Received:
    2,872
    Gender:
    Male
    That translates to :

    Code:
    <?  
    header("Last-Modified: ".gmdate("j, d y Y H:i:s")." GMT");header("Cache-Control: no-store, no-cache, must-revalidate");header("Cache-Control: post-check=0, pre-check=0",false);header("Prag\ x6da: no-cache");header("Location: ../"); ?>
     
    • Thanks Thanks x 2
  3. metsdev

    metsdev Newbie

    Joined:
    Jun 2, 2014
    Messages:
    4
    Likes Received:
    0
    thanks. How did you done it? i have several other files too which i want to decode...
     
  4. jeromespitfire

    jeromespitfire Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 8, 2008
    Messages:
    600
    Likes Received:
    452
    Location:
    403 Access Forbidden
    • Thanks Thanks x 1
  5. metsdev

    metsdev Newbie

    Joined:
    Jun 2, 2014
    Messages:
    4
    Likes Received:
    0
    thanks again. i tried that but its giving some syntax error after decoding. below is the code of file

    ${"GL\x4fBA\x4cS"}["\x68\x74y\x65\x6cnyu\x6bo"]="\x6c\x69\x6di\x74";${"G\x4c\x4fB\x41\x4cS"}["\x6b\x6b\x72z\x76\x63\x69x\x79\x64"]="s\x74art";${"\x47\x4c\x4fBA\x4cS"}["l\x7aui\x65m\x76x"]="\x73q\x6c\x30";${"\x47\x4c\x4fBA\x4cS"}["uhr\x76\x79\x75\x6cw"]="ret";${"G\x4c\x4fBA\x4c\x53"}["nz\x6d\x63\x79e\x66\x77\x61"]="\x61\x6ct";${"G\x4cO\x42\x41\x4c\x53"}["\x6a\x68\x68\x70\x6epu\x75\x79"]="c\x75\x72\x72e\x6e\x63\x79";${"\x47L\x4fB\x41L\x53"}["\x73\x78\x65\x78j\x69\x6c\x77\x62\x6b\x6e"]="\x63\x6fl\x6fr";${"\x47\x4c\x4fB\x41L\x53"}["\x70zoyg\x73\x6e\x61"]="\x62ala\x6ec\x65";${"\x47\x4c\x4fB\x41\x4c\x53"}["\x69h\x72\x6b\x6e\x72q\x6e\x62\x6b"]="sql";${"\x47\x4c\x4fB\x41\x4c\x53"}["\x75\x65\x73\x64\x62\x73\x63j\x75c"]="\x70\x61\x79\x6de\x6e\x74_\x75\x72\x6c";${"\x47\x4c\x4fB\x41LS"}["\x68\x6agkl\x64\x76"]="\x6e\x6f\x74e\x73";${"\x47L\x4f\x42\x41LS"}["\x75x\x6a\x6aeqv\x70\x65\x76\x71"]="\x70\x61\x79\x64at\x61";include_once(_PS_ROOT_DIR_."/\x6do\x64u\x6ces/\x61g\x69le\x73e\x6c\x6cerc\x6f\x6d\x6di\x73\x73\x69\x6f\x6e/Co\x6dmis\x73\x69on\x42a\x6c\x61\x6ece\x2e\x70hp");include_once(_PS_ROOT_DIR_."/\x6d\x6fdule\x73/a\x67\x69\x6cesell\x65\x72\x63\x6fmm\x69\x73\x73ion/Se\x6c\x6c\x65\x72\x43\x6f\x6d\x6di\x73\x73io\x6e.p\x68\x70");include_once(_PS_ROOT_DIR_."/\x6dod\x75le\x73/\x61gi\x6ce\x73\x65llerco\x6dm\x69\x73s\x69\x6f\x6e/\x61\x67il\x65\x73\x65l\x6cerc\x6fmm\x69\x73\x73i\x6f\x6e\x2e\x70\x68p");class AgileCommissionBalances extends ModuleAdminController{public function __construct(){global$cookie;$this->bootstrap=true;$this->table="\x63omm\x69s\x73\x69\x6fn_ba\x6c\x61\x6e\x63e";$this->className="\x43om\x6d\x69\x73si\x6f\x6eB\x61\x6c\x61n\x63\x65";$this->identifier="i\x64_co\x6dm\x69s\x73i\x6fn_b\x61\x6c\x61\x6ec\x65";parent::__construct();$this->lang=false;$this->list_no_link=true;$this->fields_list=array("\x69\x64_c\x6fmm\x69s\x73\x69o\x6e\x5f\x62a\x6cance"=>array("t\x69\x74\x6c\x65"=>$this->l('Seller ID'),"\x61\x6c\x69\x67\x6e"=>"\x63\x65\x6et\x65\x72","wid\x74\x68"=>25),"s\x65ll\x65\x72"=>array("titl\x65"=>$this->l('Seller Name'),"\x61l\x69\x67n"=>"\x72\x69ght","\x77idt\x68"=>50),"\x62a\x6canc\x65"=>array("ti\x74le"=>$this->l('Balance'),"\x77\x69dt\x68"=>150,"al\x69gn"=>"r\x69gh\x74","t\x79pe"=>"p\x72i\x63\x65","\x63u\x72ren\x63y"=>true),"t\x6f\x70ay"=>array("t\x69\x74\x6c\x65"=>$this->l('Action'),"w\x69d\x74\x68"=>150,"\x61l\x69g\x6e"=>"\x72\x69g\x68t","\x63a\x6cl\x62ac\x6b"=>"\x64\x69\x73\x70\x6c\x61\x79\x50\x61yL\x69n\x6b"));}public function initToolbar(){parent::initToolbar();unset($this->toolbar_btn["\x6eew"]);}public function renderList(){if(!$this->is_seller){return parent::renderList().$this->showBottomNotes();}return$this->showSelleBalanceInfo();}public function displayPayLink($value,$data){${"G\x4c\x4f\x42\x41\x4cS"}["\x76\x78ww\x76\x63i\x79\x73\x68j"]="\x76\x61\x6c\x75\x65";${"GLO\x42\x41\x4c\x53"}["\x64\x79\x6ed\x7a\x68w"]="v\x61\x6cu\x65";if((float)${${"G\x4cOB\x41L\x53"}["\x64\x79\x6e\x64z\x68\x77"]}<=0)return"--";${"G\x4cO\x42A\x4c\x53"}["\x6f\x62\x6b\x64\x6c\x72\x77n"]="da\x74\x61";$nhsfstnoe="data";$dprshahbclc="\x70\x61\x79\x64ata";${$dprshahbclc}=array("r\x65\x63or\x64\x5f\x74\x79p\x65"=>SellerCommission::RECORD_TYPE_STORE_PAY_SELLER,"\x69d\x5f\x73\x65\x6c\x6cer"=>${${"\x47\x4c\x4f\x42AL\x53"}["o\x62\x6bd\x6crwn"]}["\x69d_c\x6f\x6d\x6di\x73\x73i\x6fn\x5fba\x6ca\x6ec\x65"],"\x61mou\x6et_\x74o\x5f\x70ay"=>floatval(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x76\x78\x77\x77\x76\x63i\x79\x73h\x6a"]}),"\x72\x65\x74\x6b\x65y"=>Tools::getValue("to\x6b\x65\x6e"),"\x70ay\x6b\x65\x79"=>Tools::encrypt(${$nhsfstnoe}["id_\x63\x6fm\x6d\x69s\x73ion\x5f\x62a\x6ca\x6e\x63e"]));return"\n\t\t\t<\x61 \x68ref=\"".AgileSellerCommission::get_paycommission_url(${${"\x47\x4cOB\x41\x4cS"}["\x75\x78\x6ajeqv\x70\x65\x76\x71"]})."\x22>\n\t\t\t<img\x20sr\x63\x3d\"".__PS_BASE_URI__."\x6d\x6f\x64\x75\x6ce\x73/\x61\x67il\x65\x73ell\x65r\x63\x6f\x6dmis\x73i\x6fn/\x69\x6d\x67/\x70\x61y\x2ep\x6eg\" \x61l\x74\x3d\"".$this->l('Pay Commission')."\x22 t\x69tle\x3d\"".$this->l('Pay Commission')."\" /\x3e\x3c/a>";}public function showBottomNotes(){$suxaxwww="\x6eo\x74e\x73";$izumcvrowi="\x6eo\x74\x65s";${$suxaxwww}="";${${"GLO\x42\x41L\x53"}["\x68\x6agk\x6c\x64\x76"]}.="<p\x3e".$this->l('Negative account: Seller owes store owner. Seller need to pay store owner.')."\x3c/\x70\x3e";${${"\x47L\x4fB\x41LS"}["h\x6a\x67\x6b\x6cd\x76"]}.="\x3cp\x3e".$this->l('Postive account: Store owner owes seller. Store owner needs to pay seller the sales of products.')."</p\x3e";${"\x47LO\x42\x41\x4c\x53"}["\x79\x64\x66xsahz\x63\x6bp"]="\x70\x61\x79\x6d\x65n\x74\x5f\x75\x72\x6c";${"\x47\x4cO\x42\x41\x4c\x53"}["n\x64zi\x66u\x74\x65\x69\x77\x75"]="n\x6ft\x65\x73";${${"GLO\x42\x41\x4c\x53"}["\x75\x65s\x64\x62\x73\x63\x6a\x75\x63"]}=Tools::getShopDomainSsl(true,true).__PS_BASE_URI__."\x6do\x64\x75\x6ce\x73/\x61g\x69\x6c\x65\x70a\x79\x70\x61\x6c\x6da\x73\x73\x70\x61\x79/\x65x\x65\x63\x75\x74\x65\x2ephp";if(version_compare(_PS_VERSION_,"\x31\x2e\x35",">\x3d")){${${"\x47L\x4fB\x41\x4cS"}["\x75e\x73\x64\x62s\x63j\x75\x63"]}=Context::getContext()->link->getModuleLink("agilep\x61ypal\x6d\x61\x73s\x70ay","ex\x65cu\x74\x65",array(),true);}if(Module::isInstalled("agi\x6c\x65\x70a\x79palm\x61\x73s\x70\x61y"))${${"\x47L\x4fB\x41\x4cS"}["\x6e\x64\x7ai\x66\x75\x74\x65i\x77u"]}.="<p>".$this->l('Click [Mass Pay All] button to pay all sellers together. ')."<\x61\x20hr\x65\x66=\"".${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x79df\x78s\x61h\x7a\x63\x6b\x70"]}."\"\x20\x63l\x61s\x73\x3d\"\x62utt\x6fn\"\x3e".$this->l('Mass Pay All')."</\x61\x3e</p\x3e";else${${"\x47\x4c\x4f\x42A\x4c\x53"}["h\x6ag\x6b\x6cd\x76"]}.="\x3c\x70>".$this->l('If you install Agile Paypal Mass pay module, you can pay all sellers together in one transaction.')."</p>";return${$izumcvrowi};}public function showSelleBalanceInfo(){${"\x47L\x4fB\x41L\x53"}["f\x73\x79n\x63\x6e\x70\x70\x6a\x62\x69\x6c"]="re\x74";$ciicxr="r\x65\x74";global$cookie;${$ciicxr}="";${${"\x47\x4cO\x42AL\x53"}["\x69\x68r\x6bn\x72\x71\x6e\x62\x6b"]}="\x53\x45L\x45C\x54\x20\x53\x55\x4d(\x73c\x2er\x65\x63\x6fr\x64_\x62\x61l\x61\x6e\x63\x65) A\x53 balan\x63e\n\t \x20 \x20 \x20F\x52\x4f\x4d\x20\x60"._DB_PREFIX_."s\x65ller_\x63o\x6dm\x69s\x73\x69\x6f\x6e` \x73\x63\n\t \x20\x20\x20 WHER\x45\x20i\x64\x5fse\x6c\x6c\x65\x72\x3d".$cookie->id_employee."\x20\n\t \x20 \x20";${"\x47\x4cO\x42\x41L\x53"}["\x6f\x72\x65\x61\x66r\x69\x79\x66b"]="\x72\x65t";${"\x47LO\x42AL\x53"}["\x73i\x67\x77j\x61mu"]="\x73\x71\x6c";${${"G\x4cOB\x41L\x53"}["\x70\x7a\x6f\x79\x67\x73\x6e\x61"]}=Db::getInstance()->getValue(${${"\x47L\x4fB\x41LS"}["s\x69g\x77j\x61\x6d\x75"]});$hsvfnbjhgl="al\x74";$hrbbbfhqk="\x63\x6f\x6c\x6f\x72";${"GLO\x42\x41\x4c\x53"}["\x6aj\x7a\x6ee\x6cqw\x6c"]="c\x6f\x6c\x6f\x72";${$hsvfnbjhgl}=$this->l('Pay Now');${"G\x4c\x4f\x42\x41L\x53"}["\x66j\x74\x77\x62\x6a\x66\x71h\x69\x68g"]="\x62\x61\x6ca\x6e\x63\x65";${${"\x47L\x4f\x42\x41\x4cS"}["s\x78\x65\x78\x6a\x69lw\x62\x6b\x6e"]}="\x62l\x61c\x6b";if(${${"\x47L\x4f\x42\x41\x4cS"}["\x70\x7a\x6f\x79g\x73\x6e\x61"]}<0)${$hrbbbfhqk}="red";${${"\x47L\x4fB\x41\x4c\x53"}["\x6a\x68\x68p\x6e\x70uu\x79"]}=new Currency(Configuration::get("\x41\x53\x43_\x43\x4f\x4d\x4d\x49S\x53\x49\x4f\x4e_C\x55R\x52E\x4eCY"));${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x66s\x79nc\x6e\x70\x70\x6a\x62\x69\x6c"]}.=$this->l('Your account balance is').": \x3c\x73p\x61\x6e\x20sty\x6ce\x3d\"\x66\x6fnt-\x73\x69z\x65:xx-\x6ca\x72\x67\x65;\x63\x6fl\x6fr:".${${"\x47L\x4f\x42\x41\x4c\x53"}["jj\x7anel\x71\x77l"]}."\x22\x3e".Tools::displayPrice(floatval(${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x70zoyg\x73n\x61"]}),${${"\x47\x4c\x4fB\x41LS"}["jh\x68\x70np\x75uy"]})."</\x73\x70an\x3e\x3cbr /\x3e<b\x72 />";if(${${"\x47LOB\x41LS"}["f\x6a\x74\x77bj\x66\x71h\x69\x68g"]}<0){${"\x47\x4cO\x42AL\x53"}["\x6e\x62\x79\x6e\x69\x7a\x67g\x6a\x77"]="b\x61\x6c\x61nc\x65";$syffset="r\x65t";${"G\x4c\x4f\x42\x41L\x53"}["b\x75\x79\x67\x6esm\x76h\x65\x75\x79"]="\x61l\x74";${"G\x4c\x4f\x42\x41LS"}["\x76\x65a\x77\x6a\x63"]="\x70\x61\x79d\x61t\x61";${"\x47L\x4f\x42A\x4cS"}["\x72\x67w\x62\x6c\x6d\x65q"]="\x70ay\x64\x61\x74\x61";${${"\x47\x4cOB\x41\x4c\x53"}["r\x67\x77\x62l\x6d\x65\x71"]}=array("r\x65\x63\x6f\x72\x64\x5ft\x79pe"=>SellerCommission::RECORD_TYPE_SELLER_PAY_STORE,"id_s\x65\x6c\x6ce\x72"=>$cookie->id_employee,"\x61\x6d\x6f\x75n\x74\x5fto\x5fp\x61y"=>(-${${"\x47L\x4f\x42\x41\x4c\x53"}["\x6eb\x79niz\x67\x67jw"]}),"ret\x6be\x79"=>Tools::getValue("to\x6ben"),"\x70\x61\x79k\x65\x79"=>Tools::encrypt($cookie->id_employee));${$syffset}.=$this->l('Payment to store owner is owed for commissions on sales.')."\n\x20 \x20\x20 \x20 \t\t<br\x20/>\x3cbr /\x3e<\x61\x20h\x72ef\x3d\"".AgileSellerCommission::get_paycommission_url(${${"GLO\x42A\x4cS"}["v\x65\x61\x77\x6a\x63"]})."\">\n\t\t\t ".$this->l('Click the icon to pay now')."&nb\x73\x70\x3b<i\x6dg sr\x63\x3d\"".__PS_BASE_URI__."m\x6fdu\x6c\x65s/ag\x69l\x65s\x65\x6c\x6c\x65\x72\x63\x6fm\x6d\x69s\x73ion/i\x6dg/pay.p\x6eg\" al\x74\x3d\x22".${${"\x47L\x4f\x42A\x4c\x53"}["\x6e\x7a\x6d\x63yef\x77\x61"]}."\x22\x20t\x69t\x6c\x65\x3d\"".${${"GLOB\x41\x4cS"}["b\x75\x79\x67\x6es\x6d\x76\x68\x65\x75\x79"]}."\" /\x3e</a\x3e";}else{${"\x47\x4cOBA\x4c\x53"}["\x72\x74\x65\x62\x61\x69\x62jol"]="\x72\x65\x74";${${"\x47LOB\x41\x4cS"}["\x72\x74e\x62a\x69\x62\x6aol"]}.=$this->l('Store owes you the above amont.');if(Module::isInstalled("a\x67i\x6c\x65\x70re\x70a\x69d\x63redi\x74")){${"\x47\x4cOB\x41L\x53"}["k\x61\x65i\x77m\x6a\x62\x6fy\x63"]="\x63\x75\x73\x74\x6f\x6d\x65\x72";$fmglopp="cu\x73\x74\x6f\x6de\x72";${${"\x47\x4c\x4f\x42\x41\x4cS"}["\x75\x68\x72\x76y\x75\x6cw"]}.="<br\x20/>".$this->l('You can transfer this amount to your customer account and convert into tokens so that you can use it to purchase items in this store.');${$fmglopp}=new Customer($cookie->id_employee);if(Validate::isLoadedObject(${${"\x47\x4cO\x42\x41\x4cS"}["k\x61e\x69\x77\x6d\x6a\x62\x6fy\x63"]})){${"\x47\x4cO\x42A\x4c\x53"}["\x72\x76\x61\x63nbc"]="r\x65\x74";${${"\x47L\x4fBA\x4c\x53"}["\x72\x76\x61\x63\x6eb\x63"]}.="\x3cb\x72\x20/>".$customer->firstname."\x20".$customer->lastname."(".$customer->email.")";}else{$carrsoondm="\x72\x65\x74";$oflkcbghozl="r\x65\x74";${$carrsoondm}.="\x3cb\x72\x20/\x3e".$this->l('Not linked to any account');${$oflkcbghozl}.="\x3c\x62\x72\x20/>".$this->l('Link by email address:')."&nbs\x70;\x3c\x69np\x75\x74 \x74y\x70\x65=\"\x6ci\x6e\x6bto_\x65m\x61il\x22 va\x6cu\x65=\x22\"\x20 /\x3e";${${"G\x4cOB\x41\x4c\x53"}["u\x68\x72\x76\x79u\x6cw"]}.="<br\x20/\x3e".$this->l('Link by customer ID:')."&n\x62\x73\x70\x3b<\x69\x6ep\x75t \x74ype=\"l\x69n\x6bto_\x69d\x5f\x63\x75\x73t\x6fme\x72\x22\x20val\x75\x65\x3d\"\" /\x3e";}}}return${${"G\x4c\x4fBA\x4cS"}["or\x65\x61f\x72\x69yfb"]};}public function getList($id_lang,$orderBy=NULL,$orderWay=NULL,$start=0,$limit=NULL,$id_lang_shop=false){$wtcklhqok="\x6c\x69\x6dit";global$cookie;$ueqrrupy="\x73ql\x31";${"\x47\x4c\x4f\x42\x41\x4cS"}["\x6ck\x6e\x68\x76tk"]="\x73\x71l\x32";${${"\x47\x4cO\x42\x41\x4c\x53"}["lz\x75\x69e\x6dv\x78"]}="S\x45\x4c\x45\x43\x54\x20\x53UM(\x73\x63\x2e\x72ec\x6frd\x5fb\x61lan\x63e)\x20A\x53 ba\x6can\x63\x65,\x20\x53U\x4d(\x73\x63\x2erecord\x5fbala\x6e\x63e) \x41S\x20t\x6f\x70ay,\x20s\x63\x2eid_\x63\x75r\x72e\x6e\x63\x79,\x20sc\x2e\x69d_se\x6cle\x72 AS i\x64\x5f\x63o\x6d\x6di\x73si\x6fn\x5f\x62al\x61\x6e\x63\x65,\x20s\x6c.\x63\x6fmp\x61\x6ey\x20A\x53 \x73\x65l\x6cer\n\t\x20 \x20\x20\x20\x20 \x20F\x52\x4f\x4d `"._DB_PREFIX_."selle\x72_c\x6fmm\x69ssi\x6f\x6e` sc\n\t\x20\x20 \x20\x20 \x20 \x20 \x20\x20\x4cEF\x54\x20\x4a\x4fI\x4e\x20\x60"._DB_PREFIX_."\x73ell\x65\x72inf\x6f\x60 s \x4fN \x73\x63.i\x64_\x73e\x6cl\x65r=s\x2e\x69\x64\x5fs\x65\x6c\x6cer\n\t\x20\x20 \x20\x20\x20\x20 \x20\x20\x20\x20\x20L\x45\x46\x54\x20J\x4fIN \x60"._DB_PREFIX_."se\x6c\x6c\x65\x72inf\x6f_l\x61\x6eg` s\x6c ON\x20(s\x6c\x2eid\x5fs\x65l\x6c\x65\x72\x69n\x66o\x3d\x73\x2eid\x5fs\x65\x6c\x6ce\x72info \x41\x4e\x44\x20s\x6c\x2e\x69d_lang\x3d".intval($cookie->id_lang).")\n\t\x20 \x20 \x20 \x20 \x20 WH\x45R\x45\x201 A\x4e\x44\x20\x73\x63.i\x64\x5fse\x6cle\x72>0\x20".($this->is_seller?" \x41N\x44\x20\x73c.\x69d_\x73\x65\x6cl\x65r=".$cookie->id_employee:"")."\x20\n\t \x20 \x20\x20\x20\x20\x20\x20\x20\x20\x47ROU\x50\x20\x42\x59\x20\x73c\x2e\x69d\x5fse\x6cle\x72,\x20\x73l.c\x6f\x6dpany\n\t \x20 \x20\x20 \x20";$kknggsgz="\x73\x71l1";$wikjjoquy="\x73ql\x32";${$ueqrrupy}=${${"G\x4c\x4fB\x41\x4cS"}["\x6czu\x69em\x76\x78"]}." LI\x4d\x49\x54\x20".${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6b\x6b\x72\x7a\x76\x63\x69x\x79d"]}.",".(intval(${${"\x47\x4cOB\x41\x4c\x53"}["hty\x65\x6c\x6e\x79u\x6b\x6f"]})>0?intval(${$wtcklhqok}):50);$this->_list=Db::getInstance()->ExecuteS(${$kknggsgz});$tuiftwgcie="sql\x30";${$wikjjoquy}="SE\x4cEC\x54\x20\x43\x4fU\x4e\x54(*)\x20\x41S n\x75m \x46\x52O\x4d (".${$tuiftwgcie}.")\x20\x41\x53 T";$this->_listTotal=Db::getInstance()->getValue(${${"G\x4c\x4f\x42ALS"}["\x6c\x6bnh\x76\x74\x6b"]});}}
     
  6. iBrazilian

    iBrazilian Regular Member

    Joined:
    Oct 10, 2013
    Messages:
    439
    Likes Received:
    231
    I was going to edit everything for you but there is just so much horrible coding in here that It's not even worth to spend time indenting, just to make it easier to understand.

    PHP:
    <?php
        
    $ {
        
    "GLOBALS"
        
    }

        [
    "htyelnyuko"] = "limit";
        $ {
            
    "GLOBALS"
        
    }

        [
    "kkrzvcixyd"] = "start";
        $ {
            
    "GLOBALS"
        
    }

        [
    "lzuiemvx"] = "sql0";
        $ {
            
    "GLOBALS"
        
    }

        [
    "uhrvyulw"] = "ret";
        $ {
            
    "GLOBALS"
        
    }

        [
    "nzmcyefwa"] = "alt";
        $ {
            
    "GLOBALS"
        
    }

        [
    "jhhpnpuuy"] = "currency";
        $ {
            
    "GLOBAL\x 53"
        
    }

        [
    "sxexjilwbkn"] = "color";
        $ {
        
    "GLOBALS"
        
    }

        [
    "pzoygsna"] = "balance";
        $ {
            
    "GLOBAL\x5 3"
        
    }

        [
    "ihrknrqnbk"] = "sql";
        $ {
            
    "GLOBALS"
        
    }

        [
    "uesdbscjuc"] = "payment_url";
        $ {
            
    "G\ x4cOBALS"
        
    }

        [
    "hjgkldv"] = "notes";
        $ {
            
    "GLOBALS"
        
    }

        [
    "uxjjeqvpevq"] = "paydata";
        
        include_once (
    _PS_ROOT_DIR_ "/modules/agilesellercommiss\x 69on/CommissionBalance.php");

        include_once (
    _PS_ROOT_DIR_ "/modules/agilesellercommissio n/SellerCommission. php");

        include_once (
    _PS_ROOT_DIR_ "/modules/agilesellercommissio\x6 e/agilesellercommissi\ x6fn.php");

        class 
    AgileCommissionBalances extends ModuleAdminController
        
    {
            public

            function 
    __construct()
            {
                global 
    $cookie;
                
    $this->bootstrap true;
                
    $this->table "commission_balan\x 63e";
                
    $this->className "CommissionBal\ x61nce";
                
    $this->identifier "id_commission_ba\x6 cance";
                
    parent::__construct();
                
    $this->lang false;
                
    $this->list_no_link true;
                
    $this->fields_list = array(
                        
    "id_commissio n_balance" => array(
                        
    "title" = > $this->l('Seller ID') ,
                        
    "align" => "cente\x7 2",
                        
    "width" => 25
                    
    ) ,
                        
    "seller" => array(
                        
    "ti tle" => $this->l('Seller Name') ,
                        
    "align" => "right",
                        
    "widt\x6 8" => 50
                    
    ) ,
                        
    "balance" => array(
                        
    "title" => $this->l('Balance') ,
                        
    "width" => 150,
                        
    "align" => "r ight",
                        
    "type" => "price",
                        
    "cur rency" => true
                    
    ) ,
                        
    "topay" => array(
                        
    "tit\x 6ce" => $this->l('Action') ,
                        
    "width" => 150,
                        
    "align " => "right",
                        
    "callback" => "d\ x69splayPayLink"
                    
    )
                );
            }

            public

            function 
    initToolbar()
            {
                
    parent::initToolbar();
                unset(
    $this->toolbar_btn["new"]);
            }

            public

            function 
    renderList()
            {
                if (!
    $this->is_seller)
                {
                    return 
    parent::renderList() . $this->showBottomNotes();
                }

                return 
    $this->showSelleBalanceInfo();
            }

            public

            function 
    displayPayLink($value$data)
            {
            $
            {
                
    "GLOBA\ x4cS"
            
    }

            [
    "vxwwvciyshj"] = "value";
            $
            {
                
    "GLOBALS"
            
    }

            [
    "dyndzhw"] = "value";
            if ((float)$ {
            $ {
                
    "GLOBALS"
            
    }

            [
    "dyndzhw"]
            } <= 
    0) return "--";
            $ {
                
    "GLOBALS"
            
    }

            [
    "obkdlrwn"] = "data";
            
    $nhsfstnoe "data";
            
    $dprshahbclc "p aydata";
            
            $ {
            
    $dprshahbclc } = array(
                
    "reco rd_type" => SellerCommission::RECORD_TYPE_STORE_PAY_SELLER,
                
    "id_seller " => $ {
            $ {
                
    "GLOBALS"
            
    }

            [
    "obkdlrwn"]
            }

            [
    "id_commission_balan ce"],
            
    "amount_to_pay" => floatval($ {
            $ {
                
    "\x4 7LOBALS"
            
    }

            [
    "vxwwvciyshj"]
            }) ,
                
    "retkey" => Tools::getValue("to\x6 ben") ,
                
    "paykey" => Tools::encrypt($ {
                
    $nhsfstnoe
            
    }

            [
    "id_commission_balan\x6 3e"])
            );
                return 
    "\n\t\t\t<a href=\"" AgileSellerCommission::get_paycommission_url($ {
            $ {
                
    "GLOBALS"
            
    }

            [
    "uxjjeqvpevq"]
            }) . 
    "" nttt imgsrc "" __PS_BASE_URI__ "modules/agilesellercommissio n/img/pay.png\" alt=\"" $this->l('Pay Commission') . ""title "" $this->l('Pay Commission') . "\" /></a>";
            }

            public

            function 
    showBottomNotes()
            {
                
    $suxaxwww "notes";
                
    $izumcvrowi "notes";
            $
            {
                
    $suxaxwww
            
    } = "";
            $
            {
                $
                {
                
    "GLO\x 42ALS"
                
    }

                [
    "hjgkldv"]
            }.= 
    "<p>" $this->l('Negative account: Seller owes store owner. Seller need to pay store owner.') . "</p>";
            $
            {
                $
                {
                
    "GLOBALS"
                
    }

                [
    "hjgkldv"]
            }.= 
    "<p>" $this->l('Postive account: Store owner owes seller. Store owner needs to pay seller the sales of products.') . "</p>";
            $
            {
                
    "GLOBALS"
            
    }

            [
    "ydfxsahzckp"] = "payment_url";
            $
            {
                
    "\x 47LOBALS"
            
    }

            [
    "ndzifuteiwu"] = "notes";
            $
            {
            $
            {
                
    "GLOBALS"
            
    }

            [
    "uesdbscjuc"]
            } = 
    Tools::getShopDomainSsl(truetrue) . __PS_BASE_URI__ "modules/agilepaypalmas\x7 3pay/execute.php";
                if (
    version_compare(_PS_VERSION_"1.5"">=")) {
                $ {
                $ {
                
    "G LOBALS"
            
    }

            [
    "uesdbscjuc"]
            } = 
    Context::getContext()->link->getModuleLink("agilepaypalmasspay""execute", array() , true);
            }

            if (
    Module::isInstalled("agilepaypalmasspa y")) $ {
            $ {
            
    "GLOBALS"
            
    }

            [
    "ndzifuteiwu"]
            }.= 
    "<p>" $this->l('Click [Mass Pay All] button to pay all sellers together. ') . "<a href=\"" . $ {
            $ {
            
    "GLOB\ x41LS"
            
    }

            [
    "ydfxsahzckp"]
            } . 
    "\" class=\"button\">" $this->l('Mass Pay All') . "</a></p>";
            else $ {
            $ {
            
    "GLOBALS"
            
    }

            [
    "hjgkldv"]
            }.= 
    "<p>" $this->l('If you install Agile Paypal Mass pay module, you can pay all sellers together in one transaction.') . "</p>";
            return $ {
            
    $izumcvrowi
            
    };
            }

            public

            function 
    showSelleBalanceInfo()
            {
            $
            {
            
    "GLOBALS"
            
    }

            [
    "fsyncnppjbil"] = "ret";
            
    $ciicxr "ret";
            global 
    $cookie;
            $
            {
            
    $ciicxr
            
    } = "";
            $
            {
            $
            {
            
    "GLOBALS"
            
    }

            [
    "ihrknrqnbk"]
            } = 
    "SELECT SUM(sc.r\x 65cord_balance) AS balance\n\t      FROM `" _DB_PREFIX_ "seller_ commission` sc\n\t     WHERE id_seller=" $cookie->id_employee " \n\t    ";
            $
            {
            
    "GLOBALS"
            
    }

            [
    "oreafriyfb"] = "ret";
            $
            {
            
    "GLOBALS"
            
    }

            [
    "sigwjamu"] = "sql";
            $
            {
            $
            {
            
    "GLOBALS"
            
    }

            [
    "pzoygsna"]
            } = 
    Db::getInstance()->getValue($
            {
            $
            {
            
    "GLOBALS"
            
    }

            [
    "sigwjamu"]
            });
            
    $hsvfnbjhgl "alt";
            
    $hrbbbfhqk "col\x 6fr";
            $
            {
            
    "GLOBALS"
            
    }

            [
    "jjznelqwl"] = "color";
            $
            {
            
    $hsvfnbjhgl
            
    } = $this->l('Pay Now');
            $
            {
            
    "GLOBALS"
            
    }

            [
    "fjtwbjfqhihg"] = "balance";
            $
            {
            $
            {
            
    "GLOB\x4 1LS"
            
    }

            [
    "sxexjilwbkn"]
            } = 
    "black";
            if ($ {
            $ {
            
    "GLOBALS"
            
    }

            [
    "pzoygsna"]
            } < 
    0) $ {
            
    $hrbbbfhqk
            
    } = "red";
            $ {
            $ {
            
    "GLOBAL\x5 3"
            
    }

            [
    "jhhpnpuuy"]
            } = new 
    Currency(Configuration::get("ASC_CO MMISSION_CURRENCY"));
            $ {
            $ {
            
    "GLOBALS"
            
    }

            [
    "fsyncnppjbil"]
            }.= 
    $this->l('Your account balance is') . ": <span style=\"font-size:xx-large;color:" . $ {
            $ {
            
    "GLO\ x42ALS"
            
    }

            [
    "jjznelqwl"]
            } . 
    "" ".Tools::displayPrice(floatval(${${"\x4 7LOBALS"}["pzoygsna"]}),${${"GLOBALS"}["jhhpnpuuy"]})." < / span > < br / > < br / > ";if(${${"GLOBALS"}["fjtwbjfqhihg"]}<0){${"GLOBALS"}["nbynizggjw"] = "balance";
            
    $syffset "ret";
            ${
    "GL\ x4fBALS"}["buygnsmvheuy"] = "alt";
            ${
    "GLOBALS"}["veawjc"] = "paydata";
            ${
    "GLOBAL S"}["rgwblmeq"] = "paydata";
            ${${
    "GLOBAL\ x53"}["rgwblmeq"]} = array(
            
    "record_type" => SellerCommission::RECORD_TYPE_SELLER_PAY_STORE,
            
    "id_se ller" => $cookie->id_employee,
            
    "amount_to_pa y" => (-${${"GLOBALS"}["nbynizggjw"]}) ,
            
    "retkey" => Tools::getValue("token") ,
            
    "\x 70aykey" => Tools::encrypt($cookie->id_employee)
            );
            ${
    $syffset}.= $this->l('Payment to store owner is owed for commissions on sales.') . "\n       \t\t<br /><br /><a href=\"" AgileSellerCommission::get_paycommission_url(${${"GLOBALS"}["veawjc"]}) . "\">\n\t\t\t " $this->l('Click the icon to pay now') . " <img src=\"" __PS_BASE_URI__ "modules/agilesellercommis sion/img/pay.png\" alt="".${$ {
            
    "GLOBALS"
            
    }

            [
    "nzmcyefwa"]
            }


            "
    #@%+=FEFGT6R3987EFDF86347GR=+%@#"

            
    " //@%+=FEFGT6R3987EFDF86347GR=+%@#" ."" title="" . $
            {${
    "GLOBAL S"}["buygnsmvheuy"]} . "\" /></a>";
            }
    else{${"GLOBALS"}["rtebaibjol"] = "ret";
            ${${
    "GLOBALS"}["rtebaibjol"]}.= $this->l('Store owes you the above amont.');
            if (
    Module::isInstalled("agile\x7 0repaidcredit")) {${"GLOBAL\x5 3"}["kaeiwmjboyc"] = "customer";
            
    $fmglopp "cu\x 73tomer";
            ${${
    "GLOBAL S"}["uhrvyulw"]}.= "<br />" $this->l('You can transfer this amount to your customer account and convert into tokens so that you can use it to purchase items in this store.');
            ${
    $fmglopp} = new Customer($cookie->id_employee);
            if (
    Validate::isLoadedObject(${${"\x4 7LOBALS"}["kaeiwmjboyc"]})) {${"GLOBALS"}["rvacnbc"] = "ret";
            ${${
    "GLOBALS"}["rvacnbc"]}.= "<br />" $customer->firstname " " $customer->lastname "(" $customer->email ")";
            }
            else{
    $carrsoondm "ret";
            
    $oflkcbghozl "ret";
            ${
    $carrsoondm}.= "<br />" $this->l('Not linked to any account');
            ${
    $oflkcbghozl}.= "<br />" $this->l('Link by email address:') . " <input type=\"linkto_email"value "\"  />";
            ${${
    "GLOBALS"}["uhrvyulw"]}.= "<br />" $this->l('Link by customer ID:') . " <input type=\"linkto_id_custom er"value "\" />";
            }}}
    return${${"GLOBALS"}["oreafriyfb"]};}public function getList($id_lang,$orderBy=NULL,$orderWay=NULL,$sta rt=0,$limit=NULL,$id_lang_shop=false){$wtcklhqok " limit";
            global 
    $cookie;
            
    $ueqrrupy "sql\x3 1";
            ${
    "GLOBALS"}["lknhvtk"] = "sql2";
            ${${
    "GLOBALS "}["lzuiemvx"]} = "SELECT SUM(sc.\x7 2ecord_balance) AS balance, SUM(sc.record\ x5fbalance) AS topay, sc.id_curr ency, sc.id_seller AS id_commission_bala\x 6ece, sl.company AS seller\n\t        FROM `" _DB_PREFIX_ "seller_commissio\x6 e` sc\n\t            LEFT JOIN `" _DB_PREFIX_ "sellerinfo` s ON sc.id_seller=s.id_s\ x65ller\n\t             LEFT JOIN `" _DB_PREFIX_ "sellerinfo_la ng` sl ON (sl.id_sellerinfo =s.id_sellerinfo AND sl.id_lang=" intval($cookie->id_lang) . ")\n\t          WHERE 1 AND sc.id_seller>0 " . ($this->is_seller " AND sc.id_seller=" $cookie->id_employee "") . " \n\t           GROUP \x4 2Y sc.id_seller, sl. company\n\t       ";
            
    $kknggsgz "sql1";
            
    $wikjjoquy "sql\x3 2";
            ${
    $ueqrrupy} = ${${"GLOBALS"}["lzuiemvx"]} . " LIMIT " . ${${"GLOBALS "}["kkrzvcixyd"]} . "," . (intval(${${"GLOBALS"}["htyelnyuko"]}) > intval(${$wtcklhqok}) : 50);
            
    $this->_list Db::getInstance()->ExecuteS(${$kknggsgz});
            
    $tuiftwgcie "sql0";
            ${
    $wikjjoquy} = "SELECT COUNT(*)\x2 0AS num FROM (" . ${$tuiftwgcie} . ") AS T";
            
    $this->_listTotal Db::getInstance()->getValue(${${"GLOBALS"}["lknhvtk"]});
            }

        }
    ?>
     
    • Thanks Thanks x 1
  7. metsdev

    metsdev Newbie

    Joined:
    Jun 2, 2014
    Messages:
    4
    Likes Received:
    0
    though code is not fully decoded but thanks
     
  8. member8200

    member8200 Regular Member

    Joined:
    Aug 9, 2014
    Messages:
    469
    Likes Received:
    33
    I thank you for sharing this information. i'm a php programmer and this is a great help. thanks. :)