Вход Регистрация
Файл: vkolhoze.com/inc/lab/vivod.php
Строк: 207
<? 
$uct
=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_celekcia` WHERE `id_collective` = '$ct[id]'"));
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$uct[id_plant]'"));
$plantet=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$plant[id_plant]'"));
$p1=mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_celekcia_result` WHERE `id_collective` = '$ct[id]'"),0);
if(
$uct['count']<10000000){header("Location:?collective=".($ct['id'])."&lab&".passgen());}
if(
$p1==0){
if(isset(
$_GET['ok'])){
if(
$ct['rubies']>=300){
$rand1 rand(1,4);
$rand2 rand(1,4);
$rand3 rand(1,4);
$rand4 rand(1,4);
$rat1 rand(3.,12);
$rat2 rand(2,17);
$rat3 rand(3,13);
$rat4 rand(2,14);
$rat5 rand(3,19);
$mon1 rand(3,17);
$mon2 rand(5,26);
$mon3 rand(3,23);
$mon4 rand(4,22);
$mon5 rand(2,24);
$tim1 rand(1,3);
$tim2 rand(1,3);
$tim3 rand(1,3);
$tim4 rand(1,3);
$tim5 rand(1,3);
$tims1 rand(1,2);
$tims2 rand(1,2);
$tims3 rand(1,2);
$tims4 rand(1,2);
$tims5 rand(1,2);

mysql_query("INSERT INTO `kolhoz_collective_celekcia_result` SET `id_plant` = '".($plantet['id'])."',`time` = '".($rand4==1?$plant['times']-$tim1:$plant['times']+$tim1)."', `times` = '".($rand4==1?$plant['time_soils']-$tims1:$plant['time_soils']+$tims1)."', `money` = '".($rand1==1?$plant['moneys']-$mon1:$plant['moneys']+$mon1)."', `rating` = '".($rand1==1?$plant['ratings']-$rat1:$plant['ratings']+$rat1)."',`id_collective` = '".($ct['id'])."'");


mysql_query("INSERT INTO `kolhoz_collective_celekcia_result` SET `id_plant` = '".($plantet['id'])."', `time` = '".($rand2==1?$plant['times']-$tim2:$plant['times']+$tim2)."', `times` = '".($rand1==1?$plant['time_soils']-$tims2:$plant['time_soils']+$tims2)."', `money` = '".($rand4==1?$plant['moneys']-$mon2:$plant['moneys']+$mon2)."', `rating` = '".($rand1==1?$plant['ratings']-$rat2:$plant['ratings']+$rat2)."',`id_collective` = '".($ct['id'])."'");


mysql_query("INSERT INTO `kolhoz_collective_celekcia_result` SET `id_plant` = '".($plantet['id'])."', `time` = '".($rand1==1?$plant['times']-$tim3:$plant['times']+$tim3)."', `times` = '".($rand3==1?$plant['time_soils']-$tims3:$plant['time_soils']+$tims3)."', `money` = '".($rand1==1?$plant['moneys']-$mon3:$plant['moneys']+$mon3)."', `rating` = '".($rand2==1?$plant['ratings']-$rat3:$plant['ratings']+$rat3)."',`id_collective` = '".($ct['id'])."'");


mysql_query("INSERT INTO `kolhoz_collective_celekcia_result` SET `id_plant` = '".($plantet['id'])."', `time` = '".($rand3==1?$plant['times']-$tim4:$plant['times']+$tim4)."', `times` = '".($rand4==1?$plant['time_soils']-$tims4:$plant['time_soils']+$tims4)."', `money` = '".($rand2==1?$plant['moneys']-$mon4:$plant['moneys']+$mon4)."', `rating` = '".($rand16==1?$plant['ratings']-$rat4:$plant['ratings']+$rat4)."',`id_collective` = '".($ct['id'])."'");


mysql_query("INSERT INTO `kolhoz_collective_celekcia_result` SET `id_plant` = '".($plantet['id'])."', `time` = '".($rand1==1?$plant['times']-$tim5:$plant['times']+$tim5)."', `times` = '".($rand1==1?$plant['time_soils']-$tims2:$plant['time_soils']+$tims5)."', `money` = '".($rand3==1?$plant['moneys']-$mon5:$plant['moneys']+$mon5)."', `rating` = '".($rand20==1?$plant['ratings']-$rat5:$plant['ratings']+$rat5)."',`id_collective` = '".($ct['id'])."'");

mysql_query("UPDATE `kolhoz_collective_celekcia_result` SET `time` = '30' WHERE `time` > '30'");
mysql_query("UPDATE `kolhoz_collective_celekcia_result` SET `times` = '30' WHERE `times` > '30'");
mysql_query("UPDATE `kolhoz_collective_celekcia_result` SET `money` = '200' WHERE `money` > '200'");
mysql_query("UPDATE `kolhoz_collective_celekcia_result` SET `rating` = '200' WHERE `rating` > '200'");
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($ct['rubies']-300)."' WHERE `id` = '".($ct['id'])."' LIMIT 1");
mysql_query("UPDATE `kolhoz_collective_celekcia` SET `count` = '".($uct['count']-10000000)."' WHERE `id_collective` = '".($ct['id'])."' LIMIT 1");
header("Location:?collective=".($ct['id'])."&lab&result&".passgen());}else no_rubies_ct(300-$ct['rubies']);}}
echo
'<ul class="block"><li><span>Вывести новый сорт</span></br><span><span class="nobr"><img width="16" height="16" src="/images/icons/ruby.png" alt="o"/> <span class="title">300</span></span></span><div><span class="title">В кассе есть:</span> <span><span class="nobr"><img width="16" height="16" src="/images/icons/ruby.png" alt="o"/> <span class="title">'.numbers($ct['rubies']).'</span></span></span> <span><span class="nobr"><img width="16" height="16" src="/images/icons/money.png" alt="o"/> <span class="title">75&#039;419&#039;968</span></span></span></div></li><li class="pt"><img alt="" width="16" height="16" src="/images/icons/tick.png"/> <a href="?collective='.($ct['id']).'&lab&vivod&ok"><span>Да, подтверждаю</span></a></li><li><img alt="" width="16" height="16" src="/images/icons/cross.png"/> <a href="?collective='.($ct['id']).'&lab"><span>Нет, отказываюсь</span></a></li></ul>';
include_once 
'inc/foot.php';exit;
?>
Онлайн: 0
Реклама