Файл: KOSMOS/inc/uhead.php
Строк: 97
<?
echo "<div class='block event'>";
echo '<br><div class="block">';
echo "<div class='feedback'>";
if(isset($_SESSION['harvest']))
{
harvest($_SESSION['harvest']);
unset($_SESSION['harvest']);
}
if(isset($_SESSION['rating']))
{
ratingg($_SESSION['rating']);
unset($_SESSION['rating']);
}
if($ku['umoney']!=0)
{
money($ku['umoney']);
}
if(isset($_SESSION['no_rubies']))
{
no_rubies($_SESSION['no_rubies']);
unset($_SESSION['no_rubies']);
}
if(isset($_SESSION['no_money']))
{
no_money($_SESSION['no_money']);
unset($_SESSION['no_money']);
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0)!=0)
{
echo "<div class='feedback'><div>Новая почта <span class='title'>(<span>".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0)."</span>)</span><br><a href='?mail&new'>Читать</a><br></div></div>";
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_gifts` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0)!=0)
{
echo "<div class='feedback'><div>У вас новый подарок<br><a href='?presents=$ku[id]'>Смотреть</a><br></div></div>";
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_invite` WHERE `id_user` = '$ku[id]'"),0)!=0)
{
$invite=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_invite` WHERE `id_user` = '$ku[id]'"));
$cti=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective` WHERE `id` = '$invite[id_collective]'"));
$who=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$invite[id_who]'"));
if(isset($_GET['invite_collective']) && $_GET['invite_collective']=='yes')
{
mysql_query("DELETE FROM `kolhoz_collective_invite` WHERE `id` = '$invite[id]'");
mysql_query("INSERT INTO `kolhoz_collective_user` SET `id_user` = '$ku[id]', `id_collective` = '$cti[id]', `time` = '$time', `status` = '7'");
mysql_query("INSERT INTO `kolhoz_collective_history` SET `id_user` = '$ku[id]', `id_who` = '$who[id]', `id_collective` = '$cti[id]', `time` = '$time', `type` = 'in', `dei` = 'who'");
header("Location:?collective=$cti[id]");
}
elseif(isset($_GET['invite_collective']) && $_GET['invite_collective']=='no')
{
mysql_query("DELETE FROM `kolhoz_collective_invite` WHERE `id` = '$invite[id]'");
}
else
{
echo "<div class='feedback'><div><span>";
echo on_k($who['id']);
echo " <a class='' href='?user=$who[id]'>".nc($who['id'])."</a></span> приглашает Вас в свой колхоз <a href='?collective=$cti[id]'><span>".hsc($cti['name'])."</span></a><br/>";
echo "<img width='16' height='16' src='images/icons/tick.png' alt='o'> <a href='?myfarm&invite_collective=yes'>Принять приглашение</a><br/>";
echo "<img width='16' height='16' src='images/icons/delete.png' alt='o'> <a href='?myfarm&invite_collective=no'>Отказаться</a>";
echo "</div>n
</div>";
}
}
if(isset($_SESSION['msg']))
{
msg_game($_SESSION['msg']);
unset($_SESSION['msg']);
}
if($ku['arena2']<$ku['arena2max'] && $ku['arena2time']<=$time)
{
mysql_query("UPDATE kolhoz_user SET arena2time = '".($time+300)."' WHERE id = '$ku[id]'");
mysql_query("UPDATE kolhoz_user SET arena2 = '".($ku['arena2']+10)."' WHERE id = '$ku[id]'");
}
$chas=date("H",time()); if($chas>24){$chas=round($chas-24);} if($chas<0){$chas=round($chas+24);} if($chas<=4 || $chas>=23){echo 'Доброй ночи <b><span>'.nc($ku['id']).'</span></b></span> ';} if($chas>=5 && $chas<=10){echo 'Доброе утро <b><span>'.nc($ku['id']).'</span></b></span> ';} if($chas>=11 && $chas<=17){echo 'Удачного дня <b><span>'.nc($ku['id']).'</span></b></span> ';} if($chas>=18 && $chas<=22){echo 'Приятного вечера <b><span>'.nc($ku['id']).'</span></b></span> ';}
if ($ku['level']>=10 && $ku['level']<=15){echo " <img src='/images/medal/1.gif' alt='!'/> ";}
if ($ku['level']>=16 && $ku['level']<=20){echo " <img src='/images/medal/2.gif' alt='!'/> ";}
if ($ku['level']>=21 && $ku['level']<=26){echo " <img src='/images/medal/3.gif' alt='!'/> ";}
if ($ku['level']>=27 && $ku['level']<=30){echo " <img src='/images/medal/4.png' alt='!'/> ";}
if ($ku['level']>=31 && $ku['level']<=35){echo " <img src='/images/medal/5.png' alt='!'/> ";}
if ($ku['level']>=36 && $ku['level']<=40){echo " <img src='/images/medal/6.png' alt='!'/> ";}
if ($ku['level']>=41 && $ku['level']<=45){echo " <img src='/images/medal/7.png' alt='!'/> ";}
if ($ku['level']>=46 && $ku['level']<=50){echo " <img src='/images/medal/8.png' alt='!'/> ";}
if ($ku['level']>=51 && $ku['level']<=75){echo " <img src='/images/medal/9.png' alt='!'/> ";}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '$ku[id]' AND `date_last` > '".(time()-700)."' LIMIT 1"),0)==1)
echo "<img src='/images/onlines.gif' alt='' class='*'/> ";
//echo "<center><marquee>С 9 Мая наших защитников отечества!!!</marquee></center>";
?>