Колхоз/Ферма/садовник | Бумас помоги срочно
Где сдесь дырытык с меня помощь в чем попросите там спам и т.д
смотри чат
DELETED
20 декабря 2014, в 17:21
Delete
Амбар+лото
DELETED
20 декабря 2014, в 17:22
Delete
<?
if(isset($_GET['start']))
{
$money=1000000;
if($ku['money']>=$money)
{
$rm=rand(0,100);
$rr=rand(0,100);
$rsh=rand(0,100);
$rya=rand(0,100);
$rd=rand(0,100);
$rsc=rand(0,100);
$rvt=rand(0,100);
$rhp=rand(0,100);
if($ku['level']>=30 && $ku['level']<40)
{
$rrat=300;
$rating=intval("".$rrat."000");
$rat=$rating;
$rat_drakon_act=0;
$rat_school_act=0;
$rat_lib_act=0;
$rat_vetruk=0;
if(isset($drakon_act))$rat_drakon_act=(($rat/100)*300);
if(isset($school_act))$rat_school_act=$rat*2;
if(isset($vetruk))$rat_vetruk=$rat+$rat*2;
if(isset($lib_act))$rat_lib_act=$rat/2;
$rat=$rat_drakon_act+$rat_school_act+$rat_vetruk+$rat_lib_act+$rat;
if(isset($dexp))$rat=$rat*2;
$rating=$rat;
if($rm==10 || $rm==40 || $rm==70 || $rm==100)
{
$pm="".rand(1,10)."00000";
$pm=intval($pm);
$pme=1;
}
if($rr==10 || $rr==40 || $rr==70 || $rr==100)
{
$pr="".rand(1,20)."0";
$pre=1;
}
}
if($ku['level']>=40 && $ku['level']<45)
{
$rrat=300;
$rating=intval("".$rrat."000");
$rat=$rating;
$rat_drakon_act=0;
$rat_school_act=0;
$rat_lib_act=0;
$rat_vetruk=0;
if(isset($drakon_act))$rat_drakon_act=(($rat/100)*300);
if(isset($school_act))$rat_school_act=$rat*2;
if(isset($vetruk))$rat_vetruk=$rat+$rat*2;
if(isset($lib_act))$rat_lib_act=$rat/2;
$rat=$rat_drakon_act+$rat_school_act+$rat_vetruk+$rat_lib_act+$rat;
if(isset($dexp))$rat=$rat*2;
$rating=$rat;
if($rm==10 || $rm==40 || $rm==70 || $rm==100)
{
$pm="".rand(1,10)."000000";
$pm=intval($pm);
$pme=1;
}
if($rr==10 || $rr==40 || $rr==70 || $rr==100)
{
$pr="".rand(1,50)."0";
$pre=1;
}
}
elseif($ku['level']>=45)
{
$rrat=300;
$rating=intval("".$rrat."000");
$rat=$rating;
$rat_drakon_act=0;
$rat_school_act=0;
$rat_lib_act=0;
$rat_vetruk=0;
if(isset($drakon_act))$rat_drakon_act=(($rat/100)*300);
if(isset($school_act))$rat_school_act=$rat*2;
if(isset($lib_act))$rat_lib_act=$rat/2;
if(isset($vetruk))$rat_vetruk=$rat+$rat*2;
if(isset($dexp))$rat=$rat*2;
$rat=$rat_drakon_act+$rat_school_act+$rat_vetruk+$rat_lib_act+$rat;
$rating=$rat;
if($rm==10 || $rm==40 || $rm==70 || $rm==100)
{
$pm="".rand(1,10)."0000";
$pm=intval($pm);
$pme=1;
}
if($rr==10 || $rr==40 || $rr==70 || $rr==100)
{
$pr="".rand(1,10)."00";
$pre=1;
}
}
update_ku('rating',($ku['rating']+$rat));
$ku['money']=minus_money($money);
update_mc($rat);
if(isset($pme))mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$pm)."' WHERE `id` = '$ku[id]'");
if(isset($pre))mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']+$pr)."' WHERE `id` = '$ku[id]'");
if($rsh==10 || $rsh==40 || $rsh==70 || $rsh==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_shmel` = '".($ku['time_shmel']>$time?"".($ku['time_shmel']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rshe=1;
}
if($rya==10 || $rya==40 || $rya==70 || $rya==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_yastreb` = '".($ku['time_yastreb']>$time?"".($ku['time_yastreb']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$ryae=1;
}
if($rd==10 || $rd==40 || $rd==70 || $rd==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_drakon` = '".($ku['time_drakon']>$time?"".($ku['time_drakon']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rde=1;
}
if($rsc==10 || $rsc==40 || $rsc==70 || $rsc==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `scarecrow_time` = '".($ku['scarecrow_time']>$time?"".($ku['scarecrow_time']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rsce=1;
}
if($rvt==10 || $rvt==40 || $rvt==70 || $rvt==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_vetruk` = '".($ku['time_vetruk']>$time?"".($ku['time_vetruk']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rvte=1;
}
if($rhp==10 || $rhp==40 || $rhp==70 || $rhp==100)
{
$timee=3600;
$ps=300;
mysql_query("UPDATE `kolhoz_user` SET `hydropinics_time` = '".($ku['hydropinics_time']>$time?"".($ku['hydropinics_time']+$timee)."":"".($time+$timee)."")."', `hydropinics_type` = '$ps' WHERE `id` = '$ku[id]'");
$rhpe=1;
}
echo "<div class='feedback'><img width='16' height='16' src='images/icons/experience.png' alt='o'> Опыт +<span>$rat</span></div>";
}
else
{
$_SESSION['no_money']=$money-$ku['money'];
header("Location:?lottery");
}
}
echo "<div class='content'><div class='block'>";
echo "<ul><li><img width='16' height='16' src='images/icons/ticket.png' alt='o'>
<a href='?lottery&start=1'>Купить билет</a> <span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>1'000'000</span></span>
</li>";
if(isset($_GET['start']) && $ku['money']>=$money)
{
echo "<li class='title pt'>Ваш выигрыш:</li>";
echo "<li><span><ul>";
echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> <span class='title'>300.0k</span><span class='minor'> (<span>300000</span>)</span></span></li>";
if(isset($pme))echo "<li><span><img width='16' height='16' src='images/icons/m
if(isset($_GET['start']))
{
$money=1000000;
if($ku['money']>=$money)
{
$rm=rand(0,100);
$rr=rand(0,100);
$rsh=rand(0,100);
$rya=rand(0,100);
$rd=rand(0,100);
$rsc=rand(0,100);
$rvt=rand(0,100);
$rhp=rand(0,100);
if($ku['level']>=30 && $ku['level']<40)
{
$rrat=300;
$rating=intval("".$rrat."000");
$rat=$rating;
$rat_drakon_act=0;
$rat_school_act=0;
$rat_lib_act=0;
$rat_vetruk=0;
if(isset($drakon_act))$rat_drakon_act=(($rat/100)*300);
if(isset($school_act))$rat_school_act=$rat*2;
if(isset($vetruk))$rat_vetruk=$rat+$rat*2;
if(isset($lib_act))$rat_lib_act=$rat/2;
$rat=$rat_drakon_act+$rat_school_act+$rat_vetruk+$rat_lib_act+$rat;
if(isset($dexp))$rat=$rat*2;
$rating=$rat;
if($rm==10 || $rm==40 || $rm==70 || $rm==100)
{
$pm="".rand(1,10)."00000";
$pm=intval($pm);
$pme=1;
}
if($rr==10 || $rr==40 || $rr==70 || $rr==100)
{
$pr="".rand(1,20)."0";
$pre=1;
}
}
if($ku['level']>=40 && $ku['level']<45)
{
$rrat=300;
$rating=intval("".$rrat."000");
$rat=$rating;
$rat_drakon_act=0;
$rat_school_act=0;
$rat_lib_act=0;
$rat_vetruk=0;
if(isset($drakon_act))$rat_drakon_act=(($rat/100)*300);
if(isset($school_act))$rat_school_act=$rat*2;
if(isset($vetruk))$rat_vetruk=$rat+$rat*2;
if(isset($lib_act))$rat_lib_act=$rat/2;
$rat=$rat_drakon_act+$rat_school_act+$rat_vetruk+$rat_lib_act+$rat;
if(isset($dexp))$rat=$rat*2;
$rating=$rat;
if($rm==10 || $rm==40 || $rm==70 || $rm==100)
{
$pm="".rand(1,10)."000000";
$pm=intval($pm);
$pme=1;
}
if($rr==10 || $rr==40 || $rr==70 || $rr==100)
{
$pr="".rand(1,50)."0";
$pre=1;
}
}
elseif($ku['level']>=45)
{
$rrat=300;
$rating=intval("".$rrat."000");
$rat=$rating;
$rat_drakon_act=0;
$rat_school_act=0;
$rat_lib_act=0;
$rat_vetruk=0;
if(isset($drakon_act))$rat_drakon_act=(($rat/100)*300);
if(isset($school_act))$rat_school_act=$rat*2;
if(isset($lib_act))$rat_lib_act=$rat/2;
if(isset($vetruk))$rat_vetruk=$rat+$rat*2;
if(isset($dexp))$rat=$rat*2;
$rat=$rat_drakon_act+$rat_school_act+$rat_vetruk+$rat_lib_act+$rat;
$rating=$rat;
if($rm==10 || $rm==40 || $rm==70 || $rm==100)
{
$pm="".rand(1,10)."0000";
$pm=intval($pm);
$pme=1;
}
if($rr==10 || $rr==40 || $rr==70 || $rr==100)
{
$pr="".rand(1,10)."00";
$pre=1;
}
}
update_ku('rating',($ku['rating']+$rat));
$ku['money']=minus_money($money);
update_mc($rat);
if(isset($pme))mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$pm)."' WHERE `id` = '$ku[id]'");
if(isset($pre))mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']+$pr)."' WHERE `id` = '$ku[id]'");
if($rsh==10 || $rsh==40 || $rsh==70 || $rsh==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_shmel` = '".($ku['time_shmel']>$time?"".($ku['time_shmel']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rshe=1;
}
if($rya==10 || $rya==40 || $rya==70 || $rya==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_yastreb` = '".($ku['time_yastreb']>$time?"".($ku['time_yastreb']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$ryae=1;
}
if($rd==10 || $rd==40 || $rd==70 || $rd==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_drakon` = '".($ku['time_drakon']>$time?"".($ku['time_drakon']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rde=1;
}
if($rsc==10 || $rsc==40 || $rsc==70 || $rsc==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `scarecrow_time` = '".($ku['scarecrow_time']>$time?"".($ku['scarecrow_time']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rsce=1;
}
if($rvt==10 || $rvt==40 || $rvt==70 || $rvt==100)
{
$timee=3600;
mysql_query("UPDATE `kolhoz_user` SET `time_vetruk` = '".($ku['time_vetruk']>$time?"".($ku['time_vetruk']+$timee)."":"".($time+$timee)."")."' WHERE `id` = '$ku[id]'");
$rvte=1;
}
if($rhp==10 || $rhp==40 || $rhp==70 || $rhp==100)
{
$timee=3600;
$ps=300;
mysql_query("UPDATE `kolhoz_user` SET `hydropinics_time` = '".($ku['hydropinics_time']>$time?"".($ku['hydropinics_time']+$timee)."":"".($time+$timee)."")."', `hydropinics_type` = '$ps' WHERE `id` = '$ku[id]'");
$rhpe=1;
}
echo "<div class='feedback'><img width='16' height='16' src='images/icons/experience.png' alt='o'> Опыт +<span>$rat</span></div>";
}
else
{
$_SESSION['no_money']=$money-$ku['money'];
header("Location:?lottery");
}
}
echo "<div class='content'><div class='block'>";
echo "<ul><li><img width='16' height='16' src='images/icons/ticket.png' alt='o'>
<a href='?lottery&start=1'>Купить билет</a> <span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>1'000'000</span></span>
</li>";
if(isset($_GET['start']) && $ku['money']>=$money)
{
echo "<li class='title pt'>Ваш выигрыш:</li>";
echo "<li><span><ul>";
echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> <span class='title'>300.0k</span><span class='minor'> (<span>300000</span>)</span></span></li>";
if(isset($pme))echo "<li><span><img width='16' height='16' src='images/icons/m
файл лото выше
вот амбар
<?
error_reporting(E_ALL^E_NOTICE);
?>
<div class="event"><h1>Амбар</h1></div>
<?
echo "<div class='content'>";
echo "<div class='block'>";
if(isset($_GET['sell_all']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]'"),0)!=0)
{
if(isset($_GET[fish])){$fish=1;$base="fish";}else{$fish=0;$base="plant";}
$q=mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish`='$fish'");
$cm=0;
while($post=mysql_fetch_array($q))
{
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_$base` WHERE `id` = '$post[id_plant]'"));
$m=floor(($plant['money']/$plant['count'])*$post['count']);
$cm=$cm+$m;
}
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$cm)."' WHERE `id` = '$ku[id]'");
mysql_query("DELETE FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish`='$fish'");
mysql_query("UPDATE `kolhoz_user` SET `umoney` = '$cm' WHERE `id` = '$ku[id]'");
if(isset($mc) && $mc['nalog']>0)
{
$nmoney=floor(($cm/100)*$mc['nalog']);
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$cm-$nmoney)."' WHERE `id` = '$ku[id]'");
mysql_query("INSERT INTO `kolhoz_collective_cash` SET `id_user` = '$ku[id]', `id_collective` = '$mc[id]', `count` = '$nmoney', `type` = 'money', `time` = '$time'");
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+$nmoney)."' WHERE `id` = '$mc[id]'");
}
header("Location:?warehouse&".passgen());
exit;
}
$ant=mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `id` = '".intval($_GET['sell'])."'"), 0);
if(isset($_GET['sell']) && intval($_GET['sell'])!=NULL && $ant!==0)
{
$pw=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `id` = '".intval($_GET['sell'])."'"));
if(isset($_GET[fish])){$fish=1;$base="fish";}else{$fish=0;$base="plant";}
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_$base` WHERE `id` = '$pw[id_plant]'"));
if($plant[count]==0){$plant[count]=1;}
$m=floor(($plant['money']/$plant['count'])*$pw['count']);
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$m)."' WHERE `id` = '$ku[id]'");
mysql_query("DELETE FROM `kolhoz_warehouse` WHERE `id` = '$pw[id]'");
mysql_query("UPDATE `kolhoz_user` SET `umoney` = '$m' WHERE `id` = '$ku[id]'");
if(isset($mc) && $mc['nalog']>0)
{
$nmoney=floor(($m/100)*$mc['nalog']);
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$m-$nmoney)."' WHERE `id` = '$ku[id]'");
mysql_query("INSERT INTO `kolhoz_collective_cash` SET `id_user` = '$ku[id]', `id_collective` = '$mc[id]', `count` = '$nmoney', `type` = 'money', `time` = '$time'");
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+$nmoney)."' WHERE `id` = '$mc[id]'");
}
header("Location:?warehouse&".passgen());
exit;
}
echo "<div><h3>Овощи</h3>";
echo "<ul class='ptm'>";
$q=mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `arena` = '0' AND `fish` = '0'");
if(mysql_num_rows($q)==0)echo "<li>В амбаре нету овощей</li>";
$cm=0;
while($post=mysql_fetch_array($q))
{
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$post[id_plant]'"));
$m=floor(($plant['money']/$plant['count'])*$post['count']);
echo "<li><img width='16' height='16' src='images/icons/tomato.png' alt='o'><span class='title'>".hsc($plant['name'])."</span> (<span>$post[count]</span>): <a href='?warehouse&sell=$post[id]'>Продать</a> за <img width='16' height='16' src='images/icons/money.png' alt='o'><span>$m</span>
</li>";
$cm=$cm+$m;
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish` = '0'"),0)!=0)echo "<li><img alt='*' width='16' height='16' src='images/icons/money.png'> <a href='?warehouse&sell_all'>Продать всё</a> за <img width='16' height='16' src='images/icons/money.png' alt='o'><span>$cm</span></li>";
echo "</ul>";
echo "<div><h3>Рыба</h3>";
echo "<ul class='ptm'>";
$q=mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `arena` = '0' AND `fish` = '1'");
if(mysql_num_rows($q)==0){echo "<li>В амбаре нету рыбы</li>";}else{
$cm=0;
while($post=mysql_fetch_array($q))
{
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_fish` WHERE `id` = '$post[id_plant]'"));
$m=floor(($plant['money']/$plant['count'])*$post['count']);
echo "<li><img width='16' height='16' src='images/icons/tomato.png' alt='o'><span class='title'>".hsc($plant['name'])."</span> (<span>$post[count]</span> кг): <a href='?warehouse&sell=$post[id]&fish'>Продать</a> за <img width='16' height='16' src='images/icons/money.png' alt='o'><span>$m</span>
</li>";
$cm=$cm+$m;
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish` = '1' "),0)!=0)echo "<li><img alt='*' width='16' height='16' src='images/icons/money.png'> <a href='?warehouse&sell_all&fish'>Продать всё</a> за <img width='16' height=
error_reporting(E_ALL^E_NOTICE);
?>
<div class="event"><h1>Амбар</h1></div>
<?
echo "<div class='content'>";
echo "<div class='block'>";
if(isset($_GET['sell_all']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]'"),0)!=0)
{
if(isset($_GET[fish])){$fish=1;$base="fish";}else{$fish=0;$base="plant";}
$q=mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish`='$fish'");
$cm=0;
while($post=mysql_fetch_array($q))
{
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_$base` WHERE `id` = '$post[id_plant]'"));
$m=floor(($plant['money']/$plant['count'])*$post['count']);
$cm=$cm+$m;
}
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$cm)."' WHERE `id` = '$ku[id]'");
mysql_query("DELETE FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish`='$fish'");
mysql_query("UPDATE `kolhoz_user` SET `umoney` = '$cm' WHERE `id` = '$ku[id]'");
if(isset($mc) && $mc['nalog']>0)
{
$nmoney=floor(($cm/100)*$mc['nalog']);
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$cm-$nmoney)."' WHERE `id` = '$ku[id]'");
mysql_query("INSERT INTO `kolhoz_collective_cash` SET `id_user` = '$ku[id]', `id_collective` = '$mc[id]', `count` = '$nmoney', `type` = 'money', `time` = '$time'");
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+$nmoney)."' WHERE `id` = '$mc[id]'");
}
header("Location:?warehouse&".passgen());
exit;
}
$ant=mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `id` = '".intval($_GET['sell'])."'"), 0);
if(isset($_GET['sell']) && intval($_GET['sell'])!=NULL && $ant!==0)
{
$pw=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `id` = '".intval($_GET['sell'])."'"));
if(isset($_GET[fish])){$fish=1;$base="fish";}else{$fish=0;$base="plant";}
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_$base` WHERE `id` = '$pw[id_plant]'"));
if($plant[count]==0){$plant[count]=1;}
$m=floor(($plant['money']/$plant['count'])*$pw['count']);
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$m)."' WHERE `id` = '$ku[id]'");
mysql_query("DELETE FROM `kolhoz_warehouse` WHERE `id` = '$pw[id]'");
mysql_query("UPDATE `kolhoz_user` SET `umoney` = '$m' WHERE `id` = '$ku[id]'");
if(isset($mc) && $mc['nalog']>0)
{
$nmoney=floor(($m/100)*$mc['nalog']);
mysql_query("UPDATE `kolhoz_user` SET `money` = '".($ku['money']+$m-$nmoney)."' WHERE `id` = '$ku[id]'");
mysql_query("INSERT INTO `kolhoz_collective_cash` SET `id_user` = '$ku[id]', `id_collective` = '$mc[id]', `count` = '$nmoney', `type` = 'money', `time` = '$time'");
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+$nmoney)."' WHERE `id` = '$mc[id]'");
}
header("Location:?warehouse&".passgen());
exit;
}
echo "<div><h3>Овощи</h3>";
echo "<ul class='ptm'>";
$q=mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `arena` = '0' AND `fish` = '0'");
if(mysql_num_rows($q)==0)echo "<li>В амбаре нету овощей</li>";
$cm=0;
while($post=mysql_fetch_array($q))
{
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$post[id_plant]'"));
$m=floor(($plant['money']/$plant['count'])*$post['count']);
echo "<li><img width='16' height='16' src='images/icons/tomato.png' alt='o'><span class='title'>".hsc($plant['name'])."</span> (<span>$post[count]</span>): <a href='?warehouse&sell=$post[id]'>Продать</a> за <img width='16' height='16' src='images/icons/money.png' alt='o'><span>$m</span>
</li>";
$cm=$cm+$m;
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish` = '0'"),0)!=0)echo "<li><img alt='*' width='16' height='16' src='images/icons/money.png'> <a href='?warehouse&sell_all'>Продать всё</a> за <img width='16' height='16' src='images/icons/money.png' alt='o'><span>$cm</span></li>";
echo "</ul>";
echo "<div><h3>Рыба</h3>";
echo "<ul class='ptm'>";
$q=mysql_query("SELECT * FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `arena` = '0' AND `fish` = '1'");
if(mysql_num_rows($q)==0){echo "<li>В амбаре нету рыбы</li>";}else{
$cm=0;
while($post=mysql_fetch_array($q))
{
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_fish` WHERE `id` = '$post[id_plant]'"));
$m=floor(($plant['money']/$plant['count'])*$post['count']);
echo "<li><img width='16' height='16' src='images/icons/tomato.png' alt='o'><span class='title'>".hsc($plant['name'])."</span> (<span>$post[count]</span> кг): <a href='?warehouse&sell=$post[id]&fish'>Продать</a> за <img width='16' height='16' src='images/icons/money.png' alt='o'><span>$m</span>
</li>";
$cm=$cm+$m;
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_warehouse` WHERE `id_user` = '$ku[id]' AND `fish` = '1' "),0)!=0)echo "<li><img alt='*' width='16' height='16' src='images/icons/money.png'> <a href='?warehouse&sell_all&fish'>Продать всё</a> за <img width='16' height=
Чел сноси кх , дыр куча
Macmep_cnaH4, где они?