<?php
if(!$user)
{
	mysql_query("UPDATE `online` SET `where` = '".$str['mesto']."' WHERE `ip` = '$ip' AND `ua` = '$ua' LIMIT 1");
}
else
{
  	mysql_query("UPDATE `users` SET `where` = '".$str['mesto']."'  where `id` = '".$user['id']."'");
}
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" href="/style/default/favicon.ico"/>
<title><?php echo $str['mesto']; ?></title>
<link rel="stylesheet" href="/style/default/style.css" type="text/css"/>
<?php
if($str['mesto'] == 'Чат' && isset($_GET['id']))
{
	echo '<meta http-equiv="Refresh" content="30;URL=room.php?id='.int($_GET['id']).'&amp;rand='.rand(1,99).'"/>';
}
?>
<meta name="keywords" content="<?php echo $set['keywords'] ?>"/>
<meta name="description" content="<?php echo $set['description'] ?>"/>
</head>
<body class="noscroll">
<div id="wrapper"><div id="head"><a id="lgo" href="<?php echo '/p/'.$user['login'].''; ?>"><span>TEGOZ.16MB.COM</span></a></div>
<?
if(isset($user))
{
	$result_msg = mysql_result(mysql_query("select count(*) from `mail` where `id_getter` = ".$user['id']." and `status` = 0"),0);
	if($result_msg != 0)
	{
		echo '<div class="block1"> <a href="../pages/mail.php?act=inbox"><img class="ico" src="/style/'.$style.'/ico/privat.gif" alt="" /><span style="color:#ff0000">У вас <b>'.$result_msg.'</b> новых сообщений!</span></a></div>';
	}
}
?>