Файл: inc/lottery_ct.php
Строк: 211
<?
if($mcu['status']>=3)
{
echo "<div class='content'>";
echo "<div class='blockings'>";
echo 'У вас недостаточно прав для просмотра данной страницы';
include_once 'inc/foot.php';
echo "</div></div>";
}
if(isset($_GET['start']))
{
$money=5000000000;
if($mc['money']>=$money)
{
$rrubies=rand(0,800);
$rrubies1=rand(0,20);
$rrubies2=rand(0,200);
$rrubies3=rand(0,600);
$rmoney=rand(0,800);
$rmoney3=rand(0,20);
$rmoney2=rand(0,200);
$rmoney1=rand(0,600);
$rrating=rand(0,800);
$rrating3=rand(0,20);
$rrating2=rand(0,200);
$rrating1=rand(0,600);
$rheli=rand(0,1800);
$rheli1=rand(0,800);
$rheli2=rand(0,800);
$rheli3=rand(0,800);
if($mc['level']>=1 && $mc['level']<150000)
{
$rat = rand(2000000000,5000000000);
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']-$money)."' WHERE `id` = '$mc[id]'");
update_mc($rat);
}
//////////////выигрыш рубинов
if($rrubies==200)
{
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']+5000000)."' WHERE `id` = '$mc[id]'");
$rubies1=1;
}
if($rrubies1==20)
{
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']+10000)."' WHERE `id` = '$mc[id]'");
$rubies2=1;
}
if($rrubies2==100)
{
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']+100000)."' WHERE `id` = '$mc[id]'");
$rubies3=1;
}
if($rrubies3==150)
{
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']+1000000)."' WHERE `id` = '$mc[id]'");
$rubies4=1;
}
////////////выигрыш монет
if($rmoney==200)
{
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+1000000000000)."' WHERE `id` = '$mc[id]'");
$money4=1;
}
if($rmoney1==150)
{
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+100000000000)."' WHERE `id` = '$mc[id]'");
$money3=1;
}
if($rmoney2==100)
{
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+50000000000)."' WHERE `id` = '$mc[id]'");
$money2=1;
}
if($rmoney3==20)
{
mysql_query("UPDATE `kolhoz_collective` SET `money` = '".($mc['money']+10000000000)."' WHERE `id` = '$mc[id]'");
$money1=1;
}
/////опыт дополнительный
if($rrating==200)
{
mysql_query("UPDATE `kolhoz_collective` SET `rating` = '".($mc['rating']+2000000000000)."' WHERE `id` = '$mc[id]'");
$ratingS4=1;
}
if($rrating1==150)
{
mysql_query("UPDATE `kolhoz_collective` SET `rating` = '".($mc['rating']+1000000000000)."' WHERE `id` = '$mc[id]'");
$ratingS3=1;
}
if($rrating2==100)
{
mysql_query("UPDATE `kolhoz_collective` SET `rating` = '".($mc['rating']+500000000000)."' WHERE `id` = '$mc[id]'");
$ratingS2=1;
}
if($rrating3==20)
{
mysql_query("UPDATE `kolhoz_collective` SET `rating` = '".($mc['rating']+100000000000)."' WHERE `id` = '$mc[id]'");
$ratingS1=1;
}
//// выигрыш вертолетов
if($rheli==300)
{
mysql_query("INSERT INTO `kolhoz_collective_heli` SET `id_collective` = '$mc[id]', `id_user` = '$ku[id]', `heli` = '4'");
$heli4=1;
}
if($rheli1==250)
{
mysql_query("INSERT INTO `kolhoz_collective_heli` SET `id_collective` = '$mc[id]', `id_user` = '$ku[id]', `heli` = '3'");
$heli3=1;
}
if($rheli2==253)
{
mysql_query("INSERT INTO `kolhoz_collective_heli` SET `id_collective` = '$mc[id]', `id_user` = '$ku[id]', `heli` = '2'");
$heli2=1;
}
if($rheli3==254)
{
mysql_query("INSERT INTO `kolhoz_collective_heli` SET `id_collective` = '$mc[id]', `id_user` = '$ku[id]', `heli` = '1'");
$heli1=1;
}
echo "<div class='feedback'><img width='16' height='16' src='images/icons/experience.png' alt='o'> Опыт +<span>$rat</span></div>";
}
else
{
header("Location:?collective=$mc[id]&lottery_ct");
}
}
echo "<div class='event'><h1>Лотерея ''Колхозная''</h1></div>";
echo "<div class='content'><div class='block'>";
echo "<ul><li><img width='16' height='16' src='images/icons/ticket.png' alt='o'>
<a href='?collective=$mc[id]&lottery_ct&start=1'>Купить билет</a> <span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>5'000'000'000</span></span>
</li>
";
if(isset($_GET['start']) && $mc['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'>".rating($rat)."</span><span class='minor'> (<span>$rat</span>)</span></span></li>";
if(isset($rubies1))echo "<li><span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>5'000'000</span></li>";
if(isset($rubies2))echo "<li><span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>10'000</span></li>";
if(isset($rubies3))echo "<li><span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>100'000</span></li>";
if(isset($rubies4))echo "<li><span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>1'000'000</span></li>";
if(isset($money4))echo "<li><span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>1'000'000'000'000</span></li>";
if(isset($money3))echo "<li><span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>100'000'000'000</span></li>";
if(isset($money2))echo "<li><span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>50'000'000'000</span></li>";
if(isset($money1))echo "<li><span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>10'000'000'000</span></li>";
if(isset($ratingS4))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> <span class='title'>2'000'000'000'000</span></li>";
if(isset($ratingS3))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> <span class='title'>1'000'000'000'000</span></li>";
if(isset($ratingS2))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> <span class='title'>500'000'000'000</span></li>";
if(isset($ratingS1))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> <span class='title'>100'000'000'000</span></li>";
if(isset($heli4))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> Вертолет <span class='title'>Гром</span></li>";
if(isset($heli3))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> Вертолет <span class='title'>Дракон</span></li>";
if(isset($heli2))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> Вертолет <span class='title'>Ястреб</span></li>";
if(isset($heli1))echo "<li><span><img width='16' height='16' src='images/icons/experience.png' alt='o'> Вертолет <span class='title'>Шмель</span></li>";
}
?>
<?
echo "<li class='pt minor'>Лотерея - беспроигрышная, минимальный выигрыш <img width='16' height='16' src='images/icons/experience.png' alt='o'> 2000000000.</li></li>";
echo "</ul></div>";
?>
<?
include_once 'inc/foot.php';
?>