28 lines
1.1 KiB
PHP
28 lines
1.1 KiB
PHP
|
<?
|
|||
|
if(isset($_POST['convert_ekredit']))
|
|||
|
{
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><> <20><>.
|
|||
|
$mn = ceil((int)($_POST['convert_sum']*100));
|
|||
|
$mn = round(($mn/100),2);
|
|||
|
if($u->bank['money2']>=$mn)
|
|||
|
{
|
|||
|
if($mn<0.01 || $mn>1000000000)
|
|||
|
{
|
|||
|
$re2 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}else{
|
|||
|
$upd = mysql_query('UPDATE `bank` SET `money1` = "'.mysql_real_escape_string($u->bank['money1']+($mn*$con)).'",`money2` = "'.mysql_real_escape_string($u->bank['money2']-$mn).'" WHERE `id` = "'.$u->bank['id'].'" LIMIT 1');
|
|||
|
if($upd)
|
|||
|
{
|
|||
|
$u->bank['money1'] += $mn*$con;
|
|||
|
$u->bank['money2'] -= $mn;
|
|||
|
$u->addDelo(3,$u->info['id'],'<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <b>'.$mn.' <20><><EFBFBD>.</b> <20><> <b>'.($mn*$con).' <20><>.</b>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <b>0 <20><>.</b> <i>(<28><><EFBFBD><EFBFBD><EFBFBD>: '.$u->bank['money1'].' <20><>., '.$u->bank['money2'].' <20><><EFBFBD>.)</i>',time(),$u->info['city'],'Bank.System',0,mysql_real_escape_string($mn*$con),$u->bank['id']);
|
|||
|
$re2 = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <b>'.$mn.' <20><><EFBFBD>.</b> <20><> <b>'.($mn*$con).' <20><>.</b>';
|
|||
|
}else{
|
|||
|
$re2 = '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
}
|
|||
|
}else{
|
|||
|
$re2 = '<27> <20><><EFBFBD> <20><><EFBFBD> <b>'.$mn.' <20><><EFBFBD>.</b> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
}
|
|||
|
}
|
|||
|
?>
|