<?

if(isset($rm)){
if(($rm==9)||($rm==11)){
if ($ver=="wml"){
echo $xml;
echo $dtd;
echo "<wml>\n";
echo "<card id=\"error\" title=\"Ошибка\" ontimer=\"chat.php?id=$id&amp;ps=$ps&amp;rm=$rm&amp;ref=$ref\"><timer value=\"20\" />\n";
echo "<p align=\"center\">\n";
}else{
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\"/>";
echo "<title>Ошибка</title>";
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"2; URL=chat.php?id=$id&amp;ps=$ps&amp;rm=$rm&amp;ref=$ref\">";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>".$us."</b> вы разве не знаете что пинать и банить в Сортире и Клазнете Знатоков запрешено?\n";
echo $fsize2;
if ($ver=="wml")echo "</p></card></wml>";
else echo "</div></body></html>";
mysql_close ($link);
exit;
}
}   
    
if(isset($nk)){ 
$select = @mysql_query ("Select * from users where id='".$nk."'");
} else { 
if (!ctype_digit($nick)) {
$nick=trim($nick);       
if($nick=="")$nick=0;          
$latuser=strtolower($nick);
$ruser = rus_to_k($nick);
if($ruser==$nick){$select = mysql_query ("Select * from users where latuser = '".$latuser."'");} 
else {$select = mysql_query ("select * from users where ruser = '".$ruser."'");}
} else {
$select = mysql_query ("select * from users where id = '".$nick."'");
}
}
if (mysql_affected_rows() == 0) {
if ($ver=="wml"){
echo $xml;
echo $dtd;
echo "<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>\n";
if(!isset($rm)){
if ($row["level"]>6){
echo "<card id=\"error\" title=\"error\" ontimer=\"apanel.php?id=$id&amp;ps=$ps&amp;ref=$ref\"><timer value=\"10\" />\n";
} else {
echo "<card id=\"error\" title=\"error\" ontimer=\"mpanel.php?id=$id&amp;ps=$ps&amp;ref=$ref\"><timer value=\"10\" />\n";
}
}else{
echo "<card id=\"error\" title=\"error\" ontimer=\"chat.php?id=$id&amp;ps=$ps&amp;rm=$rm&amp;ref=$ref\"><timer value=\"10\" />\n";
}
echo "<p align=\"center\">\n";
}else{
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\"/>";
echo "<title>Ошибка</title>";
if(!isset($rm)){
if ($row["level"]>6){
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"2; URL=apanel.php?id=$id&amp;ps=$ps&amp;ref=$ref\">";
}else{
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"2; URL=mpanel.php?id=$id&amp;ps=$ps&amp;ref=$ref\">";
}
}else{
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"2; URL=chat.php?id=$id&amp;ps=$ps&amp;rm=$rm&amp;ref=$ref\">";
}
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "Нет такого юзера\n";
echo $fsize2;
if ($ver=="wml")echo "</p></card></wml>";
else echo "</div></body></html>";
mysql_close ($link);
exit;
}
$inf = mysql_fetch_array ($select); 
$pid = $inf["id"];
$level = $inf["level"];
$pnik = $inf["user"];
$broom = $inf["room"];
$bnik = $inf["user"];
$ip = $inf["user_ip"];
$soft = $inf["user_soft"];
?>