Здравствуйте. Подскажите пожалуйста, как убрать шифрование в этом коде?
<?php
require_once('db.php');
class User
{
var $id, $Online, $RegiDate, $Key, $Email, $IP, $SecureIP, $Money, $Coin, $Username, $UpdateDate , $Level, $MarriedTo, $Model, $Bank, $Doibung, $pHealth, $pArmor, $Warnings, $Screwdriver, $Tire, $LinhKienSung, $CaHop, $Dau, $Vang, $KhoangSan, $KimLoaiXau, $KimLoaiTot, $KhoaCui, $KhoaXin, $BanhMi, $Hambuger, $Pizza, $KillLog0, $KillLog1, $KillLog2, $KillLog3, $KillLog4, $KillLog5, $KillLog6, $KillLog7, $KillLog8, $KillLog9, $Materials, $Crack, $Pot, $ThanhGo, $PhoneNr, $WantedLevel, $pv0ModelId, $pv1ModelId, $pv2ModelId, $pv3ModelId, $pv4ModelId, $pv5ModelId, $pv6ModelId, $pv7ModelId, $pv8ModelId, $pv9ModelId, $pv10ModelId, $pv0Weapon0, $pv0Weapon1, $pv0Weapon2, $Sex, $AdminLevel, $Helper, $LuaMi, $Job, $Job2, $Rank, $Member, $DonateRank, $VIPExpire;
public function User($id, $online, $regidate, $username, $key, $email, $ip, $secureip, $money, $coin)
{
$this->id = $id;
$this->Online = $online;
$this->RegiDate = $regidate;
$this->Username = $username;
$this->Key = $key;
$this->Email = $email;
$this->IP = $ip;
$this->SecureIP = $secureip;
$this->Money = $money;
$this->Coin = $coin;
}
public function Login()
{
$ret = false;
$str_username = str_replace("'", "''", $this->Username);
$enc_pwd = strtoupper(hash('whirlpool',$this->Key));
$sql = "select * from accounts where `Username`='$str_username' and `Key`='$enc_pwd'";
$list = DataProvider::ExecQuery($sql);
if($row = mysql_fetch_array($list))
{
$this->id = $row["id"];
$this->Online = $row["Online"];
$this->RegiDate = $row["RegiDate"];
$this->Username = $row["Username"];
$this->Key = $row["Key"];
$this->Email = $row["Email"];
$this->IP = $row["IP"];
$this->SecureIP = $row["SecureIP"];
$this->Money = $row["Money"];
$this->Coin = $row["Coin"];
$this->UpdateDate = $row["UpdateDate"];
$this->Level = $row["Level"];
$this->MarriedTo = $row["MarriedTo"];
$this->Model = $row["Model"];
$this->Bank = $row["Bank"];
$this->Doibung = $row["Doibung"];
$this->pHealth = $row["pHealth"];
$this->pArmor = $row["pArmor"];
$this->Warnings = $row["Warnings"];
$this->Screwdriver = $row["Screwdriver"];
$this->Tire = $row["Tire"];
$this->LinhKienSung = $row["LinhKienSung"];
$this->CaHop = $row["CaHop"];
$this->Dau = $row["Dau"];
$this->Vang = $row["Vang"];
$this->KhoangSan = $row["KhoangSan"];
$this->KimLoaiXau = $row["KimLoaiXau"];
$this->KimLoaiTot = $row["KimLoaiTot"];
$this->KhoaCui = $row["KhoaCui"];
$this->KhoaXin = $row["KhoaXin"];
$this->BanhMi = $row["BanhMi"];
$this->Hambuger = $row["Hambuger"];
$this->Pizza = $row["Pizza"];
$this->KillLog0 = $row["KillLog0"];
$this->KillLog1 = $row["KillLog1"];
$this->KillLog2 = $row["KillLog2"];
$this->KillLog3 = $row["KillLog3"];
$this->KillLog4 = $row["KillLog4"];
$this->KillLog5 = $row["KillLog5"];
$this->KillLog6 = $row["KillLog6"];
$this->KillLog7 = $row["KillLog7"];
$this->KillLog8 = $row["KillLog8"];
$this->KillLog9 = $row["KillLog9"];
$this->Materials = $row["Materials"];
$this->Crack = $row["Crack"];
$this->Pot = $row["Pot"];
$this->ThanhGo = $row["ThanhGo"];
$this->PhoneNr = $row["PhoneNr"];
$this->pv0ModelId = $row["pv0ModelId"];
$this->pv1ModelId = $row["pv1ModelId"];
$this->pv2ModelId = $row["pv2ModelId"];
$this->pv3ModelId = $row["pv3ModelId"];
$this->pv4ModelId = $row["pv4ModelId"];
$this->pv5ModelId = $row["pv5ModelId"];
$this->pv6ModelId = $row["pv6ModelId"];
$this->pv7ModelId = $row["pv7ModelId"];
$this->pv8ModelId = $row["pv8ModelId"];
$this->pv9ModelId = $row["pv9ModelId"];
$this->pv10ModelId = $row["pv10ModelId"];
$this->pv0Weapon0 = $row["pv0Weapon0"];
$this->pv0Weapon1 = $row["pv0Weapon1"];
$this->pv0Weapon2 = $row["pv0Weapon2"];
$this->Sex = $row["Sex"];
$this->AdminLevel = $row["AdminLevel"];
$this->Helper = $row["Helper"];
$this->LuaMi = $row["LuaMi"];
$this->Job = $row["Job"];
$this->Job2 = $row["Job2"];
$this->Member = $row["Member"];
$this->Rank = $row["Rank"];
$this->DonateRank = $row["DonateRank"];
$this->VIPExpire = $row["VIPExpire"];
$ret = true;
}
return $ret;
}
public function ChangePWD($OPWD,$NPWD,$NPWD2,$USER, $enc = false)
{
$ret = false;
$str_username = str_replace("'", "''", $USER);
if($enc == false) {$enc_pwd = strtoupper(hash('whirlpool',$OPWD));}else{$enc_pwd = $OPWD;}
$sql = "select * from accounts where `Username`='$str_username' and `Key`='$enc_pwd'";
$list = DataProvider::ExecQuery($sql);
$row = mysql_fetch_array($list);
if(is_array($row))
{
if($NPWD == $NPWD2)
{
$n_pwd = strtoupper(hash('whirlpool',$NPWD));
$sql = "UPDATE `accounts` SET `Key` = '".$n_pwd."' where `Username`='$str_username';";
$list = DataProvider::ExecQuery($sql);
$ret = "Новый пароль был отослан. проверьте Ваш электронный ящик. Не забудьте посмотреть спам.";
}else $ret = "Новый пароль и подтверждение нового пароля не совпадают";
}else{
$ret = "Пароли не совпадают";
}
return $ret;
}
public function ForgotPWD($email)
{
$ret = false;
$email = str_replace("'", "''", $email);
$sql = "select * from `accounts` where `Email`='$email';";
$list = DataProvider::ExecQuery($sql);
$row = mysql_fetch_array($list);
if(is_array($row))
{
$ret =$row;
}else{
$ret = "NOTFOUND";
}
return $ret;
}
}
?>