<?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']= "Ёлка";
include_once '../../sys/inc/thead.php';
title();
aut();
################################################################################
function wwe($timediff){
$oneMinute=60;
$oneHour=60*60;
$oneDay=60*60*24;
$dayfield=floor($timediff/$oneDay);
$hourfield=floor(($timediff-$dayfield*$oneDay)/$oneHour);
$minutefield=floor(($timediff-$dayfield*$oneDay-$hourfield*$oneHour)/$oneMinute);
$secondfield=floor(($timediff-$dayfield*$oneDay-$hourfield*$oneHour-$minutefield*$oneMinute));
$time_1=" $dayfield д. $hourfield ч. $minutefield м. $secondfield c. ";
return $time_1;
}
################################################################################
$id=abs(intval($_GET['id']));
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `game_elka` WHERE `ids`='".$id."'"),0)!='0'){
################################################################################
$id=abs(intval($_GET['id']));
$arr=mysql_fetch_array(mysql_query("SELECT * FROM `game_elka` WHERE `ids`='".$id."'"));
################################################################################
if($arr['game_rost']<='10'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon.jpg);" border="0">';
echo "<td valign='bottom'><img src='images/elka0.png'></a><br/></td></table></center>";
}
if($arr['game_rost']>'10' && $arr['game_rost']<='25'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon2.jpg);" border="0">';
echo "<td valign='bottom'><img src='images/elka1.png'></a><br/></td></table></center>";
}
//
if($arr['game_rost']>'25' && $arr['game_rost']<='40'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon3.jpg);" border="0">';
echo "<td valign='bottom'><img src='images/elka2.png'></a><br/></td></table></center>";
}
//
if($arr['game_rost']>'40' && $arr['game_rost']<='60'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon4.jpg);" border="0">';
echo "<td valign='bottom'><img src='images/elka3.png'></a><br/></td></table></center>";
}
//
if($arr['game_rost']>'60' && $arr['game_rost']<='80'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon4.jpg);" border="0">';
echo "<td valign='bottom'><img src='images/elka3.png'></a><br/></td></table></center>";
}
if($arr['game_rost']>'80' && $arr['game_rost']<='200'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon5.png);" border="0">';
echo "<td valign='bottom'><img src='images/elka3.png'></a><br/></td></table></center>";
}
//
if($arr['game_rost']>'200' && $arr['game_rost']<='300'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon6.png);" border="0">';
echo "<td valign='bottom'><img src='images/elka3.png'></a><br/></td></table></center>";
}
//
if($arr['game_rost']>'300' && $arr['game_rost']<='400000000000'){
echo '<center><table width="327" height="237" style="color: white; background-image: url(images/fon7.png);" border="0">';
echo "<td valign='bottom'><img src='images/elka3.png'></a><br/></td></table></center>";
}
################################################################################
echo "<div class='aut'>Информация</div>";
echo "<div class='f1'>\n";
echo "Хозяин: <a href='/info.php?id=".$arr['ids']."'>".mysql_result(mysql_query("SELECT `nick` FROM `user` WHERE `id`='".$arr['ids']."'"),0)."</a><br />\n";
echo "Высота: $arr[game_rost] см.<br />\n";
echo "Ёлочке уже: ".wwe(time()-$arr['date_r'])."<br />\n";
echo "</div>\n";
}
echo "<div class='aut'><a href='index.php'>Назад</a></div>\n";

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