Вход Регистрация
Файл: ihistory.php
Строк: 111
<?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/0".$s.".css"></head><body><div>";

include "./ini.php";
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.$stable."` where var='$room' and mod='room' and ci='$ci';");

$settings = @mysql_fetch_array($query_settings);

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

$login autorize();

$num_msgs $login['nmsgs'];
$time_update $login['tupdate'];
if(empty(
$num_msgs)) $num_msgs 10;
if(empty(
$time_update)) $time_update 300;
if(
$mod=="privat")
if(empty(
$start)) $start 0;
$start=intval($start);
if(
$start<0$start=0;

if(
$room=="intim") {
$arr = @mysql_query("select * from `".$px.$prtable."` WHERE (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.$prtable."` WHERE (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;");
} else {
$arr = @mysql_query("select * from `".$px.$prtable."` 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.$prtable."` 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"><a href="ihistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;key=$key&amp;room=$room&amp;r=".$r."">".$lang['update']."</a>";
print 
' | <a href="ihistory.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;key='.$key.'&amp;room='.$room.'&amp;mod=privat&amp;r='.$r.'">'.$lang['privat'].'</a>';
print 
" | <a href="iroom.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;key=$key&amp;room=$room&amp;r=".$r."">".$lang['say']."</a></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'];

$qdblogin = @mysql_query("select * from `".$px.$utable."` where login='$dblogin' and ci='$ci'");

$db = @mysql_fetch_array($qdblogin);
if(!empty(
$pr_to)&&!empty($pr_from)) print "<div class="smain"><b><a href="iuser.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;dbid=".$db['id']."&amp;r=$r">$dblogin</a>[!]</b>&nbsp;<span style="color:#FAA134;">[$dbtime]</span><br/>$dbmsg";
else
print 
"<a href="iuser.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;dbid=".$db['id']."&amp;r=$r">$dblogin</a></b>&nbsp;<span style="color:#FAA134;">[$dbtime]</span><br/>$dbmsg";
}
print 
"</div></div>";
if(
$start!=0)
print 
"<div class="contur"><div class="header"><a href="ihistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;key=$key&amp;room=$room&amp;mod=$mod&amp;r=$r&amp;start=".($start-$num_msgs)."">".htmlspecialchars("<<<")."</a></div></div>";
if(
$i>$start+$num_msgs)
print 
"<a href="ihistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;key=$key&amp;mod=$mod&amp;r=$r&amp;start=".($start+$num_msgs)."">".htmlspecialchars(">>>")."</a>";
print 
"</div></div>";
print 
"<div class="contur_rek"><div class="header_rek"><a href="enter.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass">".$lang['holl']."</a></div></div>";
print 
'</body></html>';
ob_end_flush();

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