Файл: 55555/plugins/koleso/ajax/inc/res_go_priz.php
Строк: 6
<?
if(!$KOLESO_US['id'])
{
mysql_query("INSERT INTO `koleso_us` SET `us`='".$user['id']."'");
}
if($KOLESO_US['time_go'] < time())
{
$arr=mysql_fetch_array(mysql_query("Select * from `koleso_priz` WHERE `id_sec`='".(int)$_POST['id_sec']."'"));
$koleso_price = koleso_price($arr['type']);
echo'Поздравляем! <br /> Вы выиграли <strong>'.$koleso_price['0'].': '.$arr['price'].'</strong>';
mysql_query("UPDATE `koleso_us` SET `time_go`='".(time() + ($KOLESO_SET['time_pause'] * 60))."' WHERE `us`='".$user['id']."' LIMIT 1");
mysql_query("UPDATE `user` SET `".$koleso_price[1]."` = '".($user[$koleso_price[1]] + $arr['price'])."' WHERE `id`='".$user['id']."' LIMIT 1");
$mees_log = '[b] Приз[/b]
'.$koleso_price['0'].': '.$arr['price'];
mysql_query("INSERT INTO `koleso_log` SET `mess`='".$mees_log."', `us`='".$user['id']."', `type`='".$arr['type']."', `price`='".$arr['price']."', `time`='".time()."' ");
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `koleso_log` "),0) > 10)
{
mysql_query ("DELETE FROM `koleso_log` ORDER BY `id` LIMIT 1");
}
sleep($KOLESO_SET['time_ro']);
?>
<script>
numAnimate(<?=$user[$koleso_price[1]]?>, <?=($user[$koleso_price[1]] + $arr['price'])?>, "<?=('#id_'.$koleso_price[1])?>");
</script>
<?
} else {
echo'Получение бонусов возобновится через: '.time_autoformat($KOLESO_US['time_go'] - time()).'';
}