Вход Регистрация
Файл: vkolhoze.com/mypool/incube_all.php
Строк: 49
<?
if(isset($_GET['mypool']) && isset($_GET['incube_all']) && $ku['incubator']>&& mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_pool` WHERE `id_user` = '$ku[id]' AND `id_fish` = '0'"),0)!=0)
{
if(empty(
$ku['last_pool'])){header("Location:/mypool/change_fish");exit;}
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_pool_plant` WHERE `id` = '".intval($ku['last_pool'])."'"));
$times=$plant['time']*$incubator_time_act;
$stime=$plant['time_soil']*$incubator_timesoil_act;
$count_gg mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_pool` WHERE `id_user` = '$ku[id]' AND `id_fish` = '0'"),0);
if(!empty(
$plant['rcena'])){
if(
$ku['rubies']>=$plant['rcena']*$count_gg)
{
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-$plant['rcena']*$count_gg)."' WHERE `id` = '$ku[id]'");
}else{
$nm=$plant['rcena']*$count_gg-$ku['rubies'];
$_SESSION['no_rubies']=$nm;
header("Location:/mypool");exit;
}

}else{
if(
$ku['money']>=$plant['mcena']*$count_gg)
{
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']-$plant['mcena']*$count_gg)."' WHERE `id` = '$ku[id]'");
}else{
$nm=$plant['mcena']*$count_gg-$ku['money'];
$_SESSION['no_money']=$nm;
header("Location:/mypool");exit;
}
}
mysql_query("UPDATE `kolhoz_pool` SET `id_fish` = '$plant[id]', `time_soil` = '".($stime+$time)."', `time` = '".($times+$time)."' WHERE `id_user` = '$ku[id]' AND `id_fish` = '0' ")or die (mysql_error());
header("Location:/mypool/".passgen());
exit;
}
?>
Онлайн: 0
Реклама