Файл: chats/fun.php
Строк: 190
<?php
Error_Reporting(E_ALL & ~E_NOTICE);
$HTTP_USER_AGENT = htmlentities(addslashes($_SERVER["HTTP_USER_AGENT"]));
$REMOTE_ADDR = htmlentities(addslashes($_SERVER["REMOTE_ADDR"]));
if ($ver=="wml") $divide = "---<br/>";
else $divide = "<hr/>";
$adm_email = "olegarhi75@mail.ru"; //E-Mail админа
$chataddr = "http://localhost/4at"; //адрес чата
$chatname = "Чат"; //имя чата
$title="KOTig www.waufon.ru";
$anti = "[Реклама]";
$SQLlink = "";
$ver = trim(addslashes(htmlspecialchars($ver)));
$dtd = '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">';
$xml = '<?xml version="1.0" encoding="UTF-8"?>';
function show_error($err) {
global $dtd, $xml;
if ($ver=="wml"){
echo $xml;
echo $dtd;
echo '<wml><card id="error" title="Ошибка">';
echo '<do type="prev" label="Back"><prev/></do>';
echo '<p align="center">';
echo ''.$err.'<br/>';
echo '---<br/>';
echo 'Попробуйте зайти позже.';
echo '</p></card></wml>';
}else{
echo "<title>Галерея</title>";
echo "<style type="text/css">";
echo "body { font-size: {$fs}; color: {$tcol}; background-color: {$bcol} }";
echo "a:link,a:visited { text-decoration: underline; color: {$lcol} }";
echo "div { border-style:solid; border-width: 1px; background-color: {$rcol} }";
echo "<div align="center">";
echo "".$err."<br/>";
echo "---<br/>";
echo "Попробуйте зайти позже.";
echo "</div></body></html>";
}
}
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
function filtr($a){
$text1=array("rn", "n");
$text2=array(" ", " ");
$a=trim(htmlspecialchars(stripslashes(str_replace($text1, $text2, $a))));
return $a;
}
function rus_to_k($str){
$str = str_replace("Р°","a",$str);
$str = str_replace("Р±","b",$str);
$str = str_replace("РІ","v",$str);
$str = str_replace("Рі","g",$str);
$str = str_replace("Рґ","d",$str);
$str = str_replace("Рµ","e",$str);
$str = str_replace("С‘","e",$str);
$str = str_replace("Р¶","j",$str);
$str = str_replace("Р·","z",$str);
$str = str_replace("Рё","i",$str);
$str = str_replace("Р№","y",$str);
$str = str_replace("Рє","k",$str);
$str = str_replace("Р»","l",$str);
$str = str_replace("Рј","m",$str);
$str = str_replace("РЅ","n",$str);
$str = str_replace("Рѕ","o",$str);
$str = str_replace("Рї","p",$str);
$str = str_replace("СЂ","r",$str);
$str = str_replace("СЃ","s",$str);
$str = str_replace("С‚","t",$str);
$str = str_replace("Сѓ","u",$str);
$str = str_replace("С„","f",$str);
$str = str_replace("С…","h",$str);
$str = str_replace("С‡","c",$str);
$str = str_replace("С†","q",$str);
$str = str_replace("С€","w",$str);
$str = str_replace("С‰",">",$str);
$str = str_replace("СЊ","<",$str);
$str = str_replace("С‹","x",$str);
$str = str_replace("СЉ",".",$str);
$str = str_replace("СЌ",":",$str);
$str = str_replace("СЋ",";",$str);
$str = str_replace("СЏ","}",$str);
$str = str_replace("Рђ","a",$str);
$str = str_replace("Р‘","b",$str);
$str = str_replace("Р’","v",$str);
$str = str_replace("Р“","g",$str);
$str = str_replace("Р”","d",$str);
$str = str_replace("Р•","e",$str);
$str = str_replace("РЃ","e",$str);
$str = str_replace("Р–","j",$str);
$str = str_replace("Р—","z",$str);
$str = str_replace("Р�","i",$str);
$str = str_replace("Р™","y",$str);
$str = str_replace("Рљ","k",$str);
$str = str_replace("Р›","l",$str);
$str = str_replace("Рњ","m",$str);
$str = str_replace("Рќ","n",$str);
$str = str_replace("Рћ","o",$str);
$str = str_replace("Рџ","p",$str);
$str = str_replace("Р ","r",$str);
$str = str_replace("РЎ","s",$str);
$str = str_replace("Рў","t",$str);
$str = str_replace("РЈ","u",$str);
$str = str_replace("Р¤","f",$str);
$str = str_replace("РҐ","h",$str);
$str = str_replace("Р§","c",$str);
$str = str_replace("Р¦","q",$str);
$str = str_replace("РЁ","w",$str);
$str = str_replace("Р©",">",$str);
$str = str_replace("Р¬","<",$str);
$str = str_replace("Р«","x",$str);
$str = str_replace("РЄ",".",$str);
$str = str_replace("Р",":",$str);
$str = str_replace("Р®",";",$str);
$str = str_replace("РЇ","}",$str);
return $str;
}
function win_to_utf($str){
$str=strtr($str,array("а"=>"Р°","б"=>"Р±","в"=>"РІ","г"=>"Рі","д"=>"Рґ","е"=>"Рµ","ё"=>"С‘","ж"=>"Р¶","з"=>"Р·","и"=>"Рё","й"=>"Р№","к"=>"Рє","л"=>"Р»","м"=>"Рј","н"=>"РЅ","о"=>"Рѕ","п"=>"Рї","р"=>"СЂ","с"=>"СЃ","т"=>"С‚","у"=>"Сѓ","ф"=>"С„","х"=>"С…","ц"=>"С†","ч"=>"С‡","ш"=>"С€","щ"=>"С‰","ъ"=>"СЉ","ы"=>"С‹","ь"=>"СЊ","э"=>"СЌ","ю"=>"СЋ","я"=>"СЏ",
"А"=>"Рђ","Б"=>"Р‘","В"=>"Р’","Г"=>"Р“","Д"=>"Р”","Е"=>"Р•","Ё"=>"РЃ","Ж"=>"Р–","З"=>"Р—","И"=>"Р?","Й"=>"Р™","К"=>"Рљ","Л"=>"Р›","М"=>"Рњ","Н"=>"Рќ","О"=>"Рћ","П"=>"Рџ","Р"=>"Р ","С"=>"РЎ","Т"=>"Рў","У"=>"РЈ","Ф"=>"Р¤","Х"=>"РҐ","Ц"=>"Р¦","Ч"=>"Р§","Ш"=>"РЁ","Щ"=>"Р©","Ъ"=>"РЄ","Ы"=>"Р«","Ь"=>"Р¬","Э"=>"Р","Ю"=>"Р®","Я"=>"РЇ"));
return $str;
}
function utf_to_win($str){
$str=strtr($str,array("Р°"=>"а","Р±"=>"б","РІ"=>"в","Рі"=>"г","Рґ"=>"д","Рµ"=>"е","С‘"=>"ё","Р¶"=>"ж","Р·"=>"з","Рё"=>"и","Р№"=>"й","Рє"=>"к","Р»"=>"л","Рј"=>"м","РЅ"=>"н","Рѕ"=>"о","Рї"=>"п","СЂ"=>"р","СЃ"=>"с","С‚"=>"т","Сѓ"=>"у","С„"=>"ф","С…"=>"х","С†"=>"ц","С‡"=>"ч","С€"=>"ш","С‰"=>"щ","СЉ"=>"ъ","С‹"=>"ы","СЊ"=>"ь","СЌ"=>"э","СЋ"=>"ю","СЏ"=>"я",
"Рђ"=>"А","Р‘"=>"Б","Р’"=>"В","Р“"=>"Г","Р”"=>"Д","Р•"=>"Е","РЃ"=>"Ё","Р–"=>"Ж","Р—"=>"З","Р�"=>"И","Р™"=>"Й","Рљ"=>"К","Р›"=>"Л","Рњ"=>"М","Рќ"=>"Н","Рћ"=>"О","Рџ"=>"П","Р "=>"Р","РЎ"=>"С","Рў"=>"Т","РЈ"=>"У","Р¤"=>"Ф","РҐ"=>"Х","Р¦"=>"Ц","Р§"=>"Ч","РЁ"=>"Ш","Р©"=>"Щ","РЄ"=>"Ъ","Р«"=>"Ы","Р¬"=>"Ь","Р"=>"Э","Р®"=>"Ю","РЇ"=>"Я"));
return $str;
}
function trun_to_rus($str){
$str=str_replace("ch","С‡",$str);
$str=str_replace("sc","С‰",$str);
$str=str_replace("sh","С€",$str);
$str=str_replace("ye","СЌ",$str);
$str=str_replace("yu","СЋ",$str);
$str=str_replace("ya","СЏ",$str);
$str=str_replace("CH","Р§",$str);
$str=str_replace("Ch","Р§",$str);
$str=str_replace("SC","Р©",$str);
$str=str_replace("Sc","Р©",$str);
$str=str_replace("SH","РЁ",$str);
$str=str_replace("Sh","РЁ",$str);
$str=str_replace("""","РЄ",$str);
$str=str_replace(""","СЉ",$str);
$str=str_replace("‘‘","Р¬",$str);
$str=str_replace("‘","СЊ",$str);
$str=str_replace("YE","Р",$str);
$str=str_replace("Ye","Р",$str);
$str=str_replace("YU","Р®",$str);
$str=str_replace("Yu","Р®",$str);
$str=str_replace("YA","РЇ",$str);
$str=str_replace("Ya","РЇ",$str);
$str=strtr($str,array("""=>"","a"=>"Р°","b"=>"Р±","v"=>"РІ","g"=>"Рі","d"=>"Рґ","e"=>"Рµ","j"=>"Р¶","z"=>"Р·","i"=>"Рё","y"=>"Р№","k"=>"Рє","l"=>"Р»","m"=>"Рј","n"=>"РЅ","o"=>"Рѕ","p"=>"Рї","r"=>"СЂ","s"=>"СЃ","t"=>"С‚","u"=>"Сѓ","f"=>"С„","h"=>"С…","c"=>"С†","w"=>"С€","x"=>"С‹","A"=>"Рђ","B"=>"Р‘","V"=>"Р’","G"=>"Р“","D"=>"Р”","E"=>"Р•","J"=>"Р–","Z"=>"Р—","I"=>"Р�","Y"=>"Р™","K"=>"Рљ","L"=>"Р›","M"=>"Рњ","N"=>"Рќ","O"=>"Рћ","P"=>"Рџ","R"=>"Р ","S"=>"РЎ","T"=>"Рў","U"=>"РЈ","F"=>"Р¤","H"=>"РҐ","C"=>"Р¦","W"=>"РЁ","X"=>"Р«"));
return $str;
}
function replace_rus($str){
$str = str_replace("Р°","|",$str);
$str = str_replace("Р±","|",$str);
$str = str_replace("РІ","|",$str);
$str = str_replace("Рі","|",$str);
$str = str_replace("Рґ","|",$str);
$str = str_replace("Рµ","|",$str);
$str = str_replace("С‘","|",$str);
$str = str_replace("Р¶","|",$str);
$str = str_replace("Р·","|",$str);
$str = str_replace("Рё","|",$str);
$str = str_replace("Р№","|",$str);
$str = str_replace("Рє","|",$str);
$str = str_replace("Р»","|",$str);
$str = str_replace("Рј","|",$str);
$str = str_replace("РЅ","|",$str);
$str = str_replace("Рѕ","|",$str);
$str = str_replace("Рї","|",$str);
$str = str_replace("СЂ","|",$str);
$str = str_replace("СЃ","|",$str);
$str = str_replace("С‚","|",$str);
$str = str_replace("Сѓ","|",$str);
$str = str_replace("С„","|",$str);
$str = str_replace("С…","|",$str);
$str = str_replace("С‡","|",$str);
$str = str_replace("С†","|",$str);
$str = str_replace("С€","|",$str);
$str = str_replace("С‰","|",$str);
$str = str_replace("СЊ","|",$str);
$str = str_replace("С‹","|",$str);
$str = str_replace("СЉ","|",$str);
$str = str_replace("СЌ","|",$str);
$str = str_replace("СЋ","|",$str);
$str = str_replace("СЏ","|",$str);
$str = str_replace("Рђ","|",$str);
$str = str_replace("Р‘","|",$str);
$str = str_replace("Р’","|",$str);
$str = str_replace("Р“","|",$str);
$str = str_replace("Р”","|",$str);
$str = str_replace("Р•","|",$str);
$str = str_replace("РЃ","|",$str);
$str = str_replace("Р–","|",$str);
$str = str_replace("Р—","|",$str);
$str = str_replace("Р?","|",$str);
$str = str_replace("Р™","|",$str);
$str = str_replace("Рљ","|",$str);
$str = str_replace("Р›","|",$str);
$str = str_replace("Рњ","|",$str);
$str = str_replace("Рќ","|",$str);
$str = str_replace("Рћ","|",$str);
$str = str_replace("Рџ","|",$str);
$str = str_replace("Р ","|",$str);
$str = str_replace("РЎ","|",$str);
$str = str_replace("Рў","|",$str);
$str = str_replace("РЈ","|",$str);
$str = str_replace("Р¤","|",$str);
$str = str_replace("РҐ","|",$str);
$str = str_replace("Р§","|",$str);
$str = str_replace("Р¦","|",$str);
$str = str_replace("РЁ","|",$str);
$str = str_replace("Р©","|",$str);
$str = str_replace("Р¬","|",$str);
$str = str_replace("Р«","|",$str);
$str = str_replace("РЄ","|",$str);
$str = str_replace("Р","|",$str);
$str = str_replace("Р®","|",$str);
$str = str_replace("РЇ","|",$str);
return $str;
}
function role_to_tpadej($role){
switch ($role){
case "обыватель" : $trole = "обывателем";break;
case "комиссар катани" : $trole = "инспектором катани";break;
case "главарь мафии" : $trole = "главарем мафии";break;
case "доктор" : $trole = "доктором";break;
case "маньяк" : $trole = "маньяком";break;
case "путана" : $trole = "путаной";break;
case "бомж" : $trole = "бомжом";break;
case "мафиози" : $trole = "мафиози";break;
case "горец" : $trole = "горцем";break;
case "жена комиссара" : $trole = "женой комиссара";break;
case "клоун" : $trole = "клоуном";break;
default : $trole = $role; break;
}
return ($trole);
}
function role_to_rpadej($role){
switch ($role){
case "обыватель" : $rrole = "обывателя";break;
case "комиссар катани" : $rrole = "комиссара катани";break;
case "главарь мафии" : $rrole = "главаря мафии";break;
case "доктор" : $rrole = "доктора";break;
case "маньяк" : $rrole = "маньяка";break;
case "путана" : $rrole = "путану";break;
case "бомж" : $rrole = "бомжа";break;
case "мафиози" : $rrole = "мафиози";break;
case "горец" : $rrole = "горца";break;
case "жена комиссара" : $rrole = "жены комиссара";break;
case "клоун" : $rrole = "клоуна";break;
default: $rrole = $role; break;
}
return($rrole);
}
function get_name_by_id($id_in_game, $rm){
$ringame = "ingame".$rm;
$req = mysql_query("select * from $ringame WHERE id_in_game = '".$id_in_game."'");
$ms = mysql_fetch_array($req);
$gamer_id = $ms["gamer_id"];
$req = mysql_query("select * from users WHERE id = '".$gamer_id."'");
$ms = mysql_fetch_array($req);
$name = $ms["login"];
unset($gamer_id);
unset($ms);
unset($req);
return($name);
}
function get_role_by_id($id_in_game, $rm){
$ringame = "ingame".$rm;
$req = mysql_query("select * from $ringame WHERE id_in_game = '".$id_in_game."'");
$ms = mysql_fetch_array($req);
$role = $ms["role"];
unset($ms);
unset($req);
return($role);
}
function scores($rm){
$rscores = "scores".$rm;
$r = mysql_query("select * from $rscores");
$mmes = "";
while (($a = mysql_fetch_array($r))!==false){
$gamer_id = $a["gamer_id"];
$score = $a["score"];
mysql_query("update users set mafcredits = mafcredits + creditsingame WHERE id = '".$gamer_id."'");
$re = mysql_query("select login from users WHERE id = '".$gamer_id."'");
$b = mysql_fetch_array($re);
$mmes = $mmes.$b["login"]." - <b>$score</b>, ";
}
$mmes = substr($mmes,0,strlen($mmes)-2);
return($mmes);
}
function check_login($link) {
global $REMOTE_ADDR, $HTTP_USER_AGENT, $HTTP_GET_VARS, $ver, $rm, $us, $ses, $trun, $id, $ps, $ref;
$ref = rand(10000, 1000000);
if(isset($HTTP_GET_VARS['us'])) {$us = mysql_escape_string($HTTP_GET_VARS['us']);}
if(isset($HTTP_GET_VARS['id'])) {$id = mysql_escape_string($HTTP_GET_VARS['id']);}
if(isset($HTTP_GET_VARS['ps'])) {$ps = mysql_escape_string($HTTP_GET_VARS['ps']);}
if(isset($HTTP_GET_VARS['ver'])) {$ver = mysql_escape_string($HTTP_GET_VARS['ver']);}
if(isset($us)){ $us=trim($us);
if($us=="") {$bad_login = 1;}}
if(isset($id)){
if (!ctype_digit($id)) { header("Location: index.php"); die; }
$result = @mysql_query ("Select * from users where id='".$id."' LIMIT 1;");
} else {
if (!ctype_digit($us)) {
if($trun==1) {$us=trun_to_rus($us);}
$latuser=strtolower($us);
$ruser = rus_to_k($us);
if($ruser==$us){
$result = mysql_query ("Select * from users where latuser = '".$latuser."' LIMIT 1;");
} else {
$result = mysql_query ("Select * from users where ruser = '".$ruser."' LIMIT 1;");
}
} else {
$result = mysql_query ("Select * from users where id = '".$us."' LIMIT 1;");
}
if (mysql_affected_rows() == 0) {$bad_login = 1;}
}
$row = mysql_fetch_array ($result);
if(!isset($id)){$id=$row["id"];}
if ($ps !== $row["pass"]) {$bad_login = 2;}
if($bad_login) {
if ($ver=="wml"){
echo $xml;
echo $dtd;
echo "<wml>n";
echo "<card id="error" title="error" ontimer="index.php?ver=$ver&ref=$ref"><timer value="20"/>n";
echo "<p align="center">";
}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=index.php?ver=$ver&ref=$ref">";
echo "<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>";
echo "<div align="center">";
}
echo "<small>n";
if ($bad_login == 1) echo "Житель не найден.";
else if ($bad_login == 3) echo "Недопустимые символы в ID.";
else echo "Не верное сочетание пароля и ника.";
echo "</small>";
if ($ver=="wml")echo "</p></card></wml>";
else echo "</div></body></html>";
mysql_close($link);
exit;
}
if($row['fsize'] == "verysmall") { $fsize1 = "<small><small>"; $fsize2 = "</small></small>"; }
elseif($row['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
elseif($row['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
else { $fsize1 = ""; $fsize2 = ""; }
if (($row["banned"]==1)&&($row["level"]<7)) {
if ($ver=="wml"){
echo $xml;
echo $dtd;
echo "<wml>";
echo "<card id="error" title="Стоп!" ontimer="index.php?ver=$ver&ref=$ref"><timer value="20"/>";
echo "<p align="center">";
}else{
echo "<title>Галерея</title>";
echo "<style type="text/css">";
echo "body { font-size: {$fs}; color: {$tcol}; background-color: {$bcol} }";
echo "a:link,a:visited { text-decoration: underline; color: {$lcol} }";
echo "div { border-style:solid; border-width: 1px; background-color: {$rcol} }";
echo "<div align="center">";
}
echo $fsize1;
echo "<b>Ртот РЅРёРє забанен!</b>";
echo $fsize2;
if ($ver=="wml")echo "</p></card></wml>";
else echo "</div></body></html>";
mysql_close($link);
exit;
}
$us_ip = $row["user_ip"];
$us_soft = $row["user_soft"];
if(($row["user_soft"]!==$HTTP_USER_AGENT||$row["user_ip"]!==$REMOTE_ADDR)){
mysql_query ("Update users set user_soft='". $HTTP_USER_AGENT."', user_ip = '".$REMOTE_ADDR."' WHERE id = '".$id."';");
if ($row["safe"]==1){
$data = date("d-M-Y [H:i]");
$kolf = rand(0,99999999);
$time = time();
$message = "Внимание! Ваш текущий софт или ip адрес не совпадают с ip+soft последнего захода. Если вы не использовали в последнее время ip $us_ip или софт $us_soft, это может означать, что кто-то заходит с Вашего ника. Рекомендуем сменить ваш пароль. Отключить систему безопасности можно в настройках чата, но это не рекомендуется.";
$robokop = @mysql_fetch_array(@mysql_query ("Select login from users where id='7' LIMIT 1;"));
@mysql_query("Insert into zapiski set klu4='".$kolf."', who ='".$robokop[0]."', idwho ='7', message = '".$message."', towhom = '".$login."', idtowhom = '".$id."', time = '".$time."', readd = '0', topic = 'Предупреждение о безопасности!!!', date='".$data."'");
}
}
$login=$row["login"];
$syst = @mysql_query ("Select login from users where id='1' LIMIT 1;");
$rr = @mysql_fetch_array ($syst);
$adm = $rr["login"];
if (($row["posts"]>=1000)&&($row["level"]<1)){
$levelselect = @mysql_query ("Select name from levels where level=1");
$levels = @mysql_fetch_array($levelselect);
$levelname = $levels["name"];
$row["level"] = 1; $row["status"] = "".$levelname."";
mysql_query ("UPDATE users SET status = '".$row["status"]."', level = '".$row["level"]."' WHERE id = '".$id."';");
$data = date("d-M-Y [H:i]");
$kolw = rand(0,99999999);
$time = time();
$message = "Поздравляю <b>".$login."</b>!!! Вы набрали необходимое колличество постов и <b>".$adm."</b> Вам присвоила уровень <b>".$levelname."</b>.";
@mysql_query("Insert into zapiski set klu4='".$kolw."', who ='".$adm."', idwho ='1', message = '".$message."', towhom = '".$login."', idtowhom = '".$id."', time = '".$time."', readd = '0', topic = 'Поздравление!!!', date='".$data."'");
}
if (($row["posts"]>=3000)&&($row["level"]<2)){
$levelselect = @mysql_query ("Select name from levels where level=2");
$levels = @mysql_fetch_array($levelselect);
$levelname = $levels["name"];
$row["level"] = 2; $row["status"] = "".$levelname."";
mysql_query ("UPDATE users SET status = '".$row["status"]."', level = '".$row["level"]."' WHERE id = '".$id."';");
$data = date("d-M-Y [H:i]");
$kolw = rand(0,99999999);
$time = time();
$message = "Поздравляю <b>".$login."</b>!!! Вы набрали необходимое колличество постов и <b>".$adm."</b> Вам присвоила уровень <b>".$levelname."</b>.";
@mysql_query("Insert into zapiski set klu4='".$kolw."', who ='".$adm."', idwho ='1', message = '".$message."', towhom = '".$login."', idtowhom = '".$id."', time = '".$time."', readd = '0', topic = 'Поздравление!!!', date='".$data."'");
}
if (($row["posts"]>=7000)&&($row["level"]<3)){
$levelselect = @mysql_query ("Select name from levels where level=3");
$levels = @mysql_fetch_array($levelselect);
$levelname = $levels["name"];
$row["level"] = 3; $row["status"] = "".$levelname."";
mysql_query ("UPDATE users SET status = '".$row["status"]."', level = '".$row["level"]."' WHERE id = '".$id."';");
$data = date("d-M-Y [H:i]");
$kolw = rand(0,99999999);
$time = time();
$message = "Поздравляю <b>".$login."</b>!!! Вы набрали необходимое колличество постов и <b>".$adm."</b> Вам присвоила уровень <b>".$levelname."</b>.";
@mysql_query("Insert into zapiski set klu4='".$kolw."', who ='".$adm."', idwho ='1', message = '".$message."', towhom = '".$login."', idtowhom = '".$id."', time = '".$time."', readd = '0', topic = 'Поздравление!!!', date='".$data."'");
}
return array($row, $id, $ps, $fsize1, $fsize2);
}
?>