Вход Регистрация
Файл: unhistory.php
Строк: 148
<?php
ini_set
('display_errors''off');
$r=rand(0,10000);
header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
print 
'<?xml version="1.0" encoding="UTF-8"?>';
print 
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>История</title><link rel="StyleSheet" type="text/css" href="style/default.css"></head><body><div>";

include "./ini.php";
include 
"./lines.ls";
mysql_query ("select * from bannedib WHERE ci='$ci' AND (ip = '".getenv(REMOTE_ADDR)."')and(browser = '".getenv(HTTP_USER_AGENT)."')");
                        if(
mysql_affected_rows()!=0){include "b.php";}
$query_settings = @mysql_query("select * from `".$px.$unitable."` where var='$room' and mod='room' and ci='$ci';");

$settings = @mysql_fetch_array($query_settings);

$timenow strftime("%H:%M");

$login autorize();
if(
$login['fsize'] == "medium") { $fsize1 ""$fsize2 ""; }
elseif(
$login['fsize'] == "small") { $fsize1 "<small>"$fsize2 "</small>"; }
elseif(
$login['fsize'] == "big") { $fsize1 "<big>"$fsize2 "</big>"; }

$num_msgs $login['nmsgs'];
$time_update $login['tupdate'];
if(empty(
$num_msgs)) $num_msgs 5;
if(empty(
$time_update)) $time_update 300;
if(
$mod=="privat")
print 
'<title>'.$settings['val2'].'-'.$timenow.'</title>';
print 
"<link rel="StyleSheet" type="text/css" href="style/0".$s.".css"></head><body>";


if(empty(
$start)) $start 0;
$start=intval($start);
if(
$start<0$start=0;
if(
$mod=="privat"){
$que = @mysql_query("SELECT `id`,`login`,`msg`,`time`,`pr_to`,`pr_from` from `".$px.$unitable."` WHERE  login != '".$ignor."' and (pr_to=".$login['id']." or pr_from=".$login['id'].") order by time desc limit $num_msgs;");}
else{
$que = @mysql_query("SELECT * from `".$px.$unitable."` WHERE  ((pr_to = '' AND pr_from = '') OR (pr_from = '".$login['id']."' OR pr_to = '".$login['id']."')) and login != '".$ignor."'   order by time desc limit $num_msgs;");
}
if(
$room=="united") {
$arr = @mysql_query("select * from `".$px.$unitable."` WHERE (pr_to = '' AND pr_from = '') OR (pr_from = '".$login['login']."' OR pr_to = '".$login['login']."') order by time desc;");
$que = @mysql_query("select * from `".$px.$unitable."` WHERE (pr_to = '' AND pr_from = '') OR (pr_from = '".$login['login']."' OR pr_to = '".$login['login']."') order by time desc limit $start,$num_msgs;");
} else {
$arr = @mysql_query("select * from `".$px.$mtable."` WHERE room = '$room' AND ((pr_to = '' AND pr_from = '' and ci='$ci') OR (pr_from = '".$login['login']."' OR pr_to = '".$login['login']."' and ci='$ci')) order by time desc;");
$que = @mysql_query("select * from `".$px.$mtable."` WHERE room = '$room' AND ((pr_to = '' AND pr_from = '' and ci='$ci') OR (pr_from = '".$login['login']."' OR pr_to = '".$login['login']."' and ci='$ci')) order by time desc limit $start,$num_msgs;");
}

$i = @mysql_num_rows($arr);

print 
"<div class="contur_rek"><div class="header_rek">".$fsize1."<a href="unhistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;r=".$r."">".$lang['update']."</a>";
print 
' | <a href="unhistory.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;mod=privat&amp;r='.$r.'">'.$lang['privat'].'</a>';
print 
" | <a href="united.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;r=".$r."">".$lang['say']."</a>".$fsize2."</div></div><div class="contur"><div class="header">";

while(
$data = @mysql_fetch_array($que)) {

        
$dblogin $data['login'];
        
$dbmsg $data['msg'];
        
$dbtime = (date("H.i"$data['time']));
        
$pr_to $data['pr_to'];
        
$pr_from $data['pr_from'];
$dbchat $data['ci'];
$query_users = @mysql_query("select * from `".$px.$utable."` where login='".$dblogin."';");
$data = @mysql_fetch_array($query_users);
$qdblogin = @mysql_query("select `id` from `".$px.$utable."` where `login`='$dblogin'");
$db = @mysql_fetch_array($qdblogin);
if(
$data['sex']=="zh") { $sex "<img src='/images/pol_0.gif' alt='Ж'>
"
; } else { $sex "<img src='/images/pol_1.gif' alt='М'>"; }
if(!empty(
$pr_to)&&!empty($pr_from)) print "<div class="smain">".$fsize1."$sex<a href="unuser.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;dbid=".$db['id']."&amp;r=$r">".$data['color']."$dblogin</span></a>[приват]&nbsp;<span style="color:#FAA134;">[Чат$dbchat][$dbtime]</span>>$dbmsg".$fsize2."</div>";
else
print 
"<div class="smain">".$fsize1."$sex<a href="unuser.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;dbid=".$db['id']."&amp;r=$r">";?><SCRIPT language=JavaScript>
gradient("<?echo "$dblogin";?>","<?echo "".$data['color'].", ".$data['color2'].", ".$data['color3']."";?>");
</SCRIPT><?print "</a>&nbsp;<span style="color:#FAA134;">[Чат$dbchat][$dbtime]</span>>$dbmsg".$fsize2."</div>";
}
print 
"</div></div>";
if(
$start!=0)
print 
"<div class="contur"><div class="header">".$fsize1."<a href="unhistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;mod=$mod&amp;r=$r&amp;start=".($start-$num_msgs)."">".htmlspecialchars("<<<")."</a>".$fsize2."";
if(
$i>$start+$num_msgs)
print 
"".$fsize1."<a href="unhistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;mod=$mod&amp;r=$r&amp;start=".($start+$num_msgs)."">".htmlspecialchars(">>>")."</a>".$fsize2."";
print 
"</div></div>";
print 
"<div class="contur_rek"><div class="header_rek">".$fsize1."<a href="enter.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass">".$lang['holl']."</a>".$fsize2."</div></div>";
print 
'</body></html>';
ob_end_flush();

@
mysql_close();
?>
Онлайн: 4
Реклама