<?

$act=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_level` WHERE `id` = '1'"));
$months = array('января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 
'июля', 'августа', 'августа', 'сентября', 'ноября', 'декабря'); 
$m = $months[date('n')]; 
$ku=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$id'")); 
$cty=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective` WHERE `id` = '$mc[id]'")); 


$time=time(); 
include_once 'inc/start_sess.php';


$sses_name=session_name("SessionMid");
session_start();
require_once('inc/security_site.php');
$_SESSION['ref_stran']=substr($_SERVER['REQUEST_URI'],1);
 
echo "<title>Удивительный колxоз</title>";
include_once 'inc/functions.php'; 


include_once 'inc/head.php'; 

$config=mysql_fetch_array(mysql_query("SELECT * FROM kolhoz_config WHERE id='1'"));
if($config['timetur']<=$time)
{
$ustur=0;
$q=mysql_query("SELECT * FROM `kolhoz_user` WHERE `tuenir_on` = '1' ORDER BY `turnir` DESC, `rating` DESC LIMIT 10");
while($post=mysql_fetch_array($q))
{
$ustur++;
if($ustur==1)
{
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `rubies` + '5000' WHERE `id` = '$post[id]'");
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `cellar_key` + '2' WHERE `id` = '$post[id]'");
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$post[id]', `id_kont` = '0', `msg` = 'Здравствуйте! Поздравляем,.1. Вы получили 1-ое место .1. и получили 5000 рубинов и 2ключа! Приятной игры!', `time` = '$time', `type` = 'to'");
}
if($ustur==2)
{
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `rubies` + '5000' WHERE `id` = '$post[id]'");
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `cellar_key` + '1' WHERE `id` = '$post[id]'");
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$post[id]', `id_kont` = '0', `msg` = 'Здравствуйте! Поздравляем, .1. Вы получили 2-ое место .1. и получили 4500 рубинов и 1 ключ! Приятной игры!', `time` = '$time', `type` = 'to'");
}
if($ustur==3)
{
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `rubies` + '4000' WHERE `id` = '$post[id]'");
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$post[id]', `id_kont` = '0', `msg` = 'Здравствуйте! Поздравляем, .1. Вы получили 3 место .1. и получили 4000 рубинов! Приятной игры!', `time` = '$time', `type` = 'to'");
}
if($ustur==4 || $ustur==5)
{
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `rubies` + '2500' WHERE `id` = '$post[id]'");

mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$post[id]', `id_kont` = '0', `msg` = 'Здравствуйте! Поздравляем, .1. Вы получили 4-ое место .1. и получили 2500 рубинов! Приятной игры!', `time` = '$time', `type` = 'to'");
}
if($ustur==6 || $ustur==7 || $ustur==8)
{
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `rubies` + '1000' WHERE `id` = '$post[id]'");
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$post[id]', `id_kont` = '0', `msg` = 'Здравствуйте! Поздравляем, .1. Вы получили 5-ое место .1. и получили 1000 рубинов! Приятной игры!', `time` = '$time', `type` = 'to'");
}
if($ustur==9 || $ustur==10)
{
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `rubies` + '500' WHERE `id` = '$post[id]'");
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$post[id]', `id_kont` = '0', `msg` = 'Здравствуйте! Поздравляем, .1. Вы получили 5-ое место .1. и получили 500 рубинов! Приятной игры!', `time` = '$time', `type` = 'to'");
}
}
mysql_query("UPDATE kolhoz_config SET timetur = '".($time+3600*24*7)."'");
mysql_query("UPDATE `kolhoz_user` SET `turnir` = '0'");
}


if(!isset($ku)) 
{ 
include_once 'inc/no_auth.php'; 
} 
include_once 'inc/start.php'; 
if($ku['ip']!==$_SERVER['SERVER_ADDR']) 
{ 
mysql_query("UPDATE `kolhoz_user` SET `ip` = '".my_esc($_SERVER['REMOTE_ADDR'])."' WHERE `id` = '$ku[id]'") or die (mysql_error()); 
} 

//ТЕХНИКA 

include_once 'inc/tehnika.php'; 
//ПЕРЕХОД НА СЛЕДУЮЩИЙ УРОВЕНЬ 
include_once 'inc/next_level.php'; 

if($ku['polosa']==1) 
{ 
include_once 'inc/polosa.php'; 
} 
if($ku['panel']==1) 
{ 
echo "<TABLE WIDTH='100%'><TR>
<TD><center><div class='noga'><img width='16' height='16' src='images/icons/money.png' alt='o'> <span><font color='orange'>$ku[money]</font></span></div></center></TD><TD><center><div class='noga'><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span><font color='orange'>$ku[rubies]</font></span></div></center></TD><TD><center><div class='noga'><img width='16' height='16' src='images/icons/pkey.png' alt='o'> <span><font color='orange'>$ku[cellar_key]</font></span></div></center></TD><TD><center><a href='?payment'><div class='noga'><img width='16' height='16' src='images/plus.png' alt='o'></div></a></center><TD></TR></TABLE>";
if($ku['time_key']>$time){echo '<span><span class="nobr"> <img width="16" height="16" src="/images/icons/pkey.png" alt="o"> <a href="?nk"><span class="title">'.time_left($ku['time_key']-$time).'</span></a></span></span>';} 
echo '</div>'; 
} 
if($ku['guest']==1) 
{ 
echo"<div class='block'><img width='32' height='32' src='http://sadovnik.mobi/images/gardeners/kozemir.png' alt='' class='portrait'><span class='small'>Приветствую тебя дорогой фермер!<br>Ты не сохранился. <a href='?registration'>Сохранись</a> пожалуйста!</span></div>"; 
} 
include_once 'inc/uhead.php'; 


if($ku['level']==3 && $ku['guest']==1) 
{ 
include_once 'inc/save.php'; 
} 

if($ku['tuenir_on']==1)
{
if(isset($_GET['get_prize']))
{
echo "<div class='event'><h1>Вы нашли сундук!</h1></div>";
echo '<div class="content"><div class="block">';
error_reporting(E_ALL^E_NOTICE);
if(isset($_GET['gen_code']) && $_SESSION['prize']==$_GET['gen_code'] && isset($_SESSION['prize']))
{
$rr=rand(1,10);
mysql_query("UPDATE `kolhoz_user` SET `turnir` = `turnir` + '$rr' WHERE `id` = '$ku[id]'");

echo "Поздравляем! В сундуке <span class='title'>$rr</span> <img width='20' height='20' src='images/turnir.png'> золота.";
unset($_SESSION['prize']);
}
else
{
echo "Эх, не успели!";
}
echo "</div>";
include_once 'inc/foot.php';
}

$rand=rand(1,480);
if($rand==60 || $rand==120 || $rand==240)
{
$_SESSION['prize']=md5($rand);
echo "<div class='feedback'><center><img width='16' height='16' src='images/turnir.png'> <a href='?get_prize=1&gen_code=".md5($rand)."'><b>Сундук!</b></a> <img width='16' height='16' src='images/turnir.png'></center></div>";
}
}

if($ku['zvezda']>=0)
{
if(isset($_GET['get_podarok']))
{
echo "<div class='event'><h1>Вы поймали сюрприз!</h1></div>";
echo '<div class="content"><div class="block">';
if(isset($_GET['gen_code']) && $_SESSION['podarok']==$_GET['gen_code'] && isset($_SESSION['podarok']))
{
$rr=rand(10,100);
$ku['rubies']=plus_rubies($rr);
$rm=rand(500,5000);
$ku['money']=plus_money($rm);
echo "Поздравляем! Вы поймали <img src='images/icons/ruby.png'/> <span class='title'>$rr</span>".($rm!=0?" и <img src='images/icons/money.png'/> <span class='title'>$rm</span>":null).".";
unset($_SESSION['podarok']);
}
else
{
echo "Эх, не успели!";
}
echo "</div>";
include_once 'inc/foot.php';
}

$rand=rand(1,400);
if($rand==100 || $rand==200  || $rand==300)
{
$_SESSION['podarok']=md5($rand);
echo "<div class='feedback'><center><img src='images/icons/ruby.png'> <a href='?get_podarok=1&gen_code=".md5($rand)."'>Лови сюрприз!</a> <img src='images/icons/ruby.png'></center></div>";
}
}

include_once 'inc/podarok.php'; 
include_once 'inc/bots/sadovnik.php'; 
include_once 'inc/bots/sadovnik2.php'; 
include_once 'inc/bots/worker1.php'; 
include_once 'inc/bots/worker2.php'; 
include_once 'inc/bots/worker3.php'; 
include_once 'inc/bots/worker4.php'; 
include_once 'inc/shop.php'; 


if(isset($_GET['avatars'])) 
{ 
include_once 'inc/avatars.php'; 
}
if(isset($_GET['myfarm'])) 
{ 
include_once 'inc/myfarm.php'; 
}
elseif(isset($_GET['quest']))
{
include_once 'inc/quest.php';
}
elseif(isset($_GET['quest']))
{
include_once 'inc/quest.php';
}
elseif(isset($_GET['loteree']) && $ku['level']>=35)
{
include_once 'inc/loteree.php';
}
if(isset($_GET['zvezda_pocheta'])) 
{ 
include_once 'inc/zvezda_pocheta.php'; 
}
if(isset($_GET['gb'])) 
{ 
include_once 'gb.php'; 
}
if(isset($_GET['newstart']))
{
include_once 'inc/newstart.php';
}
elseif(isset($_GET['mytreefarm']) && $ku['level']>=20) 
{ 
include_once 'inc/treefarm.php'; 
} 
elseif(isset($_GET['mygarden']) && $ku['level']>=20) 
{ 
include_once 'inc/mygarden.php'; 
} 
if(isset($_GET['jalob'])) 
{ 
include_once 'inc/jalob.php'; 
} 
elseif(isset($_GET['ArenaLinkHistory'])) 
{ 
include_once 'arena/history.php'; 
}
elseif(isset($_GET['ArenaLinkBoy'])) 
{ 
include_once 'arena/boy_user.php'; 
}
elseif(isset($_GET['arena'])) 
{ 
include_once 'arena/index.php'; 
}
elseif(isset($_GET['add_boy'])) 
{ 
include_once 'arena/add_boy.php'; 
}
elseif(isset($_GET['go_boy'])) 
{ 
include_once 'arena/go_boy.php'; 
}
elseif(isset($_GET['battle'])) 
{ 
include_once 'arena/battle.php'; 
}
elseif(isset($_GET['ArenaLinkHistory'])) 
{ 
include_once 'arena/history.php'; 
}
elseif(isset($_GET['ArenaLinkBoy'])) 
{ 
include_once 'arena/boy_user.php'; 
}
elseif(isset($_GET['arena'])) 
{ 
include_once 'arena/index.php'; 
}
elseif(isset($_GET['add_boy'])) 
{ 
include_once 'arena/add_boy.php'; 
}
elseif(isset($_GET['go_boy'])) 
{ 
include_once 'arena/go_boy.php'; 
}
elseif(isset($_GET['battle'])) 
{ 
include_once 'arena/battle.php'; 
}
if(isset($_GET['journal'])) 
{ 
include_once 'inc/journal.php'; 
} 
if(isset($_GET['registration']) && $ku[guest]==1) 
{ 
include_once 'inc/save.php'; 
} 
elseif(isset($_GET['ozero']) && $ku['level']>=15)
{ 
include_once 'inc/fish.php'; 
} 
elseif(isset($_GET['mycellar2']) && $ku['level']>=20) 
{ 
include_once 'inc/mycellar2.php'; 
} 
if(isset($_GET['rubalka']))
{
include_once 'inc/rubalka.php';
}
if(isset($_GET['licen']))
{
include_once 'inc/licen.php';
}
if(isset($_GET['rvy']))
{
include_once 'inc/rvy.php';
}
if(isset($_GET['rna']))
{
include_once 'inc/rna.php';
}
if(isset($_GET['rpr']))
{
include_once 'inc/rpr.php';
}
if(isset($_GET['nk'])) 
{ 
include_once 'inc/nk.php'; 
} 
if(isset($_GET['act_user'])) 
{ 
include_once 'inc/act_user.php'; 
} 
elseif(isset($_GET['mycellar']) && $ku['level']>=10) 
{ 
include_once 'inc/mycellar.php'; 
} 
elseif(isset($_GET['cellar_info'])) 
{ 
include_once 'inc/cellar_info.php'; 
} 
if(isset($_GET['mywork'])) 
{ 
include_once 'inc/mywork.php'; 
} 

if(isset($_GET['cvest'])) 
{ 
include_once 'inc/cvest.php'; 
} 
if(isset($_GET['podarok']))
{
include_once 'inc/podarok1.php';
}

elseif(isset($_GET['warehouse'])) 
{ 
include_once 'inc/warehouse.php'; 
} 
elseif(isset($_GET['gonki'])) 
{ 
include_once 'inc/gonki.php'; 
} 
//Покупка по смс 
elseif(isset($_GET['key1'])) 
{ 
include_once 'inc/smsbill/key1.php'; 
} 
elseif(isset($_GET['key5'])) 
{ 
include_once 'inc/smsbill/key5.php'; 
} 
elseif(isset($_GET['key5'])) 
{ 
include_once 'inc/smsbill/key5.php'; 
} 
elseif(isset($_GET['paykey'])) 
{ 
include_once 'inc/paykey.php'; 
} 
elseif(isset($_GET['sms15'])) 
{ 
include_once 'inc/smsbill/sms15.php'; 
} 
elseif(isset($_GET['sms100'])) 
{ 
include_once 'inc/smsbill/sms100.php'; 
} 
elseif(isset($_GET['sms200'])) 
{ 
include_once 'inc/smsbill/sms200.php'; 
} 
elseif(isset($_GET['sms500'])) 
{ 
include_once 'inc/smsbill/sms500.php'; 
} 
elseif(isset($_GET['sms1000'])) 
{ 
include_once 'inc/smsbill/sms1000.php'; 
} 
elseif(isset($_GET['sms10000'])) 
{ 
include_once 'inc/smsbill/sms10000.php'; 
} 
elseif(isset($_GET['smspok'])) 
{ 
include_once 'inc/smspok.php'; 
} 
//////////////////////////////////////////////////////////// 
elseif(isset($_GET['mods'])) 
{ 
include_once 'inc/mods.php'; 
} 
elseif(isset($_GET['support'])) 
{ 
include_once 'inc/support.php'; 
} 
elseif(isset($_GET['tikets'])) 
{ 
include_once 'inc/tikets.php'; 
} 
elseif(isset($_GET['admp'])) 
{ 
include_once 'inc/adm.php'; 
} 
elseif(isset($_GET['elka'])) 
{ 
include_once 'inc/elka.php'; 
} 
elseif(isset($_GET['podrubies'])) 
{ 
include_once 'inc/podrubies.php'; 
} 
elseif(isset($_GET['podmoney'])) 
{ 
include_once 'inc/podmoney.php'; 
} 
elseif(isset($_GET['firma'])) 
{ 
include_once 'inc/firma.php'; 
} 
elseif(isset($_GET['avatar'])) 
{ 
include_once 'inc/vit.php'; 
} 
if(isset($_GET['zags']))
{
include_once 'zags/index.php';
}
if(isset($_GET['actions']))
{
include_once 'zags/zags.php';
}
if(isset($_GET['razvod']))
{
include_once 'zags/razvod.php';
}
elseif(isset($_GET['admin_listmes'])) 
{ 
include_once 'inc/admin_listmes.php'; 
} 
elseif(isset($_GET['ruletka'])) 
{ 
include_once 'inc/ruletka.php'; 
} 
elseif(isset($_GET['rul1'])) 
{ 
include_once 'inc/ruletka1.php'; 
} 
elseif(isset($_GET['tournament'])) 
{ 
include_once 'inc/tournament.php'; 
} 
elseif(isset($_GET['rul2'])) 
{ 
include_once 'inc/ruletka2.php';
} 
elseif(isset($_GET['lombard']))
{
include_once 'inc/lombard.php';
}
elseif(isset($_GET['firm'])) 
{ 
include_once 'inc/firm.php'; 
} 

elseif(isset($_GET['mypetfarm']) && $ku['level']>=10) 
{ 
include_once 'inc/petfarm.php'; 
} 
elseif(isset($_GET['center'])) 
{ 
include_once 'inc/center.php'; 
} 
if(isset($_GET['zarplata']))
{
include_once 'inc/zarp.php';
}
elseif(isset($_GET['out'])) 
{ 
include_once 'inc/out.php'; 
} 
elseif(isset($_GET['objava'])) 
{ 
include_once 'inc/objava.php'; 
} 
elseif(isset($_GET['converter'])) 
{ 
include_once 'inc/converter.php'; 
} 
elseif(isset($_GET['buy_plant'])) 
{ 
include_once 'inc/buy_plant.php'; 
} 
elseif(isset($_GET['action'])) 
{ 
include_once 'inc/actions.php'; 
} 
//Покупка рубинов WebMoney 
elseif(isset($_GET['payment'])) 
{ 
include_once 'inc/payment.php'; 
} 
elseif(isset($_GET['pokmoney'])) 
{ 
include_once 'inc/pokmoney.php'; 
} 
elseif(isset($_GET['pokrubies'])) 
{ 
include_once 'inc/pokrubies.php'; 
} 
////////////////////////////// 
//кОНЕЦ 
elseif(isset($_GET['rating']) && !isset($_GET['collective'])) 
{ 
include_once 'inc/rating.php'; 
} 
elseif(isset($_GET['online'])) 
{ 
include_once 'inc/online.php'; 
} 
elseif(isset($_GET['user']) && intval($_GET['user'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['user'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['user'])."'")); 
$au=$ank; 
include_once 'inc/user.php'; 
} 
elseif(isset($_GET['ug']) && intval($_GET['ug'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['ug'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['ug'])."'")); 
$au=$ank; 
include_once 'inc/ug.php'; 
} 
elseif(isset($_GET['uw']) && intval($_GET['uw'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uw'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uw'])."'")); 
$au=$ank; 
include_once 'inc/uw.php'; 
} 
elseif(isset($_GET['pr']) && intval($_GET['pr'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['pr'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['pr'])."'")); 
$au=$ank; 
include_once 'inc/uo.php'; 
} 
elseif(isset($_GET['uc']) && intval($_GET['uc'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uc'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uc'])."'")); 
$au=$ank; 
include_once 'inc/uc.php'; 
} 
elseif (isset($_GET['referals'])) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['referals'])."'")); 
$au=$ank; 
include_once 'inc/referals.php'; 
} 
elseif(isset($_GET['uf']) && intval($_GET['uf'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uf'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uf'])."'")); 
$au=$ank; 
include_once 'inc/uf.php'; 
} 
elseif(isset($_GET['upf']) && intval($_GET['upf'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['upf'])."' AND (`level` = '10' OR `level` > '10')"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['upf'])."'")); 
$au=$ank; 
include_once 'inc/upf.php'; 
} 
elseif(isset($_GET['lottery']) && $ku['level']>=30) 
{ 
include_once 'inc/lottery.php'; 
} 
elseif(isset($_GET['mail'])) 
{ 
include_once 'inc/mail.php'; 
} 
elseif(isset($_GET['presents']) && intval($_GET['presents'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['presents'])."'"),0)!=0) 
{ 
include_once 'inc/presents.php'; 
} 
elseif(isset($_GET['perevod']) && intval($_GET['perevod'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['perevod'])."' AND `rating` < '$ku[rating]'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['perevod'])."'")); 
$anku=$ank; 
include_once 'inc/perevod.php'; 
} 
elseif(isset($_GET['perevod2']) && intval($_GET['perevod2'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['perevod2'])."'"),0)!=0 && $ku['status']==3) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['perevod2'])."'")); 
$anku=$ank; 
include_once 'inc/perevod2.php'; 
} 
elseif(isset($_GET['communication']) && intval($_GET['communication'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['communication'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['communication'])."'")); 
$anku=$ank; 
include_once 'inc/communication.php'; 
} 
elseif(isset($_GET['dostig']) && intval($_GET['dostig'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['dostig'])."'"),0)!=0) 
{ 
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['dostig'])."'")); 
$anku=$ank; 
include_once 'inc/dostig.php'; 
} 
elseif(isset($_GET['help']) && ($_GET['help']=='plants' || $_GET['help']=='works' || $_GET['help']=='recipes' || $_GET['help']=='recipes2' || $_GET['help']=='animals' || $_GET['help']=='fish' || $_GET['help']=='trees' || $_GET['help']=='soils')) 
{ 
if($_GET['help']=='plants')include_once 'inc/hp.php'; 
elseif($_GET['help']=='works')include_once 'inc/hw.php'; 
elseif($_GET['help']=='recipes')include_once 'inc/hr.php'; 
elseif($_GET['help']=='recipes2')include_once 'inc/hr2.php'; 
elseif($_GET['help']=='animals')include_once 'inc/ha.php'; 
elseif($_GET['help']=='fish')include_once 'inc/hf.php'; 
elseif($_GET['help']=='trees')include_once 'inc/tr.php'; 
elseif($_GET['help']=='soils')include_once 'inc/hs.php'; 
} 
elseif(isset($_GET['forum'])) 
{ 
include_once 'inc/forum.php'; 
} 
elseif(isset($_GET['mailing_gm'])) 
{ 
include_once 'inc/mailing_gm.php'; 
} 
elseif(isset($_GET['chat'])) 
{ 
include_once 'inc/chat.php'; 
} 
elseif(isset($_GET['search'])) 
{ 
include_once 'inc/search.php'; 
} 

elseif(isset($_GET['search_collective'])) 
{ 
include_once 'inc/search_ct.php'; 
} 
elseif(isset($_GET['collectives'])) 
{ 
include_once 'inc/collectives.php'; 
} 
elseif(isset($_GET['rabota']) && $ku['level']>=5) 
{ 
include_once 'inc/rabota.php'; 
} 
elseif(isset($_GET['mycollective'])) 
{ 
include_once 'inc/mycollective.php'; 
} 
elseif(isset($_GET['collective_create'])) 
{ 
include_once 'inc/collective_create.php'; 
} 
elseif(isset($_GET['collective']) && $ct=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective` WHERE `id` = '".intval($_GET['collective'])."'"))) 
{ 
include_once 'inc/collective.php'; 
} 
elseif(isset($_GET['goshistory'])) 
{ 
include_once 'inc/goshistory.php'; 
} 
elseif(isset($_GET['gos']) && $goss=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_gos` WHERE `id` = '".intval($_GET['gos'])."'"))) 
{ 
include_once 'inc/gos.php'; 
} 
elseif(isset($_GET['gos'])) 
{ 
include_once 'inc/action.php'; 
} 
elseif(isset($_GET['comphistory'])) 
{ 
include_once 'inc/comphistory.php'; 
} 
elseif(isset($_GET['comp']) && $comp=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_comp` WHERE `id` = '".intval($_GET['comp'])."'"))) 
{ 
include_once 'inc/comp.php'; 
} 
elseif(isset($_GET['comp'])) 
{ 
include_once 'inc/comp_page.php'; 
} 
elseif(isset($_GET['change_nickname'])) 
{ 
include_once 'inc/change_nick.php'; 
} 
elseif(isset($_GET['change_pass'])) 
{ 
include_once 'inc/change_pass.php'; 
} 
elseif(isset($_GET['anketa'])) 
{ 
include_once 'inc/anketa.php';
} 
elseif(isset($_GET['stat'])) 
{ 
include_once 'inc/mystatus.php'; 
} 
elseif(isset($_GET['settings'])) 
{ 
include_once 'inc/settings.php'; 
} 
elseif(isset($_GET['smiles'])) 
{ 
include_once 'inc/smiles.php'; 
} 
elseif(isset($_GET['friends'])) 
{ 
include_once 'inc/friends.php'; 
} 
elseif(isset($_GET['blacklist'])) 
{ 
include_once 'inc/blacklist.php'; 
} 
elseif(isset($_GET['suppor'])) 
{ 
include_once 'inc/support.php'; 
} 
elseif(isset($_GET['rules'])) 
{ 
include_once 'inc/rules.php'; 
} 
elseif(isset($_GET['bank'])) 
{ 
include_once 'inc/bank.php'; 
} 

elseif(isset($_GET['admin']) && $ku['dostup']==1) 
{ 
$admin=hsc($_GET['admin']); 
if($admin=='plants')$admin_name='Растения'; 
if($admin=='works')$admin_name='Работы'; 
elseif($admin=='recipes')$admin_name='Рецепты'; 
elseif($admin=='recipes2')$admin_name='Рецепты'; 
elseif($admin=='pets')$admin_name='Животные'; 
elseif($admin=='fish')$admin_name='Рыбы'; 
elseif($admin=='soils')$admin_name='Удобрения'; 
elseif($admin=='levels')$admin_name='Уровни'; 
elseif($admin=='gifts')$admin_name='Подарки'; 
elseif($admin=='smale')$admin_name='Смайлы'; 
elseif($admin=='users')$admin_name='Пользователи'; 
elseif($admin=='collectives')$admin_name='Колхозы'; 
elseif($admin=='gos')$admin_name='Госзаказы'; 
elseif($admin=='trees')$admin_name='Деревья'; 
elseif($admin=='actions')$admin_name='Акции'; 
elseif($admin=='objava')$admin_name='Объявления'; 
elseif($admin=='podarok')$admin_name='Подарок игрокам/колхозам'; 
elseif($admin=='messages')$admin_name='Рассылка';
elseif($admin=='quest')$admin_name='Рассылка'; 
elseif($admin=='adm'&& $ku['id']==1)$admin_name='Доступ'; 
else $admin_name='Админка'; 
if(in_array($_GET['admin'],array('pets','plants','fish','trees','quest','objava','podarok','messages','actions','recipes','recipes2','soils','users','collectives','gos','levels','works','gifts')))include_once 'inc/admin.'.$_GET['admin'].'.php'; 
else include_once 'inc/admin.list.php'; 
} 
elseif(isset($_GET['support']) && $ku['status']==1) 
{ 
$support=hsc($_GET['support']); 
if($support=='gifts')$support_name='Подарки'; 
elseif($support=='smale')$support_name='Смайлы'; 
elseif($support=='gos')$support_name='Госзаказы'; 
elseif($support=='actions')$support_name='Акции'; 
else $support_name='Админка'; 
if(in_array($_GET['support'],array('actions','smale','gos','gifts')))include_once 'inc/support.'.$_GET['support'].'.php'; 
else include_once 'inc/support.list.php'; 
} 
else include_once 'inc/myfarm.php'; 
include_once 'inc/foot.php'; 
?>