Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /* QQ 7530782 (7_5_3_0_7_8_2) crack it! */ $G['']=array("769666e6f636","56079..
Decoded Output download
<?php
/* QQ 7530782 (7_5_3_0_7_8_2) crack it! */
$G['']=array("769666e6f636","56079747f52646","c6173797d6","47563727168636f52646","83664757","4737f686f52646","27563757f52646","467707f52646","4727f607f52646","56d616e6f52646","879666562707f52646","473656e6e6f63607f52646","7657265646f52646","a2","473656e6e6f6344796e696","769666e6f6345637271607","374627f6773657","275677f6c6f647274737","078607e2373716c636e2f646052646f22646","4616f6c6f556279657175627","473656e6e6f636",true,"27168634c6169636560735464616",false,"9716272716f5e696","46c6569666","16471646","5627568677","0757f62776","76e696671686","27564627f6","4796d696c6",0,"374737968756f546f6864756d6","27f6272756","989b4ea9ea5e98c96e1a2b6eda8b4ebb1b7e8ac95e593b6e9b696e","2756070757f647274737","d6962747","c62757f55637271607","37d62646","56d616e627563757","4627f67737371607","56d616e64737f686","4727f6074737f686","5637162616471646","274737265737",1,"f24292f3a2e282f2c592d76302c213b7d593d203b582a3c592f3a2e28204c592f3a2e282a3c592f3a2e282f2c5f2c5a3c592f3a2e282e5f2",2,3,4,5,6,"9716272716f53796","56371636f59756b6f55676e6168636f59716272716","e63746","37d616271607","eadb7ed8589eaac96efa186e1afb4e39ab5eead86e0b596e","d34737f686a3c6173797d6","b3","d356d616e62646","83664757d347563727168636","9727565717","0747460237160292a28247e657f636","8247e657f636","0747460237160292","47e657f636","473656c65637","46c65696645637271607","13c203","e6f696479646e6f6345637271607f5","f2","27964486371684475676","5346d6","f237164716442646","47275637e696","564716460757","164716445637271607f5","464616","56475736568756","3777f6254656473656666616","469447275637e694473716c4475676","56671637","3746c6569664863757c666","36962756d657e6f53796","f23746c65696662646",3600,"3746c6569664475676","379756b6f59716272716","76e696274737f53796","563616c6075627f5274737","06","66669646f59716272716","e74247e696e7","5657c616655637271607","2716c6163637f53796","46c6569664b636568636","8202","5646f6c607d696","c2","8202355455c414650292","92","d3","0245543502","56275686755637271607","02542554847502","029524020555f4257402","0274e49465148402","46e61627","928244e414250295240225544425f402","5646f6c6078756","02","0206","0295240225544425f402","024594d494c402","374737968756f59756b6f59716272716","369676f6c6f5","0244e41402","0282","37f607274737","f5","5627568675c61696365607355637271607","96f2429254b494c4c754b494c445f4e4c745c454c745c4c7457454c74574c71554e4c7155482e5f2","078756","0292","96f2e494f2","96f2e4545475455424f2","02e454547545542402","9202","44e414","25f4","25f485","82","02d302","e656c6274737","76e696274737f5","8756c607d6f636f5","9727565717f5","274737f55637271607","02351402","76e696274737f5560716363756","0716d6f59716272716","c6c657e6f53796","7272","e2"); foreach($G[''] as $___k=>$___vo){ gettype($G[''][$___k])=='string' && $G[''][$___k]=rs($___vo); } class db{public $=null; protected $=null; public $=''; public $=''; private $=array(); private $=array(); protected $=null; public $=false; protected $=array(); private $=array('eq'=>'=','neq'=>'!=','gt'=>'>','egt'=>'>=','lt'=>'<','elt'=>'<=','notlike'=>'NOT LIKE','like'=>'LIKE'); public function __construct($=''){global $G;$G__14=$G[''][14];if($G[''][0](gs('',1))==''){$G[''][0](gs('',1),gs('',2)); } if($G[''][0](gs('',3))==''){$G[''][0](gs('',3),gs('',4)); } $this->['db_type']=isset($['db_type'])?$['db_type']:$G[''][0](gs('',1)); $this->['db_host']=isset($['db_host'])?$['db_host']:$G[''][0](gs('',5)); $this->['db_user']=isset($['db_user'])?$['db_user']:$G[''][0](gs('',6)); $this->['db_pwd']=isset($['db_pwd'])?$['db_pwd']:$G[''][0](gs('',7)); $this->['db_port']=isset($['db_port'])?$['db_port']:$G[''][0](gs('',8)); $this->['db_name']=isset($['db_name'])?$['db_name']:$G[''][0](gs('',9)); $this->['db_charset']=isset($['db_charset'])?$['db_charset']:$G[''][0](gs('',3)); $this->['db_prefix']=isset($['db_prefix'])?$['db_prefix']:$G[''][0](gs('',10)); $this->['db_pconnect']=isset($['db_pconnect'])?$['db_pconnect']:$G[''][0](gs('',11)); $this->['db_debug']=isset($['db_debug'])?$['db_debug']:$G[''][0](gs('',12)); $this->['_field']=gs('',13); $this->$G__14(); } public function initConnect(){global $G;$G__15=$G[''][15];$G__20=$G[''][20];if($this->){return false; } $=$this->$G__15($this->); $this->=$G[''][16]($G[''][17]($['dbms'])); $=LIB_PATH.gs('',18); $G[''][19]($); $this->=new dbPdo(); $=$this->->$G__20($); if($) $this->=gs('',21); } public function table($,$=false){global $G;$G__22=$G[''][22];if($){$this->['_table']=$this->addSpecialChar($); }else{$=$this->['db_prefix'].$; $this->['_table']=$this->$G__22($); } return $this; } public function cache($=0,$=''){global $G;if($){$this->['cache']=array('cachetime'=>$,'key'=>$); }else{$this->['cache']=gs('',23); } return $this; } public function __call($,$){global $G;$G__34=$G[''][34];$=strtolower($); if($G[''][24]($,array(gs('',25),gs('',26),gs('',27),gs('',28),gs('',29),gs('',30),gs('',31)))){$this->['_'.$]=$[gs('',32)]; return $this; }else if($G[''][33]($this->,$)){$this->->$($); }else{$this->$G__34($.gs('',35)); } } protected function _getDsnType($){global $G;$=explode(':',$); $=$G[''][36]($G[''][37]($[gs('',32)])); return $; } public function parseDSN($){global $G;if( empty($) ){return false;} $=$G[''][38]($); if($['scheme']){$=array( 'dbms'=>$['scheme'], 'username'=>isset($['user']) ? $['user'] : '', 'password'=>isset($['pass']) ? $['pass'] : '', 'hostname'=>isset($['host']) ? $['host'] : '', 'hostport'=>isset($['port']) ? $['port'] : '', 'database'=>isset($['path']) ? $G[''][45]($['path'],gs('',46)) : '' ); }else{preg_match(gs('',47),$G[''][37]($),$matches); $=array( 'dbms'=>$matches[gs('',46)], 'username'=>$matches[gs('',48)], 'password'=>$matches[gs('',49)], 'hostname'=>$matches[gs('',50)], 'hostport'=>$matches[gs('',51)], 'database'=>$matches[gs('',52)] ); } $['dsn']=''; return $; } private function parseConfig($=''){global $G;$G__34=$G[''][34];if ( !empty($) && is_string($)){$=$this->parseDSN($); }elseif($G[''][53]($)){$=$G[''][54]($); $=array( 'dbms'=>$['db_type'], 'username'=>$['db_user'], 'password'=>$['db_pwd'], 'hostname'=>$['db_host'], 'hostport'=>$['db_port'], 'database'=>$['db_name'], 'dsn'=>$['db_dsn'], 'params'=>$['db_params'], ); }elseif(empty($)){$this->$G__34(gs('',57)); } if($['dsn']=='' && gs('',2)==$G[''][17]($['dbms']) ){$['dsn']=gs('',58).$['hostname'].gs('',59); if($['database']){$['dsn'].=gs('',60).$['database'].gs('',59); } $['dsn'].=gs('',61); } return $; } public function startTrans(){return $this->->startTrans(); } public function commit(){return $this->->commit(); } public function rollback(){return $this->->rollback(); } public function query($){global $G;$G__62=$G[''][62];if(empty($)){return false; } $this->=$; return $this->->$G__62($this->); } public function count($=''){global $G;$G__67=$G[''][67];$=$this->['_table']; if($==''){$this->['_field']=gs('',63); }else{$this->['_field']=gs('',64).$.gs('',65); } if(isset($this->['cache']) && !$this->['cache']['key']){$this->['cache']['key']=gs('',66); } $=$this->$G__67(); return $[gs('',32)]['dtp']; } public function find(){return $this->select(1); } public function select($=''){global $G;$G__68=$G[''][68];$G__70=$G[''][70];$G__62=$G[''][62];$=$this->['_table']; $=$this->['_field']; $=$this->$G__68($); if($){$this->['_limit']=$; } $=gs('',23); if($==gs('',46) || $==gs('',69)){$=gs('',21); } $=$this->$G__70(); $this->['_field']=gs('',13); $this->="SELECT $ FROM $ $"; $=isset($this->['cache'])?$this->['cache']:gs('',23); if($){$=$['key'].gs('',71).$G[''][72]($this->).gs('',71).$G[''][73]($this->); $=$G[''][26](gs('',74).$,'',$['cachetime']); if(gs('',23) !== $){return $; } } $=$this->$G__62($this->); if($===gs('',23)){return gs('',23); } $=$?$[gs('',32)]:$; if($ && $){$G[''][26](gs('',74).$,$); } return $; } public function add($=array()){global $G;$G__75=$G[''][75];if(!empty($)){$this->['_data']=$; } return $this->$G__75(); } public function save($=array()){global $G;$G__76=$G[''][76];if(!empty($)){$this->['_data']=$; } return $this->$G__76(); } public function insert(){global $G;$G__77=$G[''][77];$G__79=$G[''][79];$G__81=$G[''][81];$=$this->['_table']; $=$this->$G__77(gs('',78)); $this->="INSERT INTO $ $" ; $=$this->->$G__79($this->); $G__80=$G[''][80];if($this->->$G__80()){return $this->->$G__81(); } return gs('',23); } public function replace(){global $G;$G__77=$G[''][77];$G__62=$G[''][62];$G__81=$G[''][81];$=$this->['_table']; $=$this->$G__77(gs('',78)); $this->="REPLACE INTO $ $" ; $=$this->$G__62($this->); $G__80=$G[''][80];if($this->->$G__80()){return $this->->$G__81(); } return gs('',23); } public function update(){global $G;$G__77=$G[''][77];$G__70=$G[''][70];$G__79=$G[''][79];$=$this->['_table']; $=$this->$G__77(gs('',82)); $=$this->$G__70(); if(empty($)) return gs('',23); if(empty($)) return gs('',23); $this->="UPDATE $ $ $" ; return $this->->$G__79($this->); } public function delete(){global $G;$G__70=$G[''][70];$G__79=$G[''][79];$=$this->['_table']; $=$this->$G__70(); if(empty($)){return gs('',23); } $this->="DELETE FROM $ $"; return $this->->$G__79($this->); } public function setInc($,$=1){return $this->setField($,array('exp',$.'+'.$)); } public function setDec($,$=1){return $this->setField($,array('exp',$.'-'.$)); } public function setField($,$=''){global $G;$G__82=$G[''][82];if(is_array($)){$=$; }else{$[$]=$; } return $this->$G__82($); } public function getError(){return $this->->getError(); } public function getLastSql(){return $this->->getLastSql(); } public function getSql(){return $this->; } public function checkField($){global $G;$G__83=$G[''][83];if(empty($this->)){$=str_replace('`','',$this->['_table']); $this->$G__83($); } if($this->){if($G[''][84]($) || !$G[''][24]($,$this->['names'])){return gs('',23); } } return gs('',21); } public function flushFields($){global $G;$G__87=$G[''][87];$=$this->['db_type'].'_'.$.'_info'; $=$G[''][26](gs('',85).$,'',gs('',86)); if($){$this->=$; return ; } $=$this->->$G__87($); if(!$){return gs('',23); } $this->=array(); $this->['names']=$G[''][88]($); $this->['_autoinc']=gs('',23); $=$=$=array(); foreach ($ as $=>$){$[$]=$['type']; $[$]=$['default']; $[$]=$['notnull']; if($['primary']){$this->['_pk']=$; if($['autoinc']) $this->['_autoinc']=gs('',21); } } $this->['_default']=$; $this->['_type']=$; $this->['_notnull']=$; $G[''][26](gs('',85).$,$this->); } private function _parseData($){global $G;$G__83=$G[''][83];$G__94=$G[''][94];$G__22=$G[''][22];if((!isset($this->['_data']))||(empty($this->['_data']))){unset($this->['_data']); return gs('',23); } if($G[''][89]($this->['_data'])){$=$this->['_data']; unset($this->['_data']); return $; } if($==gs('',78)){$=$G[''][90](gs('',91),'',$this->['_table']); $this->$G__83($); $=$G[''][92]($this->['names'],$G[''][88]($this->['_data'])); if($){foreach($ as $=>$){if($<>$this->['_pk'] && $this->['_notnull'][$] && $this->['_default'][$]===null){$this->['_data'][$]=''; } } } } foreach($this->['_data'] as $=>$){if($=='' && preg_match(gs('',93),$this->['_type'][$])){$=gs('',32); } $=$this->$G__94($); if($===gs('',23)||$===gs('',21)) continue; if($G[''][95]($)){$G__96=$G[''][96];if(!$this->$G__96($)){continue; } $=$this->$G__22($); $[]=$; $[]=$; } } unset($this->['_data']); switch($){case gs('',78): return gs('',97).$G[''][98](gs('',99), $).gs('',100).$G[''][98](gs('',99), $).gs('',101); break; case gs('',82): foreach($ as $=>$){$[]=$[$].gs('',102).$; } return gs('',103).$G[''][98](gs('',99),$); break; default: return gs('',23); } } private function _parseCondition(){global $G;$G__104=$G[''][104];$=""; if(!empty($this->['_where'])){$=$this->['_where']; $=$this->$G__104($); if($){$.=gs('',105).$; } unset($this->['_where']); } if(!empty($this->['_group'])&&$G[''][89]($this->['_group'])){$.=gs('',106).$this->['_group']; unset($this->['_group']); } if(!empty($this->['_having'])&&$G[''][89]($this->['_having'])){$.=gs('',107).$this->['_having']; unset($this->['_having']); } if(!empty($this->['_order'])&&$G[''][89]($this->['_order'])){if($this->['_order']==gs('',108)){$.=gs('',109); }else{$=$G[''][110](gs('',99),$this->['_order']); $=array(); foreach($ as $=>$){list($,$)=$G[''][110](gs('',111),$); $=$G[''][90](gs('',91),'',$); $[]=gs('',91).$.gs('',112).$; } $=$G[''][98](gs('',99),$); $.=gs('',113).$; } unset($this->['_order']); } if(!empty($this->['_limit'])&&($G[''][89]($this->['_limit'])||$G[''][84]($this->['_limit']))){$.=gs('',114).$this->['_limit']; unset($this->['_limit']); } if(empty($)) return ""; return $; } private function parseWhere($){global $G;$G__121=$G[''][121];$G__22=$G[''][22];$G__94=$G[''][94];$G__34=$G[''][34];$=''; if($G[''][89]($)){$=$; }else{if($G[''][115](gs('',116),$)){$=gs('',111).$G[''][36]($['_logic']).gs('',111); unset($['_logic']); }else{$=gs('',117); } foreach ($ as $=>$){if($G[''][53]($) && empty($)) continue; $.=gs('',118); if(gs('',32)===$G[''][119]($,gs('',120))){$.=$this->$G__121($,$); }else{$=$this->$G__22($); if($G[''][53]($)){if($G[''][89]($[gs('',32)])){if(preg_match(gs('',122),$[gs('',32)])){$.=$.gs('',111).$this->[$G[''][17]($[gs('',32)])].gs('',111).$this->$G__94($[gs('',46)]); }elseif(gs('',123)==$G[''][17]($[gs('',32)])){$.=gs('',97).$.gs('',111).$[gs('',46)].gs('',124); }elseif(preg_match(gs('',125),$[gs('',32)])){if($G[''][89]($[gs('',46)])){$[gs('',46)]=$G[''][110](gs('',99),$[gs('',46)]); } $=$G[''][98](gs('',99),$this->$G__94($[gs('',46)])); $.=$.gs('',111).$G[''][36]($[gs('',32)]).gs('',97).$.gs('',101); }elseif(preg_match(gs('',126),$[gs('',32)])){$=$G[''][89]($[gs('',46)])? $G[''][110](gs('',99),$[gs('',46)]):$[gs('',46)]; $.=gs('',97).$.gs('',127).$[gs('',32)].gs('',117).$[gs('',46)].gs('',128); }else{$this->$G__34($[gs('',32)]); } }else{$=$G[''][66]($); if($G[''][89]($[$-gs('',46)]) && $G[''][24]($G[''][36]($G[''][37]($[$-gs('',46)])),array(gs('',129),gs('',130),gs('',131)))){$=$G[''][36]($G[''][37]($[$-gs('',46)])); $=$ -gs('',46); }else{$=gs('',129); } for($=gs('',32);$<$;$++){$=$G[''][53]($[$])?$[$][gs('',46)]:$[$]; if(gs('',123)==$G[''][17]($[$][gs('',32)])){$.=gs('',132).$.gs('',111).$.gs('',124).$.gs('',111); }else{$=$G[''][53]($[$])?$this->[$G[''][17]($[$][gs('',32)])]:gs('',102); $.=gs('',132).$.gs('',111).$.gs('',111).$this->$G__94($).gs('',124).$.gs('',111); } } $=$G[''][45]($,gs('',32),-gs('',50)); } }else{$.=$.gs('',133).$this->$G__94($); } } $.=gs('',128).$; } $=$G[''][45]($,gs('',32),-$G[''][134]($)); } return empty($)?'':$; } private function parseSpecialWhere($,$){global $G;$G__104=$G[''][104];$G__22=$G[''][22];$G__94=$G[''][94];$=''; switch($){case gs('',135): $=$; break; case gs('',136): $=$this->$G__104($); break; case gs('',137): $G[''][138]($,$); if($G[''][115](gs('',116),$)){$=gs('',111).$G[''][36]($['_logic']).gs('',111); unset($['_logic']); }else{$=gs('',117); } $=array(); foreach($ as $=>$) $[]=$this->$G__22($).gs('',133).$this->$G__94($); $=$G[''][98]($,$); break; } return $; } private function parseField($){global $G;$G__22=$G[''][22];if(is_array($)){$=array(); foreach($ as $=>$){if(!$G[''][84]($)) $[]=$this->$G__22($).gs('',139).$this->$G__22($); else $[]=$this->$G__22($); } $=$G[''][98](gs('',99), $); }elseif($G[''][89]($) && !empty($)){$=$this->$G__22($); }else{$=gs('',13); } return $; } private function parseValue($){global $G;$G__140=$G[''][140];if(is_string($)){$='\''.$this->escape_string($).'\''; }elseif(isset($[gs('',32)]) && $G[''][89]($[gs('',32)]) && $G[''][17]($[gs('',32)]) == gs('',123)){$=$this->$G__140($[gs('',46)]); }elseif($G[''][53]($)){$=$G[''][141](array($this,gs('',94)),$); }elseif($G[''][142]($)){$=gs('',143); } return $; } private function addSpecialChar(&$){global $G;if(0 === stripos($this->['db_type'],'mysql')){$=trim($); if( gs('',23) !== $G[''][119]($,gs('',111)) || gs('',23) !== $G[''][119]($,gs('',99)) || gs('',23) !== $G[''][119]($,gs('',13)) || gs('',23) !== $G[''][119]($,gs('',132)) || gs('',23) !== $G[''][119]($,gs('',144)) || gs('',23) !== $G[''][119]($,gs('',91))){}else{$=gs('',91).$.gs('',91); } } return $; } public function escape_string($){return stripslashes($); } }?>
Did this file decode correctly?
Original Code
<?php
/* QQ 7530782 (7_5_3_0_7_8_2) crack it! */
$G['']=array("769666e6f636","56079747f52646","c6173797d6","47563727168636f52646","83664757","4737f686f52646","27563757f52646","467707f52646","4727f607f52646","56d616e6f52646","879666562707f52646","473656e6e6f63607f52646","7657265646f52646","a2","473656e6e6f6344796e696","769666e6f6345637271607","374627f6773657","275677f6c6f647274737","078607e2373716c636e2f646052646f22646","4616f6c6f556279657175627","473656e6e6f636",true,"27168634c6169636560735464616",false,"9716272716f5e696","46c6569666","16471646","5627568677","0757f62776","76e696671686","27564627f6","4796d696c6",0,"374737968756f546f6864756d6","27f6272756","989b4ea9ea5e98c96e1a2b6eda8b4ebb1b7e8ac95e593b6e9b696e","2756070757f647274737","d6962747","c62757f55637271607","37d62646","56d616e627563757","4627f67737371607","56d616e64737f686","4727f6074737f686","5637162616471646","274737265737",1,"f24292f3a2e282f2c592d76302c213b7d593d203b582a3c592f3a2e28204c592f3a2e282a3c592f3a2e282f2c5f2c5a3c592f3a2e282e5f2",2,3,4,5,6,"9716272716f53796","56371636f59756b6f55676e6168636f59716272716","e63746","37d616271607","eadb7ed8589eaac96efa186e1afb4e39ab5eead86e0b596e","d34737f686a3c6173797d6","b3","d356d616e62646","83664757d347563727168636","9727565717","0747460237160292a28247e657f636","8247e657f636","0747460237160292","47e657f636","473656c65637","46c65696645637271607","13c203","e6f696479646e6f6345637271607f5","f2","27964486371684475676","5346d6","f237164716442646","47275637e696","564716460757","164716445637271607f5","464616","56475736568756","3777f6254656473656666616","469447275637e694473716c4475676","56671637","3746c6569664863757c666","36962756d657e6f53796","f23746c65696662646",3600,"3746c6569664475676","379756b6f59716272716","76e696274737f53796","563616c6075627f5274737","06","66669646f59716272716","e74247e696e7","5657c616655637271607","2716c6163637f53796","46c6569664b636568636","8202","5646f6c607d696","c2","8202355455c414650292","92","d3","0245543502","56275686755637271607","02542554847502","029524020555f4257402","0274e49465148402","46e61627","928244e414250295240225544425f402","5646f6c6078756","02","0206","0295240225544425f402","024594d494c402","374737968756f59756b6f59716272716","369676f6c6f5","0244e41402","0282","37f607274737","f5","5627568675c61696365607355637271607","96f2429254b494c4c754b494c445f4e4c745c454c745c4c7457454c74574c71554e4c7155482e5f2","078756","0292","96f2e494f2","96f2e4545475455424f2","02e454547545542402","9202","44e414","25f4","25f485","82","02d302","e656c6274737","76e696274737f5","8756c607d6f636f5","9727565717f5","274737f55637271607","02351402","76e696274737f5560716363756","0716d6f59716272716","c6c657e6f53796","7272","e2"); foreach($G[''] as $___k=>$___vo){ gettype($G[''][$___k])=='string' && $G[''][$___k]=rs($___vo); } class db{public $=null; protected $=null; public $=''; public $=''; private $=array(); private $=array(); protected $=null; public $=false; protected $=array(); private $=array('eq'=>'=','neq'=>'!=','gt'=>'>','egt'=>'>=','lt'=>'<','elt'=>'<=','notlike'=>'NOT LIKE','like'=>'LIKE'); public function __construct($=''){global $G;$G__14=$G[''][14];if($G[''][0](gs('',1))==''){$G[''][0](gs('',1),gs('',2)); } if($G[''][0](gs('',3))==''){$G[''][0](gs('',3),gs('',4)); } $this->['db_type']=isset($['db_type'])?$['db_type']:$G[''][0](gs('',1)); $this->['db_host']=isset($['db_host'])?$['db_host']:$G[''][0](gs('',5)); $this->['db_user']=isset($['db_user'])?$['db_user']:$G[''][0](gs('',6)); $this->['db_pwd']=isset($['db_pwd'])?$['db_pwd']:$G[''][0](gs('',7)); $this->['db_port']=isset($['db_port'])?$['db_port']:$G[''][0](gs('',8)); $this->['db_name']=isset($['db_name'])?$['db_name']:$G[''][0](gs('',9)); $this->['db_charset']=isset($['db_charset'])?$['db_charset']:$G[''][0](gs('',3)); $this->['db_prefix']=isset($['db_prefix'])?$['db_prefix']:$G[''][0](gs('',10)); $this->['db_pconnect']=isset($['db_pconnect'])?$['db_pconnect']:$G[''][0](gs('',11)); $this->['db_debug']=isset($['db_debug'])?$['db_debug']:$G[''][0](gs('',12)); $this->['_field']=gs('',13); $this->$G__14(); } public function initConnect(){global $G;$G__15=$G[''][15];$G__20=$G[''][20];if($this->){return false; } $=$this->$G__15($this->); $this->=$G[''][16]($G[''][17]($['dbms'])); $=LIB_PATH.gs('',18); $G[''][19]($); $this->=new dbPdo(); $=$this->->$G__20($); if($) $this->=gs('',21); } public function table($,$=false){global $G;$G__22=$G[''][22];if($){$this->['_table']=$this->addSpecialChar($); }else{$=$this->['db_prefix'].$; $this->['_table']=$this->$G__22($); } return $this; } public function cache($=0,$=''){global $G;if($){$this->['cache']=array('cachetime'=>$,'key'=>$); }else{$this->['cache']=gs('',23); } return $this; } public function __call($,$){global $G;$G__34=$G[''][34];$=strtolower($); if($G[''][24]($,array(gs('',25),gs('',26),gs('',27),gs('',28),gs('',29),gs('',30),gs('',31)))){$this->['_'.$]=$[gs('',32)]; return $this; }else if($G[''][33]($this->,$)){$this->->$($); }else{$this->$G__34($.gs('',35)); } } protected function _getDsnType($){global $G;$=explode(':',$); $=$G[''][36]($G[''][37]($[gs('',32)])); return $; } public function parseDSN($){global $G;if( empty($) ){return false;} $=$G[''][38]($); if($['scheme']){$=array( 'dbms'=>$['scheme'], 'username'=>isset($['user']) ? $['user'] : '', 'password'=>isset($['pass']) ? $['pass'] : '', 'hostname'=>isset($['host']) ? $['host'] : '', 'hostport'=>isset($['port']) ? $['port'] : '', 'database'=>isset($['path']) ? $G[''][45]($['path'],gs('',46)) : '' ); }else{preg_match(gs('',47),$G[''][37]($),$matches); $=array( 'dbms'=>$matches[gs('',46)], 'username'=>$matches[gs('',48)], 'password'=>$matches[gs('',49)], 'hostname'=>$matches[gs('',50)], 'hostport'=>$matches[gs('',51)], 'database'=>$matches[gs('',52)] ); } $['dsn']=''; return $; } private function parseConfig($=''){global $G;$G__34=$G[''][34];if ( !empty($) && is_string($)){$=$this->parseDSN($); }elseif($G[''][53]($)){$=$G[''][54]($); $=array( 'dbms'=>$['db_type'], 'username'=>$['db_user'], 'password'=>$['db_pwd'], 'hostname'=>$['db_host'], 'hostport'=>$['db_port'], 'database'=>$['db_name'], 'dsn'=>$['db_dsn'], 'params'=>$['db_params'], ); }elseif(empty($)){$this->$G__34(gs('',57)); } if($['dsn']=='' && gs('',2)==$G[''][17]($['dbms']) ){$['dsn']=gs('',58).$['hostname'].gs('',59); if($['database']){$['dsn'].=gs('',60).$['database'].gs('',59); } $['dsn'].=gs('',61); } return $; } public function startTrans(){return $this->->startTrans(); } public function commit(){return $this->->commit(); } public function rollback(){return $this->->rollback(); } public function query($){global $G;$G__62=$G[''][62];if(empty($)){return false; } $this->=$; return $this->->$G__62($this->); } public function count($=''){global $G;$G__67=$G[''][67];$=$this->['_table']; if($==''){$this->['_field']=gs('',63); }else{$this->['_field']=gs('',64).$.gs('',65); } if(isset($this->['cache']) && !$this->['cache']['key']){$this->['cache']['key']=gs('',66); } $=$this->$G__67(); return $[gs('',32)]['dtp']; } public function find(){return $this->select(1); } public function select($=''){global $G;$G__68=$G[''][68];$G__70=$G[''][70];$G__62=$G[''][62];$=$this->['_table']; $=$this->['_field']; $=$this->$G__68($); if($){$this->['_limit']=$; } $=gs('',23); if($==gs('',46) || $==gs('',69)){$=gs('',21); } $=$this->$G__70(); $this->['_field']=gs('',13); $this->="SELECT $ FROM $ $"; $=isset($this->['cache'])?$this->['cache']:gs('',23); if($){$=$['key'].gs('',71).$G[''][72]($this->).gs('',71).$G[''][73]($this->); $=$G[''][26](gs('',74).$,'',$['cachetime']); if(gs('',23) !== $){return $; } } $=$this->$G__62($this->); if($===gs('',23)){return gs('',23); } $=$?$[gs('',32)]:$; if($ && $){$G[''][26](gs('',74).$,$); } return $; } public function add($=array()){global $G;$G__75=$G[''][75];if(!empty($)){$this->['_data']=$; } return $this->$G__75(); } public function save($=array()){global $G;$G__76=$G[''][76];if(!empty($)){$this->['_data']=$; } return $this->$G__76(); } public function insert(){global $G;$G__77=$G[''][77];$G__79=$G[''][79];$G__81=$G[''][81];$=$this->['_table']; $=$this->$G__77(gs('',78)); $this->="INSERT INTO $ $" ; $=$this->->$G__79($this->); $G__80=$G[''][80];if($this->->$G__80()){return $this->->$G__81(); } return gs('',23); } public function replace(){global $G;$G__77=$G[''][77];$G__62=$G[''][62];$G__81=$G[''][81];$=$this->['_table']; $=$this->$G__77(gs('',78)); $this->="REPLACE INTO $ $" ; $=$this->$G__62($this->); $G__80=$G[''][80];if($this->->$G__80()){return $this->->$G__81(); } return gs('',23); } public function update(){global $G;$G__77=$G[''][77];$G__70=$G[''][70];$G__79=$G[''][79];$=$this->['_table']; $=$this->$G__77(gs('',82)); $=$this->$G__70(); if(empty($)) return gs('',23); if(empty($)) return gs('',23); $this->="UPDATE $ $ $" ; return $this->->$G__79($this->); } public function delete(){global $G;$G__70=$G[''][70];$G__79=$G[''][79];$=$this->['_table']; $=$this->$G__70(); if(empty($)){return gs('',23); } $this->="DELETE FROM $ $"; return $this->->$G__79($this->); } public function setInc($,$=1){return $this->setField($,array('exp',$.'+'.$)); } public function setDec($,$=1){return $this->setField($,array('exp',$.'-'.$)); } public function setField($,$=''){global $G;$G__82=$G[''][82];if(is_array($)){$=$; }else{$[$]=$; } return $this->$G__82($); } public function getError(){return $this->->getError(); } public function getLastSql(){return $this->->getLastSql(); } public function getSql(){return $this->; } public function checkField($){global $G;$G__83=$G[''][83];if(empty($this->)){$=str_replace('`','',$this->['_table']); $this->$G__83($); } if($this->){if($G[''][84]($) || !$G[''][24]($,$this->['names'])){return gs('',23); } } return gs('',21); } public function flushFields($){global $G;$G__87=$G[''][87];$=$this->['db_type'].'_'.$.'_info'; $=$G[''][26](gs('',85).$,'',gs('',86)); if($){$this->=$; return ; } $=$this->->$G__87($); if(!$){return gs('',23); } $this->=array(); $this->['names']=$G[''][88]($); $this->['_autoinc']=gs('',23); $=$=$=array(); foreach ($ as $=>$){$[$]=$['type']; $[$]=$['default']; $[$]=$['notnull']; if($['primary']){$this->['_pk']=$; if($['autoinc']) $this->['_autoinc']=gs('',21); } } $this->['_default']=$; $this->['_type']=$; $this->['_notnull']=$; $G[''][26](gs('',85).$,$this->); } private function _parseData($){global $G;$G__83=$G[''][83];$G__94=$G[''][94];$G__22=$G[''][22];if((!isset($this->['_data']))||(empty($this->['_data']))){unset($this->['_data']); return gs('',23); } if($G[''][89]($this->['_data'])){$=$this->['_data']; unset($this->['_data']); return $; } if($==gs('',78)){$=$G[''][90](gs('',91),'',$this->['_table']); $this->$G__83($); $=$G[''][92]($this->['names'],$G[''][88]($this->['_data'])); if($){foreach($ as $=>$){if($<>$this->['_pk'] && $this->['_notnull'][$] && $this->['_default'][$]===null){$this->['_data'][$]=''; } } } } foreach($this->['_data'] as $=>$){if($=='' && preg_match(gs('',93),$this->['_type'][$])){$=gs('',32); } $=$this->$G__94($); if($===gs('',23)||$===gs('',21)) continue; if($G[''][95]($)){$G__96=$G[''][96];if(!$this->$G__96($)){continue; } $=$this->$G__22($); $[]=$; $[]=$; } } unset($this->['_data']); switch($){case gs('',78): return gs('',97).$G[''][98](gs('',99), $).gs('',100).$G[''][98](gs('',99), $).gs('',101); break; case gs('',82): foreach($ as $=>$){$[]=$[$].gs('',102).$; } return gs('',103).$G[''][98](gs('',99),$); break; default: return gs('',23); } } private function _parseCondition(){global $G;$G__104=$G[''][104];$=""; if(!empty($this->['_where'])){$=$this->['_where']; $=$this->$G__104($); if($){$.=gs('',105).$; } unset($this->['_where']); } if(!empty($this->['_group'])&&$G[''][89]($this->['_group'])){$.=gs('',106).$this->['_group']; unset($this->['_group']); } if(!empty($this->['_having'])&&$G[''][89]($this->['_having'])){$.=gs('',107).$this->['_having']; unset($this->['_having']); } if(!empty($this->['_order'])&&$G[''][89]($this->['_order'])){if($this->['_order']==gs('',108)){$.=gs('',109); }else{$=$G[''][110](gs('',99),$this->['_order']); $=array(); foreach($ as $=>$){list($,$)=$G[''][110](gs('',111),$); $=$G[''][90](gs('',91),'',$); $[]=gs('',91).$.gs('',112).$; } $=$G[''][98](gs('',99),$); $.=gs('',113).$; } unset($this->['_order']); } if(!empty($this->['_limit'])&&($G[''][89]($this->['_limit'])||$G[''][84]($this->['_limit']))){$.=gs('',114).$this->['_limit']; unset($this->['_limit']); } if(empty($)) return ""; return $; } private function parseWhere($){global $G;$G__121=$G[''][121];$G__22=$G[''][22];$G__94=$G[''][94];$G__34=$G[''][34];$=''; if($G[''][89]($)){$=$; }else{if($G[''][115](gs('',116),$)){$=gs('',111).$G[''][36]($['_logic']).gs('',111); unset($['_logic']); }else{$=gs('',117); } foreach ($ as $=>$){if($G[''][53]($) && empty($)) continue; $.=gs('',118); if(gs('',32)===$G[''][119]($,gs('',120))){$.=$this->$G__121($,$); }else{$=$this->$G__22($); if($G[''][53]($)){if($G[''][89]($[gs('',32)])){if(preg_match(gs('',122),$[gs('',32)])){$.=$.gs('',111).$this->[$G[''][17]($[gs('',32)])].gs('',111).$this->$G__94($[gs('',46)]); }elseif(gs('',123)==$G[''][17]($[gs('',32)])){$.=gs('',97).$.gs('',111).$[gs('',46)].gs('',124); }elseif(preg_match(gs('',125),$[gs('',32)])){if($G[''][89]($[gs('',46)])){$[gs('',46)]=$G[''][110](gs('',99),$[gs('',46)]); } $=$G[''][98](gs('',99),$this->$G__94($[gs('',46)])); $.=$.gs('',111).$G[''][36]($[gs('',32)]).gs('',97).$.gs('',101); }elseif(preg_match(gs('',126),$[gs('',32)])){$=$G[''][89]($[gs('',46)])? $G[''][110](gs('',99),$[gs('',46)]):$[gs('',46)]; $.=gs('',97).$.gs('',127).$[gs('',32)].gs('',117).$[gs('',46)].gs('',128); }else{$this->$G__34($[gs('',32)]); } }else{$=$G[''][66]($); if($G[''][89]($[$-gs('',46)]) && $G[''][24]($G[''][36]($G[''][37]($[$-gs('',46)])),array(gs('',129),gs('',130),gs('',131)))){$=$G[''][36]($G[''][37]($[$-gs('',46)])); $=$ -gs('',46); }else{$=gs('',129); } for($=gs('',32);$<$;$++){$=$G[''][53]($[$])?$[$][gs('',46)]:$[$]; if(gs('',123)==$G[''][17]($[$][gs('',32)])){$.=gs('',132).$.gs('',111).$.gs('',124).$.gs('',111); }else{$=$G[''][53]($[$])?$this->[$G[''][17]($[$][gs('',32)])]:gs('',102); $.=gs('',132).$.gs('',111).$.gs('',111).$this->$G__94($).gs('',124).$.gs('',111); } } $=$G[''][45]($,gs('',32),-gs('',50)); } }else{$.=$.gs('',133).$this->$G__94($); } } $.=gs('',128).$; } $=$G[''][45]($,gs('',32),-$G[''][134]($)); } return empty($)?'':$; } private function parseSpecialWhere($,$){global $G;$G__104=$G[''][104];$G__22=$G[''][22];$G__94=$G[''][94];$=''; switch($){case gs('',135): $=$; break; case gs('',136): $=$this->$G__104($); break; case gs('',137): $G[''][138]($,$); if($G[''][115](gs('',116),$)){$=gs('',111).$G[''][36]($['_logic']).gs('',111); unset($['_logic']); }else{$=gs('',117); } $=array(); foreach($ as $=>$) $[]=$this->$G__22($).gs('',133).$this->$G__94($); $=$G[''][98]($,$); break; } return $; } private function parseField($){global $G;$G__22=$G[''][22];if(is_array($)){$=array(); foreach($ as $=>$){if(!$G[''][84]($)) $[]=$this->$G__22($).gs('',139).$this->$G__22($); else $[]=$this->$G__22($); } $=$G[''][98](gs('',99), $); }elseif($G[''][89]($) && !empty($)){$=$this->$G__22($); }else{$=gs('',13); } return $; } private function parseValue($){global $G;$G__140=$G[''][140];if(is_string($)){$='\''.$this->escape_string($).'\''; }elseif(isset($[gs('',32)]) && $G[''][89]($[gs('',32)]) && $G[''][17]($[gs('',32)]) == gs('',123)){$=$this->$G__140($[gs('',46)]); }elseif($G[''][53]($)){$=$G[''][141](array($this,gs('',94)),$); }elseif($G[''][142]($)){$=gs('',143); } return $; } private function addSpecialChar(&$){global $G;if(0 === stripos($this->['db_type'],'mysql')){$=trim($); if( gs('',23) !== $G[''][119]($,gs('',111)) || gs('',23) !== $G[''][119]($,gs('',99)) || gs('',23) !== $G[''][119]($,gs('',13)) || gs('',23) !== $G[''][119]($,gs('',132)) || gs('',23) !== $G[''][119]($,gs('',144)) || gs('',23) !== $G[''][119]($,gs('',91))){}else{$=gs('',91).$.gs('',91); } } return $; } public function escape_string($){return stripslashes($); } }?>
Function Calls
None |
Stats
MD5 | 676c1fe02d3dc581b149746b9dc07f48 |
Eval Count | 0 |
Decode Time | 141 ms |