Файл: inc/system/uhead.php
Строк: 132
<?
include_once $_SERVER['DOCUMENT_ROOT'].'/inc/system/functions.php';
echo'<div class="sv"></div>';
echo'<div class="top">';
echo "<img width='18' height='18' src='/img/icons/money.png' alt='o'> <span> ".strkol($ku['money'])."</span> <img src='/img/icons/ruby.png' alt='o'> <span>".strkol($ku['rubies'])."</span> ";
echo "".on_k($ku['id'])."";
echo " <span>$ku[level]</span> уровень</div></div></div>";
echo'</div>';
echo'<div class="level-foot">';
$max = $level['rating'];
$tek = $kr;
$forl = ($tek/$max)*100;
$lol=$level['rating']-$kr;
$x = $kr / $level['rating'] * 100;
$xs = ceil(100-$x);
if($ku['level']<150)echo'<div class="rate-back"><div class="rate-line" style="width:'.$forl.'%;"><center>'.$xs.'% </center>
</div>';
if($ku['level']==150)echo'<div class="rate-back"><div class="rate-line" style="width:100%"><center>100% </center>
</div>';
echo '</div>';
echo'<a class="nick-to-profile" href="/user/'.$ku['id'].'">
<span class="nickname">
<span><center>'.$ku['nick'].'</span> <img src="/img/profile-arrow.png"/>
</span></center></a>';
echo '</div></div>';
?>
<?
if(isset($_SESSION['harvest']))
{
harvest($_SESSION['harvest']);
unset($_SESSION['harvest']);
}
if(isset($_SESSION['rating']))
{
ratingg($_SESSION['rating']);
unset($_SESSION['rating']);
}
if(isset($_SESSION['mon']))
{
mon($_SESSION['mon']);
unset($_SESSION['mon']);
}
if(isset($_SESSION['km']))
{
km($_SESSION['km']);
unset($_SESSION['km']);
}
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=''>(<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'>У вас новый подарок<br><a href='/presents/$ku[id]'>Смотреть</a><br></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:/kolhoz/$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 src='/img/icons/tick.png' alt='o'> <a href='/inviteKolhoz/yes'>Принять приглашение</a><br/>";
echo "<img src='/img/icons/delete.png' alt='o'> <a href='/inviteKolhoz/no'>Отказаться</a>";
echo "</div>n
</div>";
}
}
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_zags` WHERE `she` = '$ku[id]' and `she_yes` = '0'"),0)!=0)
{
$c=mysql_fetch_assoc(mysql_query("SELECT * FROM `kolhoz_zags` WHERE `she`='".$ku['id']."'"));
$who=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$c[he]'"));
if(isset($_GET['brak']) && $_GET['brak']=='yes')
{
mysql_query("UPDATE `kolhoz_user` SET `brak`='$c[she]' WHERE `id`='".$c['he']."'");
mysql_query("UPDATE `kolhoz_user` SET `brak`='$c[he]' WHERE `id`='".$c['she']."'");
mysql_query("INSERT INTO `kolhoz_mail` SET `id_user` = '$who[id]', `id_kont` = '0', `msg` = 'Поздравляем! Вы связали себя брачными узами.', `time` = '$time', `type` = 'to'");
mysql_query("UPDATE `kolhoz_zags` SET `she_yes`='1', `who`='1' WHERE `she`='".$ku['id']."'");
echo "<div class='feedback'><ul class='feedbackPanel'><li class='feedbackPanelINFO'><span class='feedbackPanelINFO'>Поздравляем! Вы связали себя брачными узами с ".nc($who['id']).".</span></li></ul></div>";
}
elseif(isset($_GET['brak']) && $_GET['brak']=='no')
{
mysql_query("DELETE FROM `kolhoz_zags` WHERE `she` = '$ku[id]' AND `she_yes` = '0'");
mysql_query("UPDATE `kolhoz_user` SET `rubies` = `rubies` + '80' WHERE `id`='".$c['he']."'");
}
else
{
echo "<div class='feedback'><div><span>";
echo on_k($who['id']);
echo " <a class='' href='/user/$who[id]'>".nc($who['id'])."</a></span> предлагает вам заключить брак.<br>
<img src='/img/icons/tick.png' alt='o'> <a href='/garden/inviteZags/yes'>Согласиться</a><br>
<img src='/img/icons/delete.png' alt='o'> <a href='/garden/inviteZags/no'>Отказаться</a>
</div>
</div>";
}
}
if(isset($_SESSION['msg']))
{
msg_game($_SESSION['msg']);
unset($_SESSION['msg']);
}
if($ku['day']!=1){
echo'<div class="block">Спасибо, что вы с нами! Заходите каждый день и получайте подарки!<br> Награда: <img src="/img/icons/ruby.png" alt=""/> 20<br></div>';
mysql_query("INSERT INTO `info_user` SET `id_user` = '$ku[id]', `status` = '+', `many` = '20', `kuda` = 'ежедневный подарок', `time` = '$time'");
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']+20)."' WHERE `id` = '".$ku['id']."'");
mysql_query("UPDATE `kolhoz_user` SET `day` = '1' WHERE `id` = '".$ku['id']."'");
}
?>