Файл: test.kolhozu.keo.su/inc/collective_enlarge.php
Строк: 48
<?
$array_enls=array('1' => '600', '3' => '1500', '10' => '4000');
if($_GET['enlarge']!=NULL && $array_enls[intval($_GET['enlarge'])]!=NULL)
{
$cena=$array_enls[intval($_GET['enlarge'])];
if($mc['rubies']>=$cena)
{
if(isset($_GET['ok']))
{
mysql_query("UPDATE `kolhoz_collective` SET `rubies` = '".($mc['rubies']-$cena)."', `users_add` = '".($mc['users_add']+intval($_GET['enlarge']))."'");
header("Location:?collective=$ct[id]");
}
podtv("?collective=$ct[id]&selsovet&enlarge=".intval($_GET['enlarge'])."&ok","?collective=$ct[id]&selsovet&enlarge");
include_once 'inc/foot.php';
}
else no_rubies_ct($cena-$mc['rubies']);
}
echo "<div class='event'><h1><a href='?collective=$ct[id]'>".hsc($ct['name'])."</a> / Расширение колхоза</h1></div>";
echo '<div class="content">
<div class="block">';
echo "<div class='small ptm'>";
echo "<div style='padding-top:4px'>";
echo "<div class='event' style='height:2px'>";
echo "<div class='eventlight' style='height:2px;width:".rand(75,95)."%'>";
echo "</div>";
echo "</div>";
echo "<ul class='block'>";
echo "<li>";
echo "<div>В вашей компании количество мест может быть увеличено на</div>";
echo "<ul>";
foreach($array_enls AS $key => $value)
{
echo "<li><img width='16' height='16' src='images/icons/tick.png' alt='o'> ".($mcu['status']==1?"<a href='?collective=$ct[id]&selsovet&enlarge=$key'>":"<span>")."$key".($mcu['status']==1?"</a>":"</span>")." (цена: <span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>$value</span></span>)</li>";
}
echo "</ul>";
echo '<div class="pt minor">Расширить ккомпанию могут только детекторы компании за счет средств из компании.</div>';
echo "</div>";
include_once 'inc/foot.php';
?>