Помогите исправить. При вводе в казну 998998888787878989898 казна клана ибет в - в у игрока наоборот плюс 2.755.444.444.555
За + сделай е пж.
case 'money':
$title = 'Казна клана';
include './system/h.php';
if(!$clan['id'] OR $clan['id'] != $i['id']) {
header('location: /clan/');
exit;
}
$g = _num($_POST['g']);
$s = _num($_POST['s']);
$g < 1000000;
if($g OR $s > 0) {
if($g && $user['g'] >= $g) {
mysql_query('UPDATE `clans` SET `g` = `g` + '.$g.' WHERE `id` = "'.$clan['id'].'"');
mysql_query('UPDATE `users` SET `g` = `g` - '.$g.' WHERE `id` = "'.$user['id'].'"');
}
if($s && $user['s'] >= $s) {
mysql_query('UPDATE `clans` SET `s` = `s` + '.$s.' WHERE `id` = "'.$clan['id'].'"');
mysql_query('UPDATE `users` SET `s` = `s` - '.$s.' WHERE `id` = "'.$user['id'].'"');
}
header('location: /clan/money/');
}
?>
<div class='main'>
<div class='block_zero'>
Казна клана: <img src='/images/icon/silver.png' alt='*'/> <?=n_f($i['s'])?> <img src='/images/icon/gold.png' alt='*'/> <?=n_f($i['g'])?><br/>
У вас на счету: <img src='/images/icon/silver.png' alt='*'/> <?=n_f($user['s'])?> <img src='/images/icon/gold.png' alt='*'/> <?=n_f($user['g'])?>
</div>
<div class='mini-line'></div>
<div class='block_zero'>
<form action='/clan/money/' method='post'>
<img src='/images/icon/gold.png' alt='*'/> <input name='g' value='0'/><br/>
<img src='/images/icon/silver.png' alt='*'/> <input name='s' value='0'/><br/>
<input type='submit' value='Пополнить'/>
</form>
</div>
</div>
<?
include './system/f.php';
break;