<?php
$ruby = 100000;
if($user['bonus_time'] < time()){
DB::Query("UPDATE `users` SET `ruby` = '".text($user['ruby'] + $ruby)."', `bonus_time` = '".(time() + 86000)."' WHERE `id` = '".$uid."'");
$_SESSION['msg'] = 'Ежедневный подарок: '.$ruby.' рубинов';
header('Location: ?');
exit();
}