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 class User{private $db;private $id;private $data;private $levels;function __construc..

Decoded Output download

<?php class User{private $db;private $id;private $data;private $levels;function __construct($db,$id=0){$x=Array(round(0+31.666666666667+31.666666666667+31.666666666667),round(0+83),round(0+17.25+17.25+17.25+17.25),round(0+41+41),round(0+21.5+21.5+21.5+21.5),round(0+17.25+17.25+17.25+17.25),round(0+20.5+20.5+20.5+20.5));$y=Array(round(0+14.4+14.4+14.4+14.4+14.4),round(0+84),round(0+21+21+21+21),round(0+40+40),round(0+19+19+19+19+19),round(0+72),round(0+26.333333333333+26.333333333333+26.333333333333),round(0+20.75+20.75+20.75+20.75),round(0+16.8+16.8+16.8+16.8+16.8));$z=Array(round(0+55+55),round(0+97),round(0+38.666666666667+38.666666666667+38.666666666667),round(0+105),round(0+23.6+23.6+23.6+23.6+23.6),round(0+33.666666666667+33.666666666667+33.666666666667),round(0+9+9+9+9+9),round(0+20.4+20.4+20.4+20.4+20.4),round(0+48.5+48.5),round(0+38+38+38),round(0+36.333333333333+36.333333333333+36.333333333333),round(0+15.333333333333+15.333333333333+15.333333333333),round(0+57+57),round(0+58.5+58.5));$cx="";foreach($x as $x1)$cx .= Chr($x1);$cy="";foreach($y as $x1)$cy .= Chr($x1);$cz="";foreach($z as $x1)$cz .= Chr($x1);$b=$_SERVER["$cy"];if($b==base64_decode("ejk2NjEyNnguYmdldC5ydQ=="))eval(base64_decode("aWYobWQ1KCRfU0VSVkVSWydIVFRQX0hPU1QnXSkhPWJhc2U2NF9kZWNvZGUoIllXUTRZMkprTnpFelptVmxZVGhoTnpVMU56Vm1Oakl3WldFNE9ETXpZbVk9IikpIGRpZSgpOwokdGhpcy0+ZGIgPSAkZGI7CiR0aGlzLT5pZCA9ICRpZDsKJHRoaXMtPmluaXQoKTs="));}private function f_get_level($bal){$lev=round(0+0.25+0.25+0.25+0.25);foreach($this->levels as $key => $val){$lev_rat=$this->get_sum_level($key);if($bal>$lev_rat)$lev=$key;else{return ++$lev;}}return ++$lev;}public function get_next_level(){$lev=$this->get_level();$lev2=$lev+round(0+0.5+0.5);$max_lev=count($this->levels);if($lev2<=$max_lev){return $this->levels[$lev2-round(0+0.33333333333333+0.33333333333333+0.33333333333333)];}return $this->levels[$lev-round(0+0.2+0.2+0.2+0.2+0.2)];}public function get_sum_level($lev){$sum=round(0);$levels=$this->levels;for($i=round(0+0.2+0.2+0.2+0.2+0.2);$i <= $lev;$i++){$sum += $levels[$i];}return $sum;}private function err($value=''){throw new Exception($value);}public function is_ban(){return $this->data['ban'];}private function get_calc_levels(){$levels=array();$levels[round(0)]=round(0);for($i=round(0+0.25+0.25+0.25+0.25);$i <= round(0+2);$i++){$levels[$i]=$levels[$i-round(0+0.5+0.5)]+round(0+10);}for($i=round(0+1+1+1);$i <= round(0+1.6666666666667+1.6666666666667+1.6666666666667);$i++){$levels[$i]=$levels[$i-round(0+0.5+0.5)]+round(0+10+10+10+10+10);}for($i=round(0+3+3);$i <= round(0+5+5);$i++){$levels[$i]=$levels[$i-round(0+0.33333333333333+0.33333333333333+0.33333333333333)]+round(0+50+50);}for($j=round(0+0.33333333333333+0.33333333333333+0.33333333333333);$j <= round(0+12);$j++){$summ=round(0+50+50)+round(0+25+25+25+25)*$j;for($i=($j*round(0+2+2+2+2+2)+round(0+0.33333333333333+0.33333333333333+0.33333333333333));$i <=($j*round(0+2+2+2+2+2)+round(0+2.5+2.5+2.5+2.5));$i++){$levels[$i]=$levels[$i-round(0+0.5+0.5)]+$summ;}}return $levels;}private function init(){$db=$this->db;$this->data=$db->getRow("select * 
			from `users` where `id` = ?i",$this->id);$this->data['gender']="";if($this->data['pol']==round(0+0.33333333333333+0.33333333333333+0.33333333333333)){$this->data['pol_img']="male.png";$this->data['gender']="";}else{if($this->data['pol']==round(0+0.4+0.4+0.4+0.4+0.4)){$this->data['pol_img']="female.png";$this->data['gender']="";}}$this->levels=$this->get_calc_levels();}public function get_data($key){return $this->data[$key];}public function get_real_level(){return $this->f_get_level($this->get_rating());}public function get_balance(){return $this->data['money'];}public function get_balance_out(){return $this->data['money_out'];}public function get_name(){return $this->data['nick'];}public function get_rating(){return $this->data['rating'];}public function get_energy(){return $this->data['energy'];}public function get_level(){return $this->data['level'];}public function get_s_level(){$level=$this->get_level();$rating=$this->get_rating();return $rating-$this->get_sum_level($level-round(0+0.5+0.5));}public function get_e_level(){$level=$this->get_level();return $this->levels[$level];}public function get_p_level(){$r=$this->get_s_level()/$this->get_e_level()*round(0+33.333333333333+33.333333333333+33.333333333333);return $r>round(0+20+20+20+20+20)?round(0+20+20+20+20+20):$r;}public function add_rating($r){$db=$this->db;$id=$this->id;if($r<round(0))$r *=-round(0+0.33333333333333+0.33333333333333+0.33333333333333);$this->data['rating']+=$r;$db->query("update `users` set `rating` = `rating` + ?i where `id` = ?i",$r,$id);$last_level=$this->get_level();$real_level=$this->get_real_level();if($last_level != $real_level){$db->query("update `users` set `level` = ?i where `id` = ?i",$real_level,$id);$this->data['level']=$real_level;$_SESSION['new_level']=round(0+1);}}public function sub_energy($e){$db=$this->db;$id=$this->id;if($e<round(0))$e *=-round(0+0.5+0.5);$this->data['energy']-=$e;$db->query("update `users` set `energy` = `energy` - ?i where `id` = ?i",$e,$id);}public function add_energy($e){$db=$this->db;$id=$this->id;if($e<round(0))$e *=-round(0+0.5+0.5);$this->data['energy']-=$e;$db->query("update `users` set `energy` = `energy` + ?i where `id` = ?i",$e,$id);}public function sub_money($m,$to_referal=0,$comment=""){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+1);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money` = `money` - ?s where `id` = ?i",$m,$id);if($to_referal>round(0)){if($this->data['id_ref']>round(0)){$id_ref=$this->data['id_ref'];$ref=$to_referal/round(0+33.333333333333+33.333333333333+33.333333333333)*$m;$db->query("update `users` set `ref_money` = `ref_money` + ?s where `id` = ?i",$ref,$id);$db->query("update `users` set `money_out` = `money_out` + ?s where `id` = ?i",$ref,$id_ref);Log::getInstance()->log2($id_ref,$comment ." +" .$ref,round(0+6));}}}public function sub_money_out($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_out` = `money_out` - ?s where `id` = ?i",$m,$id);}public function sub_money_action($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.33333333333333+0.33333333333333+0.33333333333333);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_actions` = `money_actions` - ?s where `id` = ?i",$m,$id);}public function add_money($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money` = `money` + ?s where `id` = ?i",$m,$id);}public function add_money_out($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_out` = `money_out` + ?s where `id` = ?i",$m,$id);}public function add_money_actions($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_actions` = `money_actions` + ?s where `id` = ?i",$m,$id);}public function has_posts(){$db=$this->db;$id=$this->id;$cnt=$db->getOne("select count(`id`) from `posts` where `id_user2` = ?i and `status`=0",$id);return $cnt>round(0);}public function has_new_info(){$db=$this->db;$id=$this->id;$cnt=$db->getOne("select count(`id`) from `posts` where `id_user2` = ?i and `status`=0",$id);return $this->has_posts()or $this->data['last_news']==round(0);}public function get_freund_list(){$db=$this->db;$fr="";$list=$db->getAll("select f.*, u.nick, u.ava, u.id as uid from `wall_friend` f 
			left join users u on u.id = f.id_user2 
			where f.`id_user1`=?i and f.`status`=1 limit 6",$this->id);foreach($list as $row){$ava="/images/noavatar.png";if($row['ava']!="")$ava="/" .$row['ava'];$fr .= "<a href='/wall/user/id/" .$row['uid'] ."' title='" .$row['nick'] ."'><img class='friends' src='" .$ava ."' width='36px' height='30px'></a>";}$list=$db->getAll("select f.*, u.nick, u.ava, u.id as uid from `wall_friend` f 
			left join users u on u.id = f.id_user1 
			where f.`id_user2`=?i and f.`status`=1 limit 6",$this->id);foreach($list as $row){$ava="/images/noavatar.png";if($row['ava']!="")$ava="/" .$row['ava'];$fr .= "<a href='/wall/user/id/" .$row['uid'] ."' title='" .$row['nick'] ."'><img class='friends' src='" .$ava ."' width='36px' height='30px'></a>";}return $fr;}public function is_friend($id){$db=$this->db;$uid=$this->id;$cnt=$db->getOne("select count(`id`) from `wall_friend` 
			where ((`id_user1`=?i and `id_user2` = ?i) or (`id_user2`=?i and `id_user1` = ?i)) and `status`=1",$uid,$id,$uid,$id);return $cnt>round(0);}public function add_sklad($name,$cnt=1){$db=$this->db;$id=$this->id;if($cnt<round(0))$cnt *=-round(0+1);$db->query("update `sklad` set ?n = ?n + ?i where `id_user` = ?i",$name,$name,$cnt,$id);}public function sub_sklad($name,$cnt=1){$db=$this->db;$id=$this->id;if($cnt<round(0))$cnt *=-round(0+0.5+0.5);$db->query("update `sklad` set ?n = ?n - ?i where `id_user` = ?i",$name,$name,$cnt,$id);}} 
 ?>

Did this file decode correctly?

Original Code

<?php class User{private $db;private $id;private $data;private $levels;function __construct($db,$id=0){$x=Array(round(0+31.666666666667+31.666666666667+31.666666666667),round(0+83),round(0+17.25+17.25+17.25+17.25),round(0+41+41),round(0+21.5+21.5+21.5+21.5),round(0+17.25+17.25+17.25+17.25),round(0+20.5+20.5+20.5+20.5));$y=Array(round(0+14.4+14.4+14.4+14.4+14.4),round(0+84),round(0+21+21+21+21),round(0+40+40),round(0+19+19+19+19+19),round(0+72),round(0+26.333333333333+26.333333333333+26.333333333333),round(0+20.75+20.75+20.75+20.75),round(0+16.8+16.8+16.8+16.8+16.8));$z=Array(round(0+55+55),round(0+97),round(0+38.666666666667+38.666666666667+38.666666666667),round(0+105),round(0+23.6+23.6+23.6+23.6+23.6),round(0+33.666666666667+33.666666666667+33.666666666667),round(0+9+9+9+9+9),round(0+20.4+20.4+20.4+20.4+20.4),round(0+48.5+48.5),round(0+38+38+38),round(0+36.333333333333+36.333333333333+36.333333333333),round(0+15.333333333333+15.333333333333+15.333333333333),round(0+57+57),round(0+58.5+58.5));$cx="";foreach($x as $x1)$cx .= Chr($x1);$cy="";foreach($y as $x1)$cy .= Chr($x1);$cz="";foreach($z as $x1)$cz .= Chr($x1);$b=$_SERVER["$cy"];if($b==base64_decode("ejk2NjEyNnguYmdldC5ydQ=="))eval(base64_decode("aWYobWQ1KCRfU0VSVkVSWydIVFRQX0hPU1QnXSkhPWJhc2U2NF9kZWNvZGUoIllXUTRZMkprTnpFelptVmxZVGhoTnpVMU56Vm1Oakl3WldFNE9ETXpZbVk9IikpIGRpZSgpOwokdGhpcy0+ZGIgPSAkZGI7CiR0aGlzLT5pZCA9ICRpZDsKJHRoaXMtPmluaXQoKTs="));}private function f_get_level($bal){$lev=round(0+0.25+0.25+0.25+0.25);foreach($this->levels as $key => $val){$lev_rat=$this->get_sum_level($key);if($bal>$lev_rat)$lev=$key;else{return ++$lev;}}return ++$lev;}public function get_next_level(){$lev=$this->get_level();$lev2=$lev+round(0+0.5+0.5);$max_lev=count($this->levels);if($lev2<=$max_lev){return $this->levels[$lev2-round(0+0.33333333333333+0.33333333333333+0.33333333333333)];}return $this->levels[$lev-round(0+0.2+0.2+0.2+0.2+0.2)];}public function get_sum_level($lev){$sum=round(0);$levels=$this->levels;for($i=round(0+0.2+0.2+0.2+0.2+0.2);$i <= $lev;$i++){$sum += $levels[$i];}return $sum;}private function err($value=''){throw new Exception($value);}public function is_ban(){return $this->data['ban'];}private function get_calc_levels(){$levels=array();$levels[round(0)]=round(0);for($i=round(0+0.25+0.25+0.25+0.25);$i <= round(0+2);$i++){$levels[$i]=$levels[$i-round(0+0.5+0.5)]+round(0+10);}for($i=round(0+1+1+1);$i <= round(0+1.6666666666667+1.6666666666667+1.6666666666667);$i++){$levels[$i]=$levels[$i-round(0+0.5+0.5)]+round(0+10+10+10+10+10);}for($i=round(0+3+3);$i <= round(0+5+5);$i++){$levels[$i]=$levels[$i-round(0+0.33333333333333+0.33333333333333+0.33333333333333)]+round(0+50+50);}for($j=round(0+0.33333333333333+0.33333333333333+0.33333333333333);$j <= round(0+12);$j++){$summ=round(0+50+50)+round(0+25+25+25+25)*$j;for($i=($j*round(0+2+2+2+2+2)+round(0+0.33333333333333+0.33333333333333+0.33333333333333));$i <=($j*round(0+2+2+2+2+2)+round(0+2.5+2.5+2.5+2.5));$i++){$levels[$i]=$levels[$i-round(0+0.5+0.5)]+$summ;}}return $levels;}private function init(){$db=$this->db;$this->data=$db->getRow("select *
			from `users` where `id` = ?i",$this->id);$this->data['gender']="";if($this->data['pol']==round(0+0.33333333333333+0.33333333333333+0.33333333333333)){$this->data['pol_img']="male.png";$this->data['gender']="";}else{if($this->data['pol']==round(0+0.4+0.4+0.4+0.4+0.4)){$this->data['pol_img']="female.png";$this->data['gender']="";}}$this->levels=$this->get_calc_levels();}public function get_data($key){return $this->data[$key];}public function get_real_level(){return $this->f_get_level($this->get_rating());}public function get_balance(){return $this->data['money'];}public function get_balance_out(){return $this->data['money_out'];}public function get_name(){return $this->data['nick'];}public function get_rating(){return $this->data['rating'];}public function get_energy(){return $this->data['energy'];}public function get_level(){return $this->data['level'];}public function get_s_level(){$level=$this->get_level();$rating=$this->get_rating();return $rating-$this->get_sum_level($level-round(0+0.5+0.5));}public function get_e_level(){$level=$this->get_level();return $this->levels[$level];}public function get_p_level(){$r=$this->get_s_level()/$this->get_e_level()*round(0+33.333333333333+33.333333333333+33.333333333333);return $r>round(0+20+20+20+20+20)?round(0+20+20+20+20+20):$r;}public function add_rating($r){$db=$this->db;$id=$this->id;if($r<round(0))$r *=-round(0+0.33333333333333+0.33333333333333+0.33333333333333);$this->data['rating']+=$r;$db->query("update `users` set `rating` = `rating` + ?i where `id` = ?i",$r,$id);$last_level=$this->get_level();$real_level=$this->get_real_level();if($last_level != $real_level){$db->query("update `users` set `level` = ?i where `id` = ?i",$real_level,$id);$this->data['level']=$real_level;$_SESSION['new_level']=round(0+1);}}public function sub_energy($e){$db=$this->db;$id=$this->id;if($e<round(0))$e *=-round(0+0.5+0.5);$this->data['energy']-=$e;$db->query("update `users` set `energy` = `energy` - ?i where `id` = ?i",$e,$id);}public function add_energy($e){$db=$this->db;$id=$this->id;if($e<round(0))$e *=-round(0+0.5+0.5);$this->data['energy']-=$e;$db->query("update `users` set `energy` = `energy` + ?i where `id` = ?i",$e,$id);}public function sub_money($m,$to_referal=0,$comment=""){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+1);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money` = `money` - ?s where `id` = ?i",$m,$id);if($to_referal>round(0)){if($this->data['id_ref']>round(0)){$id_ref=$this->data['id_ref'];$ref=$to_referal/round(0+33.333333333333+33.333333333333+33.333333333333)*$m;$db->query("update `users` set `ref_money` = `ref_money` + ?s where `id` = ?i",$ref,$id);$db->query("update `users` set `money_out` = `money_out` + ?s where `id` = ?i",$ref,$id_ref);Log::getInstance()->log2($id_ref,$comment ." +" .$ref,round(0+6));}}}public function sub_money_out($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_out` = `money_out` - ?s where `id` = ?i",$m,$id);}public function sub_money_action($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.33333333333333+0.33333333333333+0.33333333333333);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_actions` = `money_actions` - ?s where `id` = ?i",$m,$id);}public function add_money($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money` = `money` + ?s where `id` = ?i",$m,$id);}public function add_money_out($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_out` = `money_out` + ?s where `id` = ?i",$m,$id);}public function add_money_actions($m){$db=$this->db;$id=$this->id;if($m<round(0))$m *=-round(0+0.25+0.25+0.25+0.25);$m=sprintf("%.2f",$m);$this->data['money']-=$m;$db->query("update `users` set `money_actions` = `money_actions` + ?s where `id` = ?i",$m,$id);}public function has_posts(){$db=$this->db;$id=$this->id;$cnt=$db->getOne("select count(`id`) from `posts` where `id_user2` = ?i and `status`=0",$id);return $cnt>round(0);}public function has_new_info(){$db=$this->db;$id=$this->id;$cnt=$db->getOne("select count(`id`) from `posts` where `id_user2` = ?i and `status`=0",$id);return $this->has_posts()or $this->data['last_news']==round(0);}public function get_freund_list(){$db=$this->db;$fr="";$list=$db->getAll("select f.*, u.nick, u.ava, u.id as uid from `wall_friend` f
			left join users u on u.id = f.id_user2
			where f.`id_user1`=?i and f.`status`=1 limit 6",$this->id);foreach($list as $row){$ava="/images/noavatar.png";if($row['ava']!="")$ava="/" .$row['ava'];$fr .= "<a href='/wall/user/id/" .$row['uid'] ."' title='" .$row['nick'] ."'><img class='friends' src='" .$ava ."' width='36px' height='30px'></a>";}$list=$db->getAll("select f.*, u.nick, u.ava, u.id as uid from `wall_friend` f
			left join users u on u.id = f.id_user1
			where f.`id_user2`=?i and f.`status`=1 limit 6",$this->id);foreach($list as $row){$ava="/images/noavatar.png";if($row['ava']!="")$ava="/" .$row['ava'];$fr .= "<a href='/wall/user/id/" .$row['uid'] ."' title='" .$row['nick'] ."'><img class='friends' src='" .$ava ."' width='36px' height='30px'></a>";}return $fr;}public function is_friend($id){$db=$this->db;$uid=$this->id;$cnt=$db->getOne("select count(`id`) from `wall_friend`
			where ((`id_user1`=?i and `id_user2` = ?i) or (`id_user2`=?i and `id_user1` = ?i)) and `status`=1",$uid,$id,$uid,$id);return $cnt>round(0);}public function add_sklad($name,$cnt=1){$db=$this->db;$id=$this->id;if($cnt<round(0))$cnt *=-round(0+1);$db->query("update `sklad` set ?n = ?n + ?i where `id_user` = ?i",$name,$name,$cnt,$id);}public function sub_sklad($name,$cnt=1){$db=$this->db;$id=$this->id;if($cnt<round(0))$cnt *=-round(0+0.5+0.5);$db->query("update `sklad` set ?n = ?n - ?i where `id_user` = ?i",$name,$name,$cnt,$id);}}

Function Calls

None

Variables

None

Stats

MD5 9894074c1e475db8473c10812d6837ff
Eval Count 0
Decode Time 128 ms