Просмотр файла chat/room.inc.php

Размер файла: 3.33Kb
<?php
///////////////////////////////////////////////////////////////////////////////////////////
/////
/////                                ********* Best — в *********
/////
/////                            Made by   :  Best
/////                              E-mail  :  [email protected]
/////                                Site  :  http://best.ruwap.org 
/////                                 ICQ  :  415-213-787
/////
//////////////////////////////////////////////////////////////////////////////////////////////
//      ‚› Ќ… €Њ……’… ЏђЂ‚Ћ ‚ЌЋ‘€’ €‡Њ…Ќ…Ќ€џ ‚ ЉЋ„ ‘Љђ€Џ’Ђ „‹џ „Ђ‹њЌ…‰?…ѓЋ ђЂ‘ЏђЋ‘’ђЂЌ…Ќ€џ   //
//////////////////////////////////////////////////////////////////////////////////////////////
print '<small>&#187; <a href="./room.php?id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;r='.$r.'">'.$lang['update'].'</a></small><br/>'.
'<small>&#187; <a href="./room.php?id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;mod=privat&amp;r='.$r.'">'.$lang['privat'].'</a></small><br/>'.
'<small>&#187; <a href="#say">'.$lang['say'].'</a></small><br/><small>';
$ignor = "";
$qi = @mysql_query("select `user` from `".$px.$itable."` where `loginid`=".$login['id'].";");
while($idata = @mysql_fetch_array($qi)) {
$ignor .= "login != '".$idata['user']."' AND ";
}
//ЇаЁў в Ё«Ё ­Ґв
if($room=="vict") {
if($mod=="privat")
$que = @mysql_query("SELECT `login`,`msg`,`time`,`pr_to`,`pr_from` from `".$px.$vtable."` WHERE ".$ignor." (pr_from = '".$login['id']."' OR pr_to = '".$login['id']."') order by id desc limit $num_msgs;");
else
$que = @mysql_query("SELECT `login`,`msg`,`time`,`pr_to`,`pr_from` from `".$px.$vtable."` WHERE ".$ignor." ((pr_to = '' AND pr_from = '') OR (pr_from = '".$login['id']."' OR pr_to = '".$login['id']."')) order by id desc limit $num_msgs;");
} else {
if($mod=="privat")
$que = @mysql_query("SELECT `login`,`msg`,`time`,`pr_to`,`pr_from` from `".$px.$mtable."` WHERE ".$ignor." room = '$room' AND (pr_from = '".$login['id']."' OR pr_to = '".$login['id']."') order by time desc limit $num_msgs;");
else
$que = @mysql_query("SELECT `login`,`msg`,`time`,`pr_to`,`pr_from` from `".$px.$mtable."` WHERE ".$ignor." room = '$room' AND ((pr_to = '' AND pr_from = '') OR (pr_from = '".$login['id']."' OR pr_to = '".$login['id']."')) order by time desc limit $num_msgs;");
}
//ўлў®¤Ё¬ ўбҐ ў жЁЄ«Ґ
while($m = @mysql_fetch_array($que)) {
$dblogin = $m['login'];
$dbmsg = $m['msg'];
$dbtime = ($m['time']);
$pr_to = $m['pr_to'];
$pr_from = $m['pr_from'];
$qdblogin = @mysql_query("select `id` from `".$px.$utable."` where `login`='$dblogin'");
$db = @mysql_fetch_array($qdblogin);
if(!empty($pr_to)&&!empty($pr_from)) print "<b><a href=\"user.php?id=$id&amp;pass=$pass&amp;room=$room&amp;dbid=".$db['id']."&amp;r=$r&amp;mod=$mod\">$dblogin</a>[!]</b>\r[".date("H.i",$dbtime)."]&gt;".$dbmsg."<br/>";
else
print "<b><a href=\"./user.php?id=$id&amp;pass=$pass&amp;room=$room&amp;dbid=".$db['id']."&amp;r=$r\">$dblogin</a></b>\r[".date("H.i",$dbtime)."]&gt;".$dbmsg."<br/>";
}
if($mod=="privat")
print "&#187; <a href=\"./history.php?id=$id&amp;pass=$pass&amp;room=$room&amp;start=$num_msgs&amp;&amp;mod=$mod&amp;r=$r\">".$lang['history']."</a>";
else
print "&#187; <a href=\"./history.php?id=$id&amp;pass=$pass&amp;room=$room&amp;start=$num_msgs&amp;r=$r\">".$lang['history']."</a>";
print "<br/>&#187; <a href=\"./enter.php?id=$id&amp;pass=$pass\">".$lang['holl']."</a></small><br/>";
?>