Файл: test.kolhozu.keo.su/inc/buildings.php
Строк: 284
<?
if(isset($_GET['soil']))
{
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1 && $ct['soil']<10)
{
if($ct['soil']==0)$cena=5000;else $cena=2500;
if($ct['soil']==0)$rating=0;else $rating=0;
if(isset($_GET['level']))
{
if(isset($_GET['ok']))
{
if($mc['rubies']>=$cena)
{
mysql_query("UPDATE `kolhoz_collective` SET `soil` = '".($mc['soil']+1)."' WHERE `id` = '$mc[id]'");
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']-$cena)."', `rating` = '".($mc['rating']+$rating)."' WHERE `id` = '$mc[id]'");
header("Location:?collective=$ct[id]&buildings&soil&".passgen());
exit;
}
else
{
echo no_rubies_ct($cena-$mc['rubies']);
}
}
echo podtv("?collective=$ct[id]&buildings&soil&level&ok","?collective=$ct[id]&buildings&soil");
include_once 'inc/foot.php';
}
}
echo "<div class='event'><h1><a href='?collective=$ct[id]&buildings'>Заводы</a> / Завод '' Турбо ''</h1></div>";
echo '<div class="content">
<div class="block">
<div>
<span class="epic">Завод Турбо </span> - усиливает эффект балонов с азотом.
<div style="clear:both"></div>
<h3>Эффект</h3>
<div class="title">
Увеличивает силу балонов с азотом на 5% за каждый уровень.
</div>
<div style="clear:both;"></div>';
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1)if($ct['soil']<10)echo "<div> <img width='16' height='16' src='images/icons/plus.png' alt='o'> <a href='?collective=$ct[id]&buildings&soil&level'>".($ct['soil']==0?"Купить":"Повысить уровень")."</a> <span class='minor'>(цена <span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>$cena</span></span>)</span>";
if($ct['soil']>0)echo '<div class="pt">
Текущий уровень: <span class="title">'.$ct['soil'].'</span> / <span>10</span><br></div>';
echo '<div class="pt">
<img width="16" height="16" src="images/icons/zavod.png" alt="o"> <a href="?collective='.$ct['id'].'&buildings">Заводы</a>
</div>
</div>';
include_once 'inc/foot.php';
}
if(isset($_GET['irrigate']))
{
if($ct['irrigate']==0)$cena=5000;else $cena=2500;
if($ct['irrigate']==0)$rating=0;else $rating=0;
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1 && $ct['irrigate']<10)
{
if(isset($_GET['level']))
{
if(isset($_GET['ok']))
{
if($mc['rubies']>=$cena)
{
mysql_query("UPDATE `kolhoz_collective` SET `irrigate` = '".($mc['irrigate']+1)."' WHERE `id` = '$mc[id]'");
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']-$cena)."', `rating` = '".($mc['rating']+$rating)."' WHERE `id` = '$mc[id]'");
header("Location:?collective=$ct[id]&buildings&irrigate&".passgen());
exit;
}
else
{
echo no_rubies_ct($cena-$mc['rubies']);
}
}
echo podtv("?collective=$ct[id]&buildings&irrigate&level&ok","?collective=$ct[id]&buildings&irrigate");
include_once 'inc/foot.php';
}
}
echo "<div class='event'><h1><a href='?collective=$ct[id]&buildings'>Заводы</a> /Завод '' Навигатор ''</h1></div>";
echo '<div class="content">
<div class="block">
<div>
<span class="epic">Завод Навигатор</span> - Даёт эфект аналогичный GPS-навигатору.
<div style="clear:both"></div>
<h3>Эффект</h3>
<div class="title">
Дает постоянный эффект аналогичный GPS-навигатору (уровень * 10%).
</div>
</div>
<div style="clear:both;"></div>';
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1)if($ct['irrigate']<10)echo "<div> <img width='16' height='16' src='images/icons/plus.png' alt='o'> <a href='?collective=$ct[id]&buildings&irrigate&level'>".($ct['irrigate']==0?"Купить":"Повысить уровень")."</a> <span class='minor'>(цена <span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>$cena</span></span>)</span></div>";
if($ct['irrigate']>0)echo '<div class="pt">
Текущий уровень: <span class="title">'.$ct['irrigate'].'</span> / <span>10</span><br></div>';
echo '<div class="pt">
<img width="16" height="16" src="images/icons/zavod.png" alt="o"> <a href="?collective='.$ct['id'].'&buildings">Заводы</a>
</div>
</div>';
include_once 'inc/foot.php';
}
if(isset($_GET['vet']))
{
if($ct['vet']==0)$cena=5000;else $cena=2500;
if($ct['vet']==0)$rating=0;else $rating=0;
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1 && $ct['vet']<10)
{
if(isset($_GET['level']))
{
if(isset($_GET['ok']))
{
if($mc['rubies']>=$cena)
{
mysql_query("UPDATE `kolhoz_collective` SET `vet` = '".($mc['vet']+1)."' WHERE `id` = '$mc[id]'");
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']-$cena)."', `rating` = '".($mc['rating']+$rating)."' WHERE `id` = '$mc[id]'");
header("Location:?collective=$ct[id]&buildings&vet&".passgen());
exit;
}
else
{
echo no_rubies_ct($cena-$mc['rubies']);
}
}
echo podtv("?collective=$ct[id]&buildings&vet&level&ok","?collective=$ct[id]&buildings&vet");
include_once 'inc/foot.php';
}
}
echo "<div class='event'><h1><a href='?collective=$ct[id]&buildings'>Заводы</a> / Завод '' Вокзальный ''</h1></div>";
echo '<div class="content">
<div class="block">
<div>
<span class="epic">Завод Вокзальный</span> - завод для автовокзала.
<div style="clear:both"></div>
<h3>Эффект</h3>
<div class="title">
Увеличивает опыт с автовокзала.<br>
Опыт увеличивается на (уровень * 20%).
</div>
</div>
<div style="clear:both;"></div>';
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1)if($ct['vet']<10)echo "<div> <img width='16' height='16' src='images/icons/plus.png' alt='o'> <a href='?collective=$ct[id]&buildings&vet&level'>".($ct['vet']==0?"Купить":"Повысить уровень")."</a> <span class='minor'>(цена <span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>$cena</span></span>)</span></div>";
if($ct['vet']>0)echo '<div class="pt">
Текущий уровень: <span class="title">'.$ct['vet'].'</span> / <span>10</span><br></div>';
echo '<div class="pt">
<img width="16" height="16" src="images/icons/zavod.png" alt="o"> <a href="?collective='.$ct['id'].'&buildings">Заводы</a>
</div>
</div>';
include_once 'inc/foot.php';
}
if(isset($_GET['lib']))
{
$cena=5000;
if($ct['lib']==0)$rating=0;else $rating=0;
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1 && $ct['lib']==0)
{
if(isset($_GET['level']))
{
if(isset($_GET['ok']))
{
if($mc['rubies']>=$cena)
{
mysql_query("UPDATE `kolhoz_collective` SET `lib` = '".($mc['lib']+1)."' WHERE `id` = '$mc[id]'");
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']-$cena)."', `rating` = '".($mc['rating']+$rating)."' WHERE `id` = '$mc[id]'");
header("Location:?collective=$ct[id]&buildings&lib&".passgen());
exit;
}
else
{
echo no_rubies_ct($cena-$mc['rubies']);
}
}
echo podtv("?collective=$ct[id]&buildings&lib&level&ok","?collective=$ct[id]&buildings&lib");
include_once 'inc/foot.php';
}
}
echo "<div class='event'><h1><a href='?collective=$ct[id]&buildings'>Заводы</a> / Завод '' Механик ''</h1></div>";
echo '<div class="content">
<div class="block">
<div>
<span class="epic">Завод Механик</span> - завод по производству механических деталей.
<div style="clear:both"></div>
<h3>Эффект</h3>
<div class="title">
Повышает получаемый базовый опыт всех перевозчиков на 50%.
</div>
</div>
<div style="clear:both;"></div>';
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1)if($ct['lib']==0)echo "<div> <img width='16' height='16' src='images/icons/plus.png' alt='o'> <a href='?collective=$ct[id]&buildings&lib&level'>Купить</a> <span class='minor'>(цена <span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>$cena</span></span>)</span></div>";
echo '<div class="pt">
<img width="16" height="16" src="images/icons/zavod.png" alt="o"> <a href="?collective='.$ct['id'].'&buildings">Заводы</a>
</div>
</div>';
include_once 'inc/foot.php';
}
if(isset($_GET['greenhouse']))
{
if($ct['greenhouse']==0)$cena=4000;else $cena=2000;
if($ct['greenhouse']==0)$rating=0;else $rating=0;
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1 && $ct['greenhouse']<10)
{
if(isset($_GET['level']))
{
if(isset($_GET['ok']))
{
if($mc['rubies']>=$cena)
{
mysql_query("UPDATE `kolhoz_collective` SET `greenhouse` = '".($mc['greenhouse']+1)."' WHERE `id` = '$mc[id]'");
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']-$cena)."', `rating` = '".($mc['rating']+$rating)."' WHERE `id` = '$mc[id]'");
header("Location:?collective=$ct[id]&buildings&greenhouse&".passgen());
exit;
}
else
{
echo no_rubies_ct($cena-$mc['rubies']);
}
}
echo podtv("?collective=$ct[id]&buildings&greenhouse&level&ok","?collective=$ct[id]&buildings&greenhouse");
include_once 'inc/foot.php';
}
}
echo "<div class='event'><h1><a href='?collective=$ct[id]&buildings'>Заводы</a> / Завод '' Сканер '' </h1></div>";
echo '<div class="content">
<div class="block">
<div>
<span class="epic">Завод Сканер</span> - Завод производственный.
<div style="clear:both"></div>
<h3>Эффект</h3>
<div class="title">
Увеличивает количество отчётов с такси на (уровень * 20%).
</div>
</div>
<div style="clear:both;"></div>';
if(isset($mc) && $mc['id']==$ct['id'] && $mcu['status']==1)if($ct['greenhouse']<10)echo "<div> <img width='16' height='16' src='images/icons/plus.png' alt='o'> <a href='?collective=$ct[id]&buildings&greenhouse&level'>".($ct['greenhouse']==0?"Купить":"Повысить уровень")."</a> <span class='minor'>(цена <span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>$cena</span></span>)</span></div>";
if($ct['greenhouse']>0)echo '<div class="pt">
Текущий уровень: <span class="title">'.$ct['greenhouse'].'</span> / <span>10</span><br></div>';
echo '<div class="pt">
<img width="16" height="16" src="images/icons/guild.png" alt="o"> <a href="?collective='.$ct['id'].'&buildings">Заводы</a>
</div>
</div>';
include_once 'inc/foot.php';
}
$array_buildings=array('soil/Турбо' => $ct['soil'], 'irrigate/Навигатор' => $ct['irrigate'], 'vet/Вокзальный' => $ct['vet'], 'lib/Механик' => $ct['lib'], 'greenhouse/Сканер' => $ct['greenhouse']);
echo "<div class='event'><h1><a href='?collective=$ct[id]'>".hsc($ct['name'])."</a> / Заводы</h1></div>";
echo '<div class="content">
<div class="block">
<ul>';
foreach($array_buildings AS $key => $value)
{
$post=explode('/',$key);
echo "<li><img width='16' height='16' src='images/icons/zavod.png' alt='o'> <a href='?collective=$ct[id]&buildings&$post[0]' class='".($value!=0?'epic':'minor')."'>$post[1]</a> ".($value!=0 && $post[0]!='lib'?"(<span class='title'>$value</span>)":null)."</li>";
}
echo '</ul>
</div>';
include_once 'inc/foot.php';
?> pt?collective=$ct[id]div class='event'
titlediv class='event'
div class='event'
div class='event'При покупке увеличивает опыт компании на div class='event'16div class='event'/divimg width=div class='event'/divdiv class='event' $mcu['status']==1)if($ct['vet']div class='event'spandiv class='event'div class='event'div class='event'div class='event'div class='event'div class='event'$post[0]' class='