<?
if($ku[rubies]>=500){
mysql_query("UPDATE `kolhoz_user` SET  `rubies` = '".($ku[rubies]-500)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET  `rtime` = '".(time()+(3600*3))."' WHERE `id` = '$ku[id]'");
header("Location:?rubalka");
}else{
header("Location:?rubalka");
}
?>