<?php
//////////////////////////////////////////
// CHAT POWERED : http://sim-sim.h2m.ru//
// ICQ : 378036650                     //
// Email : olegarhi75@mail.ru          //
// WEB SITE Version 1.0 www.waufon.ru  //
$text = filtr($text);
function filtr($msg) 
{ 
$msg = trim($msg); 
$msg = str_replace("'", "", $msg); 
$msg = htmlspecialchars($msg); 
$msg = addslashes($msg); 
$msg = strip_tags($msg); 
$msg = mysql_escape_string($msg); 
return $msg; 
}



////////////////////////////////////////
if ( $msg )
{
$msg = check( $msg );
if ( $translit == 1 )
{
$msg = trun_to_rus( $msg );
}
if ( isset( $usn ) )
{
$emotions = check($emotions);
$msg = "<b>".check($usn)."</b>, {$msg}";
}
if ( 3 < $row['level'] )
{
$msg = eregi_replace( "[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $msg );
}
else
{
$msg = eregi_replace( "[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "[<b>Хачу штоб Админы меня оттрахали я ебатсо хачу.</b>]", $msg );
}

require( "smiles/convert_to_smiles.php" );
$mysm = "s".$id.".gif";
require( "smi/convert_to_smiles.php" );
$mysm = "s".$id.".gif";
if ( file_exists( "prsm/{$mysm}" ) )
{
$msg = str_replace( ".my.", "<img src=\"prsm/{$mysm}\" alt=\".my.\"/>", $msg );
}
if ( $rm == 10 )
{
$r = mysql_query( "SELECT msg FROM intim WHERE id_from = '".$id."' order by id desc LIMIT 1" );
}
else
{
$r = mysql_query( "SELECT msg FROM mess WHERE id_from = '".$id."' order by id desc LIMIT 1" );
}
$a = mysql_fetch_array( $r );
if ( $emotions =="1" )
{
}
if($login && $emotions) $msg = "$emotions &nbsp;".$msg."";
if($login && $bold) $msg = "<b>".$msg."</b>";
if($login && $underline) $msg = "<u>".$msg."</u>";
if($login && $blink) $msg = "<blink>".$msg."</blink>";
if($login && $italic) $msg = "<i>".$msg."</i>";
if($login && $big) $msg = "<big>".$msg."</big>";
if($login && $small) $msg = "<small>".$msg."</small>";
if ( $col == "1" )
{
$msg = "<span style=\"color:#13007D;\">".$msg."</span>";
}
else if ( $col == "2" )
{
$msg = "<span style=\"color:#00FF00;\">".$msg."</span>";
}
else if ( $col == "3" )
{
$msg = "<span style=\"color:#00FFFF;\">".$msg."</span>";
}
else if ( $col == "4" )
{
$msg = "<span style=\"color:#800000;\">".$msg."</span>";
}
else if ( $col == "5" )
{
$msg = "<span style=\"color:#FFFF00;\">".$msg."</span>";
}
else if ( $col == "6" )
{
$msg = "<span style=\"color:#000000;\">".$msg."</span>";
}
else if ( $col == "7" )
{
$msg = "<span style=\"color:#FF0000;\">".$msg."</span>";
}
if ( $prizrak == "1" ){ $login = ""; }
////////avator/////
if ( $avator == "100" ){ $login = "".$row['login'].""; }
if ( $avator == "1" ){ $login = "<img src=\"http://waufon.ru/chats/avator/1.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "2" ){ $login = "<img src=\"http://waufon.ru/chats/avator/2.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "3" ){ $login = "<img src=\"http://waufon.ru/chats/avator/3.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "4" ){ $login = "<img src=\"http://waufon.ru/chats/avator/4.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "5" ){ $login = "<img src=\"http://waufon.ru/chats/avator/5.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "6" ){ $login = "<img src=\"http://waufon.ru/chats/avator/6.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "7" ){ $login = "<img src=\"http://waufon.ru/chats/avator/7.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "8" ){ $login = "<img src=\"http://waufon.ru/chats/avator/8.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "9" ){ $login = "<img src=\"http://waufon.ru/chats/avator/9.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "10" ){ $login = "<img src=\"http://waufon.ru/chats/avator/10.gif\" alt=\"\"/>".$row['login']."</a>"; }
//////////////////////////
if ( $avator == "11" ){ $login = "<img src=\"http://waufon.ru/chats/avator/11.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "12" ){ $login = "<img src=\"http://waufon.ru/chats/avator/12.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "13" ){ $login = "<img src=\"../chats/avator/13.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "14" ){ $login = "<img src=\"http://waufon.ru/chats/avator/14.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "15" ){ $login = "<img src=\"http://waufon.ru/chats/avator/15.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "16" ){ $login = "<img src=\"http://waufon.ru/chats/avator/16.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "17" ){ $login = "<img src=\"http://waufon.ru/chats/avator/17.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "18" ){ $login = "<img src=\"http://waufon.ru/chats/avator/18.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "19" ){ $login = "<img src=\"http://waufon.ru/chats/avator/19.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "20" ){ $login = "<img src=\"http://waufon.ru/chats/avator/20.gif\" alt=\"\"/>".$row['login']."</a>"; }
///////////////////////
if ( $avator == "21" ){ $login = "<img src=\"http://waufon.ru/chats/avator/21.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "22" ){ $login = "<img src=\"http://waufon.ru/chats/avator/22.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "23" ){ $login = "<img src=\"http://waufon.ru/chats/avator/23.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "24" ){ $login = "<img src=\"http://waufon.ru/chats/avator/24.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "25" ){ $login = "<img src=\"http://waufon.ru/chats/avator/25.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "26" ){ $login = "<img src=\"http://waufon.ru/chats/avator/26.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "27" ){ $login = "<img src=\"http://waufon.ru/chats/avator/27.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "28" ){ $login = "<img src=\"http://waufon.ru/chats/avator/28.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "29" ){ $login = "<img src=\"http://waufon.ru/chats/avator/29.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "30" ){ $login = "<img src=\"http://waufon.ru/chats/avator/30.gif\" alt=\"\"/>".$row['login']."</a>"; }
//////////////////////////
if ( $avator == "31" ){ $login = "<img src=\"http://waufon.ru/chats/avator/31.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "32" ){ $login = "<img src=\"http://waufon.ru/chats/avator/32.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "33" ){ $login = "<img src=\"http://waufon.ru/chats/avator/33.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "34" ){ $login = "<img src=\"http://waufon.ru/chats/avator/34.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "35" ){ $login = "<img src=\"http://waufon.ru/chats/avator/35.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "36" ){ $login = "<img src=\"http://waufon.ru/chats/avator/36.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "37" ){ $login = "<img src=\"http://waufon.ru/chats/avator/37.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "38" ){ $login = "<img src=\"http://waufon.ru/chats/avator/38.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "39" ){ $login = "<img src=\"http://waufon.ru/chats/avator/39.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "40" ){ $login = "<img src=\"http://waufon.ru/chats/avator/40.gif\" alt=\"\"/>".$row['login']."</a>"; }
///////////////////
if ( $avator == "41" ){ $login = "<img src=\"http://waufon.ru/chats/avator/41.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "42" ){ $login = "<img src=\"http://waufon.ru/chats/avator/42.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "43" ){ $login = "<img src=\"http://waufon.ru/chats/avator/43.gif\" alt=\"\"/>".$row['login']."</a>"; }else if ( $avator == "44" ){ $login = "<img src=\"http://waufon.ru/chats/avator/44.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "45" ){ $login = "<img src=\"http://waufon.ru/chats/avator/45.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "46" ){ $login = "<img src=\"http://waufon.ru/chats/avator/46.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "47" ){ $login = "<img src=\"http://waufon.ru/chats/avator/47.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "48" ){ $login = "<img src=\"http://waufon.ru/chats/avator/48.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "49" ){ $login = "<img src=\"http://waufon.ru/chats/avator/49.gif\" alt=\"\"/>".$row['login']."</a>"; }if ( $avator == "50" ){ $login = "<img src=\"http://waufon.ru/chats/avator/50.gif\" alt=\"\"/>".$row['login']."</a>"; }
##############--Цвет ника--#########
if ( $login == "Кот" ) { $login = "</form><span style=\"background-color:blue; color:yellow\">К</span><span style=\"background-color:blue;color:red\">о</span><span style=\"background-color:blue;color:#00FF00\">т</span>"; }if ( $ncol == "1" ){ $login = "<span style=\"color:#0000FF;\">".$login."</span>";}else if ( $ncol == "2" ){ $login = "<span style=\"color:#00FF00;\">".$login."</span>";}else if ( $ncol == "3" ){$login = "<span style=\"color:#00FFFF;\">".$login."</span>";}else if ( $ncol == "4" ){$login = "<span style=\"color:#800000;\">".$login."</span>";}else if ( $ncol == "5" ){ $login = "<span style=\"color:#FFFF00;\">".$login."</span>";}else if ( $ncol == "6" ){ $login = "<span style=\"color:#000000;\">".$login."</span>"; } else if ( $ncol == "7" ) { $login = "<span style=\"color:#FF0000;\">".$login."</span>";}else if ( $ncol == "8" ){$login = "<span style=\"color:#FF00FF;\">".$login."</span>";}	 if ( $ncol == "9" ){$login = "<span style=\"color:#FF6600;\">".$login."</span>";}if ( $ncol == "10" ){$login = "<span style=\"color:#800080;\">".$login."</span>";} if ( $ncol == "11" ){$login = "<span style=\"color:#FFFFFF;\">".$login."</span>";}else if ( $ncol == "12" ){ $login = "<span style=\"color:#8a2be2;\">".$login."</span>";}else if ( $ncol == "13" ){ $login = "<span style=\"color:#006400;\">".$login."</span>";}else if ( $ncol == "14" ){ $login = "<span style=\"color:#006666;\">".$login."</span>";}else if ( $ncol == "15" ){ $login = "<span style=\"color:olive;\">".$login."</span>";}else if ( $ncol == "16" ){ $login = "<span style=\"color:#FF9900;\">".$login."</span>";}else if ( $ncol == "17" ){ $login = "<span style=\"color:#666666;\">".$login."</span>";}else if ( $ncol == "18" ){ $login = "<span style=\"color:Bisque;\">".$login."</span>";}else if ( $ncol == "19" ){ $login = "<span style=\"color:#ff1493;\">".$login."</span>";}else if ( $ncol == "20" ){ $login = "<span style=\"color:gold;\">".$login."</span>";}
##############--ШРИФТ ника--#########
if ( $shrift == "1" ){ $login = "<font face=agency fb><b>".$login."</b></font>";}else if ( $shrift == "2" ){ $login = "<font face=algerian>".$login."</font>";}else if ( $shrift == "3" ){$login = "<font face=arial>".$login."</font>";}else if ( $shrift == "4" ){$login = "<font face =baskerville>".$login."</font>";}else if ( $shrift == "5" ){ $login = "<font face=broadway>".$login."</font>";}else if ( $shrift == "6" ){ $login = "<font face=calibri>".$login."</font>"; } else if ( $shrift == "7" ) { $login = "<font face=candara>".$login."</font>";}else if ( $shrift == "8" ){$login = "<font face=castellar>".$login."</font>";}	 else if ( $shrift == "9" ){$login = "<font face=centaur>".$login."</font>";}else if ( $shrift == "10" ){$login = "<font face=century>".$login."</font>";} else if ( $shrift == "11" ){$login = "<font face=chiller>".$login."</font>";}else if ( $shrift == "12" ){$login = "<font face=consolas>".$login."</font>";}else if ( $shrift == "13" ){$login = "<font face=constantia>".$login."</font>";}else if ( $shrift == "14" ){$login = "<font face=corbel>".$login."</font>";}else if ( $shrift == "15" ){$login = "<font face=corbel>".$login."</font>";}else if ( $shrift == "16" ){$login = "<font face=elephant>".$login."</font>";}else if ( $shrift == "17" ){$login = "<font face=forte>".$login."</font>";}else if ( $shrift == "18" ){$login = "<font face=garamond>".$login."</font>";}else if ( $shrift == "19" ){$login = "<font face=georgia>".$login."</font>";}else if ( $shrift == "20" ){$login = "<font face=gigi>".$login."</font>";}else if ( $shrift == "21" ){$login = "<font face=harrington>".$login."</font>";}else if ( $shrift == "22" ){$login = "<font face=impact>".$login."</font>";}else if ( $shrift == "23" ){$login = "<font face=jokerman>".$login."</font>";}else if ( $shrift == "24" ){$login = "<font face=mistral>".$login."</font>";}else if ( $shrift == "25" ){$login = "<font face=modern>".$login."</font>";}else if ( $shrift == "26" ){$login = "<font face=onyx>".$login."</font>";}else if ( $shrift == "27" ){$login = "<font face=papyrus>".$login."</font>";}else if ( $shrift == "28" ){$login = "<font face=perpetua>".$login."</font>";}else if ( $shrift == "29" ){$login = "<font face=playbill>".$login."</font>";}else if ( $shrift == "30" ){$login = "<font face=pristina>".$login."</font>";}else if ( $shrift == "31" ){$login = "<font face=promtimperial>".$login."</font>";}else if ( $shrift == "32" ){$login = "<font face=raavi>".$login."</font>";}else if ( $shrift == "33" ){$login = "<font face=ravie>".$login."</font>";}else if ( $shrift == "34" ){$login = "<font face=rockwell>".$login."</font>";}else if ( $shrift == "35" ){$login = "<font face=roman>".$login."</font>";}else if ( $shrift == "36" ){$login = "<font face=script>".$login."</font>";}else if ( $shrift == "37" ){$login = "<font face=shruti>".$login."</font>";}else if ( $shrift == "38" ){$login = "<font face=stencil>".$login."</font>";}else if ( $shrift == "39" ){$login = "<font face=symbol>".$login."</font>";}else if ( $shrift == "40" ){$login = "<font face=tahoma>".$login."</font>";}
###################################################
if ( $a['msg'] !== $msg )
{
$time = time( );
$posts = $row['posts'];
++$posts;
$prt = intval( $prt );
if ( $rm == 10 )
{
mysql_query( "Insert into intim set id=0, login='".$login."', msg='".$msg."', id_from='".$id."', id_to='{$prt}', wtime='".time( )."', pwd='".$pwd."'" );
}
else
{
mysql_query( "Insert into mess set id=0, login='".$login."', msg='".$msg."', id_from='".$id."', id_to='{$prt}', wtime='".time( )."', room='".$room."'" );
}
mysql_query( "Update users set posts='".$posts."' where id ='".$id."'" );
}
}
?>