<?php

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';


$set['title']='Mobil Fermer!';
error_reporting (0);
include_once '../sys/inc/thead.php';
title();
err();
aut();
//header("Content-type: application/vnd.wap.xhtml+xml");
header("Content-type: text/html");
if (isset($user)){
$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) ");
mysql_query("UPDATE `user` SET `fermer_doggy`='0' WHERE `id`='id_user'");
}
$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']."') ");
}
echo "<link rel='stylesheet' href='style.css' type='text/css' /><center>";
echo "<div class='ferm1'><img src='fermer.gif'><br/>";
include_once "news/news_main.php";
$menu=' <img src="/ferm/action.png"> ';
include_once 'my2.php';
echo "<div class='ferm3'>";
if ($user[level]>4)
{
echo "<center><a href='adminka'><font color=red>Adminka</font></a><br/></center>" ;}

echo "<br/><TABLE BORDER=0>
<CAPTION ALIGN=bottom>
<TH>
<a href='shop.php'><img src='shop.png'><br/>Magazin</a>
</ TH> <TH>
<a href='storage.php'><img src='sklad.png'><br/>Sklad</a>
</ TH> <TH>
<a href='fermers.php'><img src='sosed.png'><br/>Sosedi</a></ TH></TABLE><font color='#DEB887'><hr></font>";

echo "<TABLE BORDER=0>
<CAPTION ALIGN=bottom>
<TH><a href='news'><img src='020.png'><br/>Novosti</a></ TH> <TH>";
echo "<a href='original_appearance.php'><img src='023.png'><br/>Moy vid</a></ TH> <TH>";

echo "<a href='my.php'><img src='005.png'><br/>Огород</a></ TH></TABLE><font color='#DEB887'><hr></font>";

echo "<TABLE BORDER=0>
<CAPTION ALIGN=bottom>
<TH><a href='bank.php'><img src='bank.png'><br/>Bank</a> 
</ TH> <TH>
<a href='area.php'><img src='profile.png'><br/>Uchastok</a> 
</ TH> <TH>
<a href='medal.php'><img src='rating.png'><br/>Reyting</a> <br/></ TH></TABLE><font color='#DEB887'><hr></font>";


echo "<a href='index3.php'>Forum</a> | <a href='chat'>Chat</a> | <a href='opis.php'>Help</a><br/><br/></center></div>";

}else{
echo '<div class="msg">Dostupna dly aclove.ru!</div>';};
include_once '../sys/inc/tfoot.php';

?>

