<?php
/*
Автор скрипта: MoD
ICQ: 3536335
Скрипт нельзя 
кидать в паблик, 
барыжить(продавать) им, 
давать друзьям!
*/
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
only_reg();

$set['title']='Счастливый фермер!';
include_once '../sys/inc/thead.php';
title();
err();
aut();
$dog = mysql_result(mysql_query("select count(*) from `fermer_dog` WHERE  `id_user` = '$user[id]'  LIMIT 1"),0);
if($dog==0){
mysql_query("INSERT INTO `fermer_dog` (`id_user`,`time`) VALUES  ($user[id],NULL) ");
}
$post = mysql_result(mysql_query("select count(*) from `fermer_gr` WHERE  `id_user` = '$user[id]'  LIMIT 1"),0);
if($post<5){
mysql_query("INSERT INTO `fermer_gr` (`kol`,`semen`, `id_user`) VALUES  ( NULL, '0', '".$user['id']."') ");
mysql_query("INSERT INTO `fermer_gr` (`kol`,`semen`, `id_user`) VALUES  ( NULL, '0', '".$user['id']."') ");
mysql_query("INSERT INTO `fermer_gr` (`kol`,`semen`, `id_user`) VALUES  ( NULL, '0', '".$user['id']."') ");
mysql_query("INSERT INTO `fermer_gr` (`kol`,`semen`, `id_user`) VALUES  ( NULL, '0', '".$user['id']."') ");
mysql_query("INSERT INTO `fermer_gr` (`kol`,`semen`, `id_user`) VALUES  ( NULL, '0', '".$user['id']."') ");
}
$menu=' <b>&raquo;</b> ';
echo "<div class='rowup'>";

echo "<center><img src='/fermer/fermer.gif' alt=''/></center>";
echo "<center>Добро пожаловать на Ферму!</b></center>";
echo "</div>\n";
echo "<div class='menu'>";
echo $menu."<a href='my.php'>Моя ферма</a><br/>";
echo $menu."<a href='storage.php'>Склад</a><br/>";
echo $menu."<a href='shop.php'>Магазин семян</a><br/>";
echo $menu."<a href='shop_udobr.php'>Магазин удобрений</a><br/>";
echo $menu."<a href='dog.php'>Купить собаку</a><br/>";
echo $menu."<a href='fermers.php'>Фермеры</a><br/>";
echo $menu."<a href='bank.php'>Обмен баллов</a><br/>";
echo "</div>\n";


include_once '../sys/inc/tfoot.php';

?>