<?php
include 'lang.inc.php';
$DB_HOST = "localhost";
$DB_USER = "chatik_sv";
$DB_PASS = "sv";
$DB_NAME = "chatik_sv";
$limit ="10";
$offline = 300; ;
$divide = "<small>*****</small><br/>";
$px = "chat_";
$itable = "ignor";
$utable = "users";
$stable = "settings";
$qtable = "ques";
$vtable = "vict";
$mtable = "messages";
$meettable = "meets";
$ltable = "letters";
function gettime()
{
$part_time = explode(' ', microtime());
$real_time = $part_time[1].substr($part_time[0], 1);
return $real_time;
}
function autorize() {
global $px, $utable, $login, $id, $pass, $ci;
$q = @mysql_query("select * from `".$px.$utable."` where id='$id' and pass='$pass' and ci='$ci' limit 1;");
$duser = @mysql_fetch_array($q);
return $duser;
}
$tran = array(
"A"=>"Рђ","a"=>"Р°","B"=>"Р‘","b"=>"Р±","V"=>"Р’",
"v"=>"РІ","G"=>"Р“","g"=>"Рі","D"=>"Р”","d"=>"Рґ",
"E"=>"Р•","e"=>"Рµ","yo"=>"РЃ","Zh"=>"Р-","zh"=>"Р¶",
"Z"=>"Р-","z"=>"Р·","I"=>"Р?","i"=>"Рё","J"=>"Р™",
"j"=>"Р№","K"=>"Рљ","k"=>"Рє","L"=>"Р›","l"=>"Р»",
"M"=>"Рњ","m"=>"Рј","N"=>"Рќ","n"=>"РЅ","O"=>"Рћ",
"o"=>"Рѕ","P"=>"Рџ","p"=>"Рї","R"=>"Р ","r"=>"СЂ",
"S"=>"РЎ","s"=>"СЃ","T"=>"Рў","t"=>"С‚","U"=>"РЈ",
"u"=>"Сѓ","F"=>"Р¤","f"=>"С„","H"=>"РҐ","h"=>"С…",
"C"=>"Р¦","c"=>"С†","Ch"=>"Р§","ch"=>"С‡","Sh"=>"РЁ",
"sh"=>"С€","Sch"=>"Р©","sch"=>"С‰","''"=>"СЉ",
"Y"=>"Р«","y"=>"С‹","'"=>"СЊ","Ye"=>"Р",
"ye"=>"СЌ","Yu"=>"Р®","yu"=>"СЋ","Ya"=>"РЇ","ya"=>"СЏ",
"Yo"=>"С‘"
);
function latrus($str) {
global $tran;
return strtr($str,$tran);
}
////////////////////////////////////////////////////////////
mysql_connect($DB_HOST,$DB_USER,$DB_PASS) or die ('<card id="error" title="����!">'.
'<p>'.
'���� ������ �������� �� ��������!'.
'<br/>'.
'<anchor>�����<prev/></anchor><br/>'.
'<u><a href="http://ruwap.com.ru">ruwap.com.ru</a></u>'.
'</p>'.
'</card>'.
'</wml>');
mysql_select_db($DB_NAME);
function ustatus() {
global $login, $px, $utable;
$status = $login['status'];
$posts = $login['posts'];
if(empty($status))
@mysql_query("update `".$px.$utable."` set status='Прохожий' where id='".$login['id']."' and ci='$ci';");
if($posts>=100 && $posts<500 && $status=="Прохожий")
@mysql_query("update `".$px.$utable."` set status='Новичок' where id='".$login['id']."' and ci='$ci';");
if($posts>=500 && $posts<1000 && $status=="Новичок")
@mysql_query("update `".$px.$utable."` set status='Пользователь' where id='".$login['id']."' and ci='$ci';");
if($posts>=1000 && $posts<3000 && $status=="Пользователь")
@mysql_query("update `".$px.$utable."` set status='Продвинутый' where id='".$login['id']."' and ci='$ci';");
if($posts>=3000 && $posts<5000 && $status=="Продвинутый")
@mysql_query("update `".$px.$utable."` set status='Чаттер' where id='".$login['id']."' and ci='$ci';");
if($posts>=5000 && $posts<7000 && $status=="Чаттер")
@mysql_query("update `".$px.$utable."` set status='Тусовщик' where id='".$login['id']."' and ci='$ci';");
if($posts>=7000 && $status=="Тусовщик")
@mysql_query("update `".$px.$utable."` set status='Почетный' where id='".$login['id']."' and ci='$ci';");
}
?>