<?
if($_GET['nalog']!=NULL && in_array(intval($_GET['nalog']),array(0,1,5,10,20,25)) && intval($_GET['nalog'])!=$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['nalog'])."', `time_nalog` = '".($time+(3600*6))."' WHERE `id` = '$ct[id]'");
header("Location:?collective=$ct[id]&nalog");
exit;
}
}
echo "<div class='event'><h1><a href='?collective=$ct[id]'>".hsc($ct['name'])."</a> / Налоговая</h1></div>\n
<div class='content'>\n
<div class='block'>\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='images/icons/$img.png'/> \n";
if($value!=$ct['nalog'])echo "<a href='?collective=$ct[id]&nalog=$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";
include_once 'inc/foot.php';
?>