Файл: KOSMOS/index.php
Строк: 699
<?php
$time=time();
include_once 'inc/start_sess.php';
echo "<title>Ферма в Деревне</title>";
include_once 'inc/functions.php';
include_once 'inc/head.php';
if(!isset($ku))
{
include_once 'inc/no_auth.php';
include_once 'inc/forums.php';
}
include_once 'inc/start.php';
//ТЕХНИКA
include_once 'inc/tehnika.php';
//ПЕРЕХОД НА СЛЕДУЮЩИЙ УРОВЕНЬ
include_once 'inc/next_level.php';
include_once 'inc/uhead.php';
include_once 'inc/privet.php';
include_once 'inc/head_obyv.php';
include_once 'inc/sadovnik.php';
if($ku['panel']==1)
{
echo "<div class='block'><div style='text-align:right;'><span class='title'><img width='16' height='16' src='images/icons/money.png' alt='o'> <span>".number_format($ku[money])."</span> <img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span>".number_format($ku[rubies])."</span> <img width='16' height='16' src='images/icons/kristal.png' alt='o'><span>".number_format($ku[kristal])."</span></span></div>";
};
if($ku['level']>=20)
{
if(isset($_GET['get_prize']))
{
echo "<div class='event'><h1>Вы поймали сюрприз!</h1></div>";
echo '<div class="content"><div class="block">';
if(isset($_GET['gen_code']) && $_SESSION['prize']==$_GET['gen_code'] && isset($_SESSION['prize']))
{
$rk=rand(1,15);
$ku['kristal']=plus_kristal($rk);
$rr=rand(1,15);
$ku['rubies']=plus_rubies($rr);
$rm=rand(500,10000);
$ku['money']=plus_money($rm);
echo "Поздравляем! Вы поймали <img src='images/icons/ruby.png'/> <span class='title'>$rr</span>, <img src='images/icons/kristal.png'/> <span class='title'>$rk</span>".($rm!=0?" и <img src='images/icons/money.png'/> <span class='title'>$rm</span>":null).".";
unset($_SESSION['prize']);
}
else
{
echo "Эх, не успели(!";
}
echo "</div>";
include_once 'inc/foot.php';
}
$rand=rand(1,100);
if($rand==38 || $rand==67 || $rand==96)
{
$_SESSION['prize']=md5($rand);
echo "<div class='feedback'><center><img src='images/icons/ruby.png'> <a href='?get_prize=1&gen_code=".md5($rand)."'>Лови сюрприз!</a> <img src='images/icons/ruby.png'></center></div>";
}
}
include_once 'inc/shop.php';
if(isset($_GET['gazeta']))
{
include_once 'inc/gazeta.php';
}
if(isset($_GET['myfarm']))
{
include_once 'inc/myfarm.php';
}
if(isset($_GET['tikets']))
{
include_once 'inc/tikets.php';
}
if(isset($_GET['adminprivet']) && $ku['status']==3)
{
include_once 'inc/admin.privet.php';
}
if(isset($_GET['teg']))
{
include_once 'inc/tegi.php';
}
if(isset($_GET['almaz-off']) && $ku['dostup']>=1)
{
include_once 'inc/off-alm.php';
}
elseif(isset($_GET['zarplata']) && $ku['status']>0)
{
include_once 'inc/zarp.php';
}
if(isset($_GET['mywork']))
{
include_once 'inc/mywork.php';
}
if(isset($_GET['obyv']))
{
include_once 'inc/obyv.php';
}
if(isset($_GET['adminobyv']))
{
include_once 'inc/admin.obyv.php';
}
elseif(isset($_GET['tur']))
{
include_once 'inc/tur.php';
}
elseif(isset($_GET['emailr']) && $ku['id']=1)
{
include_once 'inc/emailr.php';
}
elseif(isset($_GET['warehouse']))
{
include_once 'inc/warehouse.php';
}
elseif(isset($_GET['mypetfarm']) && $ku['energi']!=0)
{
include_once 'inc/petfarm.php';
}
if(isset($_GET['myprud']) && $ku['level']>=30 && $ku['energi']!=0)
{
include_once 'inc/myprud.php';
}
elseif(isset($_GET['mygarden']) && $ku['level']>=35 && $ku['energi']!=0)
{
include_once 'inc/mygarden.php';
}
elseif(isset($_GET['mycellar']) && $ku['level']>=10 && $ku['energi']!=0)
{
include_once 'inc/mycellar.php';
}
elseif(isset($_GET['market']))
{
include_once 'inc/market.php';
}
elseif(isset($_GET['center']))
{
include_once 'inc/center.php';
}
if(isset($_GET['color']))
{
include_once 'color_nick/color.php';
}
elseif(isset($_GET['cellar_info']))
{
include_once 'inc/cellar_info.php';
}
elseif(isset($_GET['converter']))
{
include_once 'inc/converter.php';
}
elseif(isset($_GET['buy_plant']))
{
include_once 'inc/buy_plant.php';
}
elseif(isset($_GET['buy_plant2']))
{
include_once 'inc/buy_plant2.php';
}
elseif(isset($_GET['market']))
{
include_once 'inc/market.php';
}
elseif(isset($_GET['rulettka']))
{
include_once 'inc/rulettka.php';
}
elseif(isset($_GET['payment']))
{
include_once 'inc/payment.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['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['uc']) && intval($_GET['uc'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uc'])."' AND (`level` = '10' OR `level` > '10')"),0)!=0)
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uc'])."'"));
$au=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$ank[id_user]'"));
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['uw']) && intval($_GET['uw'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['uw'])."' AND (`level` = '15' OR `level` > '15')"),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=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$ank[id_user]'"));
include_once 'inc/pr.php';
}
elseif(isset($_GET['lottery']) && $ku['level']>=35)
{
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['perevod3']) && intval($_GET['perevod3'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['perevod3'])."'"),0)!=0 && $ku['status']==3)
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '".intval($_GET['perevod3'])."'"));
$anku=$ank;
include_once 'inc/perevod3.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']=='recipes' || $_GET['help']=='animals' || $_GET['help']=='fish' || $_GET['help']=='soils'))
{
if($_GET['help']=='plants')include_once 'inc/hp.php';
elseif($_GET['help']=='recipes')include_once 'inc/hr.php';
elseif($_GET['help']=='animals')include_once 'inc/ha.php';
elseif($_GET['help']=='fish')include_once 'inc/hf.php';
elseif($_GET['help']=='soils')include_once 'inc/hs.php';
if($_GET['help']=='works')include_once 'inc/hw.php';
}
elseif(isset($_GET['forum']))
{
include_once 'inc/forum.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['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_nick']))
{
include_once 'inc/change_nick.php';
}
elseif(isset($_GET['anketa']))
{
include_once 'inc/about_me.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['support']))
{
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_rassilka']))
{
include_once 'inc/mailr.php';
}
elseif(isset($_GET['zags']))
{
include_once 'inc/zags.php';
}
elseif(isset($_GET['energy']))
{
include_once 'inc/energys.php';
}
elseif(isset($_GET['elka']))
{
include_once 'inc/elka.php';
}
elseif(isset($_GET['energoatom']))
{
include_once 'inc/energoatom.php';
}
elseif(isset($_GET['podarok']))
{
include_once 'inc/podarok.php';
}
elseif(isset($_GET['pismo']))
{
include_once 'inc/pismo';
}
elseif(isset($_GET['ref']))
{
include_once 'inc/ref.php';
}
elseif(isset($_GET['status']))
{
include_once 'inc/status.php';
}
elseif(isset($_GET['mywork']))
{
include_once 'inc/mywork.php';
}
elseif(isset($_GET['vip']))
{
include_once 'inc/vip.php';
}
elseif(isset($_GET['game']))
{
include_once 'inc/mnenie.php';
}
elseif(isset($_GET['znak']))
{
include_once 'inc/znak.php';
}
elseif(isset($_GET['dom']))
{
include_once 'inc/dom.php';
}
elseif(isset($_GET['bega']))
{
include_once 'inc/bega.php';
}
elseif(isset($_GET['lepestk']))
{
include_once 'inc/lepestk.php';
}
elseif(isset($_GET['admin_listmes']))
{
include_once 'inc/admin_listmes.php';
}
if(isset($_GET['zags']))
{
include_once 'zags/index.php';
}
if(isset($_GET['razvod']))
{
include_once 'zags/razvod.php';
}
if(isset($_GET['action']))
{
include_once 'zags/zags.php';
}
elseif(isset($_GET['loto']))
{
include_once 'inc/loto.php';
}
elseif(isset($_GET['lottery']) && $ku['level']>=11)
{
include_once 'inc/lottery.php';
}
elseif(isset($_GET['lotteryk']) && $ku['level']>=11)
{
include_once 'inc/lotteryk.php';
}
elseif(isset($_GET['lotterry']) && $ku['level']>=11)
{
include_once 'inc/lotterry.php';
}
elseif(isset($_GET['sunduk']))
{
include_once 'inc/sunduk.php';
}
if(isset($_GET['podarok']))
{
include_once 'inc/podarok.php';
}
elseif(isset($_GET['weather']))
{
include_once 'inc/weather.php';
}
elseif(isset($_GET['ArenaLinkHistory']))
{
include_once 'arena/history.php';
}
elseif(isset($_GET['ArenaLinkBoy']))
{
include_once 'arena/boy_user.php';
}
elseif(isset($_GET['arenaa']))
{
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['kili']))
{
include_once 'inc/kili.php';
}
elseif(isset($_GET['indexx']))
{
include_once 'indexx.php';
}
elseif(isset($_GET['ruless']))
{
include_once 'ruless.php';
}
elseif(isset($_GET['statistika']))
{
include_once 'inc/stat.php';
}
elseif(isset($_GET['zarplata']) && $ku['status']>0)
{
include_once 'inc/zarp.php';
}
elseif(isset($_GET['mywork']))
{
include_once 'inc/mywork.php';
}
if(isset($_GET['ruletkam']))
{
include_once 'labirint/ruletkam.php';
}
elseif(isset($_GET['lombard']))
{
include_once 'inc/lombard.php';
}
if(isset($_GET['kbank']))
{
include_once 'inc/kbank.php';
}
elseif(isset($_GET['firma']))
{
include_once 'inc/firma.php';
}
elseif(isset($_GET['firm']))
{
include_once 'inc/firm.php';
}
elseif(isset($_GET['ruletka']))
{
include_once 'inc/ruletka.php';
}
elseif(isset($_GET['rul1']))
{
include_once 'inc/ruletka1.php';
}
elseif(isset($_GET['rul2']))
{
include_once 'inc/ruletka2.php';
}
elseif(isset($_GET['arenao']))
{
include_once 'inc/ruletka.php';
}
elseif(isset($_GET['ruletkaa']))
{
include_once 'inc/ruletkaa.php';
}
elseif(isset($_GET['admin']) && $ku['dostup']==1)
{
$admin=hsc($_GET['admin']);
if($admin=='plants')$admin_name='Растения';
elseif($admin=='recipes')$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=='smiles')$admin_name='Смайлы';
elseif($admin=='users')$admin_name='Пользователи';
elseif($admin=='collectives')$admin_name='Колхозы';
elseif($admin=='podarok')$admin_name='Подарок игрокам/колхозам';
elseif($admin=='gos')$admin_name='Госзаказы';
elseif($admin=='works')$admin_name='Работы';
elseif($admin=='emailr')$admin_name='Письмо на емаил от сайта';
elseif($admin=='mailr')$admin_name='Рассылка';
elseif($admin=='obyv')$admin_name='Объявления';
elseif($admin=='trees')$admin_name='Деревья';
else $admin_name='Админка';
if(in_array($_GET['admin'],array('pets','works','trees','mailr', 'emailr','plants','obyv','fish','recipes','soils','users','collectives','podarok','gos','levels','gifts')))include_once 'inc/admin.'.$_GET['admin'].'.php';
else include_once 'inc/admin.list.php';
}
else include_once 'inc/myfarm.php';
include_once 'inc/foot.php';
?>