<?php
#Made By: ENK
#URL: http://wap-mast.su
#ICQ: net
#Mail: dcms7@spaces.ru
#Скрипт запрещено продавать, раздавать, менять, выкладывать, переписывать!
#Все права на скрипт принадлежат мне!
#Приду и снесу сайт
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']='Rastamania';
include_once '../../sys/inc/thead.php';
title();
aut();

if(mysql_result(mysql_query("SELECT COUNT(*) FROM `rastamania` WHERE `ids`='".$user['id']."'"),0)=='0'){
mysql_query("INSERT INTO `rastamania`(`ids`, `time_s`, `date_r`) VALUES('".$user['id']."', '".time()."', '".time()."')");
header("location:index.php?".$passgen."");
exit;
}
//
function sictime($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;
}
//
################################################################################
echo "<div class='aut'>\n";
echo "<a href='top.php'><img src='img/top.png' alt='Топ'/></a>\n";
echo "<a href='us.php'><img src='img/us.png' alt='US'/></a>\n";
echo "</div>\n";
################################################################################
$arr=mysql_fetch_array(mysql_query("SELECT * FROM `rastamania` WHERE `ids`='$user[id]'"));
echo "<table class='post'>\n";
echo "   <tr>\n";
echo "  <td class='icon14' rowspan='2'>\n";
if($arr['time_p']<time()){
echo "<a href='andr.php?id=".$arr['id']."'><img src='img/1.png'></a><hr/>\n";
}
else
{
echo "<a href='andr.php?id=".$arr['id']."'><img src='img/1_1.png'></a><hr/>\n";
}
#######
if($arr['time_q']<time()){
echo "<a href='andr2.php?id=".$arr['id']."'><img src='img/2.png'></a><hr/>\n";
}
else
{
echo "<a href='andr2.php?id=".$arr['id']."'><img src='img/2_2.png'></a><hr/>\n";
}
#######
if($arr['time_w']<time()){
echo "<a href='andr3.php?id=".$arr['id']."'><img src='img/3.png'></a><hr/>\n";
}
else
{
echo "<a href='andr3.php?id=".$arr['id']."'><img src='img/3_3.png'></a><hr/>\n";
}
#######
if($arr['time_e']<time()){
echo "<a href='andr4.php?id=".$arr['id']."'><img src='img/4.png'></a><hr/>\n";
}
else
{
echo "<a href='andr4.php?id=".$arr['id']."'><img src='img/4_4.png'></a><hr/>\n";
}
#######
if($arr['time_r']<time()){
echo "<a href='andr5.php?id=".$arr['id']."'><img src='img/5.png'></a>\n";
}
else
{
echo "<a href='andr5.php?id=".$arr['id']."'><img src='img/5_5.png'></a>\n";
}
#######
echo "  </td>\n";
echo "  <td class='p_t'>\n";
echo "<center>";
echo '<table width="250" height="181" style="color: white; background-image: url(img/bg-night_2.png);" border="0">';
echo "<td valign='bottom'><center><img src='img/hemp.png'></center><br /><br /></td></table>";
echo "</center>";
echo "</table>\n";
################################################################################
echo "<div class='aut'>\n";
echo "Рост травы: $arr[game_rost]<br />\n";
echo "Возраст: ".sictime(time()-$arr['date_r'])."<br />\n";
echo "</div>\n";
################################################################################
include_once '../../sys/inc/tfoot.php';
?>