<?
if($query3[EXPnow]>=$LVL_UP){
                $db->openDB();
               if($query3[EXPnow]>=$LVL_UP AND $pers2[LVL_USERS]!=105){echo"<font color=\"lime\">
			   <div class=\"success\" style=\"padding-bottom:4px;padding-top:3px;margin-bottom:3px;margin-top:3px\"><img class='sub' alt=''/><img src=\"img/lvlup.png\" width=\"24\" height=\"24\">scscsc Вы получили новый уровень!
			   <img src=\"img/gold.png\" width=\"16\" height=\"16\" title=\"золото\"> +".($pers2[LVL_USERS]*50)."
			   </font></div></font>";
			   $moneyPLUS=$pers2[money]+$pers2[LVL_USERS]*50;
			   $mon=mysql_query("UPDATE users SET money=\"$moneyPLUS\" WHERE NICK=\"$_SESSION[s]\"");
			   }
                $exp=$pers2[EXPnow]-$LVL_UP;
                $LVL_a=$pers2[LVL_USERS]+1;
                $SKILL_POINTS=$pers2[SKILL_POINTS]+4;
                if($pers2[LVL_USERS]<105){
				$LVL_UP_query=mysql_query("UPDATE users SET EXPnow=\"$exp\",LVL_USERS=\"$LVL_a\",SKILL_POINTS=\"$SKILL_POINTS\" WHERE NICK=\"$_SESSION[s]\"");
             }
             }
			 
			 
$msg = mysql_query("SET NAMES cp1251");
$msg=mysql_query("SELECT * FROM msg WHERE MS_KOMU=\"$_SESSION[s]\"");
$msgC=mysql_num_rows($msg);
$prCL = mysql_query("SET NAMES cp1251");
$prCL=mysql_query("SELECT * FROM PRIGL_clans WHERE PR_KOMU=\"$_SESSION[s]\"");
$prCLC=mysql_num_rows($prCL);
$prcC=mysql_num_rows($msg);
while($msgQ=mysql_fetch_assoc($msg)){
$rr=$msgQ[MS_OT];

}
if($msgC>0){echo" 
			   <div class=\"success\" style=\"padding-bottom:4px;padding-top:3px;margin-bottom:3px;margin-top:3px\"><img class='sub' alt=''/> <a href=\"msg.php?read=$rr\"><img src=\"img/msg.png\" alt=\"!\" height=\"12\" width=\"16\"> <font color=\"lime\">сообщение</font></a> ($msgC)</div>";}
if($prCLC>0){echo"
			   <div class=\"success\" style=\"padding-bottom:4px;padding-top:3px;margin-bottom:3px;margin-top:3px\"><img class='sub' alt=''/> <a href=\"game.php?prigl=1\"><img src=\"img/msg.png\" alt=\"!\" height=\"12\" width=\"16\"> <font color=\"lime\">приглашение</font></a> ($prcC)</div>";}
if($loc=='' AND isset($loc)){echo "<div class=\"success\" style=\"padding-bottom:4px;padding-top:3px;margin-bottom:3px;margin-top:3px\"><img src=\"img/bad.png\" class='sub' alt='' width='16' height='16'/> Ошибка, такая локация не существует</div>";}
?>		