<?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']='Рейтинг'; // заголовок страницы
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");
echo "<link rel='stylesheet' href='style.css' type='text/css' /><center>";
echo "<div class='grad32'><img src='fermer.gif'></div><div class='ferm3'><img src='rating.gif'><br/><div class='grad16'>Рейтинг</div></center>";
echo"<div class='ferm3'>";
if (isset($user)){
$action=htmlspecialchars(trim($_GET['action']));

switch ($action){

default:
echo "<div class='post'>";
echo 'Монеты:<font color="green"> '.$user['balls'].'</font><br/>';
echo "Деньги:\n <b><font color='green'>$user[fermer_money]</font></b><br/>";
echo "Опыт:\n <b><font color='green'>$user[fermer_oput]</font></b> | ";

if($user['fermer_oput']>=0 && $user['fermer_oput']<=8000)echo "<img src='/style/img/stars/star1.png'></img><br />"; 

if($user['fermer_oput']>=8001 && $user['fermer_oput']<=16000)echo "<img src='/style/img/stars/star2.png'></img><br />"; 
if($user['fermer_oput']>=16001 && $user['fermer_oput']<=90000)echo "<img src='/style/img/stars/star3.png'></img><br />";
if($user['fermer_oput']>=90001 && $user['fermer_oput']<=270000)echo "<img src='/style/img/stars/star4.png'></img><br />";
if($user['fermer_oput']>=270001 && $user['fermer_oput']<=900000)echo "<img src='/style/img/stars/star5.png'></img><br />";
if($user['fermer_oput']>=900001 && $user['fermer_oput']<=1400000)echo "<img src='/style/img/stars/star6.png'></img><br />";
if($user['fermer_oput']>=1400001 && $user['fermer_oput']<=2400000)echo "<img src='/style/img/stars/sozd/star1.png'></img><br />";
if($user['fermer_oput']>=2400001 && $user['fermer_oput']<=3400000)echo "<img src='/style/img/stars/sozd/star2.png'></img><br />";
if($user['fermer_oput']>=3400001 && $user['fermer_oput']<=4400000)echo "<img src='/style/img/stars/sozd/star3.png'></img><br />";
if($user['fermer_oput']>=4400001 && $user['fermer_oput']<=5400000)echo "<img src='/style/img/stars/sozd/star4.png'></img><br />";
if($user['fermer_oput']>=5400001 && $user['fermer_oput']<=6300000)echo "<img src='/style/img/stars/sozd/star5.png'></img><br />";
if($user['fermer_oput']>6300001) echo "<img src='/style/img/stars/sozd/star6.png'></img><br />";
echo "</div>";


};
echo "<div class='foot'>";
echo "<a href='my.php'><img src='egg.png'> На ферму</a><br/>";
echo "<a href='index.php'><img src='egg.png'> В игру</a><br/>";
echo "</div>";
}else{
echo '<div class="msg">Ферма доступна только для авторизованных пользователей!</div>';};
include_once '../sys/inc/tfoot.php';
?>