Файл: inc/collective/nalog.php
Строк: 56
<?
$title='Налог';
include_once '../system/config.php';
$mcu =mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_user` WHERE `id_user` = '$ku[id]'"));
$ct =mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective` WHERE `id` = '".intval($_GET['nalog'])."'"));
if(isset($_GET['nalog']) && ($mc['id']==$ct['id']) && ($mcu['status']==1)&& ($_GET['nalog'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective` WHERE `id` = '".($_GET['nalog'])."' LIMIT 1"),0)!=0){
if($_GET['letsgo']!=NULL && in_array(intval($_GET['letsgo']),array(0,1,5,10,20,25)) && intval($_GET['letsgo'])!=$ct['nalog'])
{
if($ct['time_nalog']>$time)err_game("Подождите ".time_left($ct['time_nalog']-$time));
else
{
mysql_query("UPDATE `kolhoz_collective` SET `nalog` = '".intval($_GET['letsgo'])."', `time_nalog` = '".($time+(3600*6))."' WHERE `id` = '$ct[id]'");
header("Location:/kolhoz/nalog/$ct[id]/");
exit;
}
}
echo"<div class='rzd2'></div><div class='menuin2'>";
echo "<div class='title'><a href='/kolhoz/$ct[id]'>".hsc($ct['name'])."</a> / Налоговая</h2></div>n
<div class='content'>n
<div class='div'>n";
$array_nalogs=array(0,1,5,10,20,25);
echo "<ul>n";
foreach($array_nalogs AS $key => $value)
{
if($value==0)$img='cross';else $img='arrow';
echo "<li><span><img src='/img/icons/$img.png'/> n";
if($value!=$ct['nalog'])echo "<a href='/kolhoz/nalog/$ct[id]/letsgo/$value'> n";
if($value==0)echo "Отключить налогn";
else echo "Налог ".$value."%n";
if($value!=$ct['nalog'])echo "</a>n";
echo "</span></li>n";
}
echo "</ul>n";
echo "<div class='pt minor'>n
Процен налога можно изменять раз в шесть часов.n
</div>n";
echo "</div>n";
echo"</div></div><div class='rzd2'></div>";
include_once '../system/foot.php';
}else
{
echo "<div class='title'>Ошибка</h2></div>";
echo "<div class='content'>";
echo "<div class='div'>";
echo 'Так просто ты тут ни чего не узнаешь. Попробуй найти того, кто тебе объяснит.';
include_once '../system/foot.php';
echo "</div></div>";
}
?>