<?
  ##########################################
## Автор: -=ШАХТЕР=-                        #                                                                                                                                                                                      ## Сайт: http://masteram.us                 #                 															                      ## ICQ  :  46-92-90                         #                 														 		           ## Версия 4.0 Лицензионная                  #
## Данная версия скрипта является ПЛАТНОЙ,  #
## вы НЕ ИМЕЕТЕ ПРАВА распрострянять данный #
##  скрипт или какие-либо части его кода... #
  #########################################
require'../config.php';
$align='left';
$title='Мафия';
aut();
head();

$rmmaf  = check(intval($_GET['rmmaf']));
$nk  = check(intval($_GET['nk']));
if (!ctype_digit($rmmaf)) { header("Location: index.php"); die; }


if (!ctype_digit($nk)) { header("Location: index.php"); die; }


if ($nk!=0){

$select = @$db->sql_query ("Select * from users where id='".$nk."'");

if (mysql_affected_rows() == 0){

echo "Юзер не найден. Возможно ник удалён.<br/>";

echo "$div1<a href=\"maf.php?rmmaf=$rmmaf\">В чат</a>$div9";

if ($wap=="1")echo '</p></card></wml>';
else echo '</div></body></html>';
mysql_close ($link);
exit;
}
$inf = $db->sql_fetchrow ($select);
if ($row["anketa"]==1){
$usid=$inf["id"];
$nick = $inf["user"];
$sex = $inf["sex"];
$us_ip = $inf["user_ip"];
$us_soft = $inf["user_soft"];
$level=$inf["level"];
$version=$inf["version"];
$img=$inf["img"];
$votefoto=$inf["votefoto"];
}else{
$usid=$inf["id"];
$nick = $inf["user"];
$name = $inf["name"];
$birth = $inf["birth"];
$sex = $inf["sex"];
$city = $inf["city"];
$mail = $inf["mail"];
$site = $inf["site"];
$infa = $inf["infa"];
$icq = $inf["icq"];
$posts = $inf["posts"];
$credits = $inf["credits"];
$gposts = $inf["gposts"];
$status = $inf["status"];
$date = $inf["date"];
$op = $inf["op"];
$onl = $inf["onl"];
$mob = $inf["mob"];
$us_ip = $inf["user_ip"];
$us_soft = $inf["user_soft"];
$img = $inf["img"];
$nastroi = $inf["nastroi"];
$visit = $inf["visit"];
$room = $inf["room"];
$byeotv = $inf["byeotv"];
$number = $inf["number"];
$level=$inf["level"];
$fr = $inf["friends"];
$mysmile = $inf["mysmile"];
$votefoto = $inf["votefoto"];
$ign=$inf["ignor"];
$para=$inf["para"];
$bee=$inf["site"];
$myavatar=$inf["myavatar"];
$version=$inf["version"];
$postmag=$inf["postmag"];
$alltraf=$inf["alltraf"];
$postsf = $inf["postsf"];
$idpass=$inf["pass"];
$rating=$inf["rating"];
$clan=$inf["clan"];
$myblogs=$inf["myblogs"];
$monets = $inf["money"];

if ($credits>=0 && $credits<100) $victstatus="Ученик";
if ($credits>=100 && $credits<500) $victstatus="Студент";
if ($credits>=500 && $credits<1000) $victstatus="Бакалавр";
if ($credits>=1000 && $credits<2000) $victstatus="Магистр";
if ($credits>=2000 && $credits<5000) $victstatus="Кандидат в доктора";
if ($credits>=5000 && $credits<7000) $victstatus="Доктор наук";
if ($credits>=7000) $victstatus="Учитель НеЗнайки =)";
}
$levelselect = @$db->sql_query ("Select name from levels where level='".$level."'");
$levels = @$db->sql_fetchrow($levelselect);
$levname = $levels["name"];
$user=$row['user'];
$selemoc=$row['selemoc'];
$emocmenu=$row['emocmenu'];
$emoc1=$row['emoc1'];
$emoc2=$row['emoc2'];
$emoc3=$row['emoc3'];
$emoc4=$row['emoc4'];
$emoc5=$row['emoc5'];
$emoc6=$row['emoc6'];
$emoc7=$row['emoc7'];
$emoc8=$row['emoc8'];
$emoc9=$row['emoc9'];
$emoc10=$row['emoc10'];
$bind4=$row['bind4'];


ob_start();

}




if((isset($rmmaf))&&($rmmaf!="")){

if ($nk!=0)echo "Сообщение для <b>".$nick."</b><br/>";
else echo "Сообщение для <b>".$mafiozi."</b><br/>";

if ($ver=='wml'){
echo'<textarea cols="20" rows="1" name="msg" maxlength="200" ></textarea><br />';
}else{
echo "<form action=maf.php?rmmaf=$rmmaf$takep method=post title=\"Сказать\">";
echo "<input type=hidden name=towhom value=$usid />";

if ($nk!=0)echo "<input type=hidden name=komu value=\"".$nick."\"/>";
if ($nk==0)echo "<input type=hidden name=komu value=\"".$mafiozi."\"/>";
echo'<textarea cols="20" rows="1" name="msg" maxlength="200" ></textarea><br />';
}
echo "<select name=\"prvt\">";
if ($nk!=0)echo "<option value=\"0\">Всем</option>";
if ($nk==0)echo "<option value=\"1\">Приватно</option>";
echo "</select><br/>";

if ($ver=='wml'){

echo "<anchor title=\"send\">Сказать<go href=\"maf.php?rmmaf=$rmmaf$takep\" method=\"post\">";
echo "<postfield name=\"msg\" value=\"$(msg$ref)\"/>";
if ($nk!=0)echo "<postfield name=\"komu\" value=\"".$nick."\"/>";
if ($nk==0)echo "<postfield name=\"komu\" value=\"".$mafiozi."\"/>";
echo "<postfield name=\"towhom\" value=\"$usid\"/>";
echo "<postfield name=\"prvt\" value=\"$(prvt)\"/>";
echo "</go></anchor>";
echo "<br/>";
}else{
echo "<input class=\"ibutton\" type=\"submit\" value=\"Сказать\" name=\"enter\"><br/>";
}
}
if ($nk!=0){


}else{


}


echo "<br /><a href=maf.php?rmmaf=$rmmaf$takep&amp; method=post title=\"В игру\"><input type=submit class=\"ibutton\" value=\"В игру\"></a>";
foot();

?>