Вход Регистрация
Файл: xhistory.php
Строк: 221
<?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>";
?><SCRIPT language=JavaScript>
var tohex = new Array(256);
var hex = "0123456789ABCDEF";
var count = 0;
for (x=0; x<16; x++) {
 for (y=0; y<16; y++) {
 tohex[count] = hex.charAt(x) + hex.charAt(y);
 count++;
 }
}

function ColorCode(hexcode) {
  if (hexcode.length == 7) {
    this.r = parseInt(hexcode.substring(1,3),16);
    this.g = parseInt(hexcode.substring(3,5),16);
    this.b = parseInt(hexcode.substring(5,7),16);
  }
  else if (hexcode.length == 6) {
    this.r = parseInt(hexcode.substring(0,2),16);
    this.g = parseInt(hexcode.substring(2,4),16);
    this.b = parseInt(hexcode.substring(4,6),16);
  }
  else {
    this.r = this.g = this.b = 0;
    alert("Error: ColorCode constructor failed");
  }
  if (isNaN(this.r)||isNaN(this.g)||isNaN(this.b))
    alert("Error: ColorCode constructor failed");
}
 
function ColorList(hexcodes) {
  var i = 0;
  var c = 0;
  this.codes = new Array(Math.round(hexcodes.length/7));
  while (i < hexcodes.length) {
    if (isNaN(parseInt(hexcodes.substring(i,i+6),16))) ++i;
    else {
      this.codes[c] = new ColorCode(hexcodes.substring(i,i+6));
      i += 7;
      ++c;
    }
  }
  this.len = c;
}
 
function interpolate (x1, y1, x3, y3, x2) {
  if (x3 == x1) return y1
  else return (x2-x1)*(y3-y1)/(x3-x1) + y1
}

function lowcolorindex (x, y, z) {
  if (y == 1) return 0
  else return Math.floor( (x*(z-1))/(y-1) )
}
 
function hicolorindex (x, y, z, low) { 
  if ( low*(y-1) == x*(z-1) ) return low
  else if (y == 1) return 0
  else return Math.floor( (x*(z-1))/(y-1) + 1 )
}
 
function gradient (thetext,thecolors) {
    var colors = new ColorList(thecolors);
    var numcolors = colors.len;
    var numchars = thetext.length;
    var rr = 0;
    var gg = 0;
    var bb = 0;
    var lci = 0;
    var hci = 0;
    for (i=0; i<numchars; ++i) {
      lci = lowcolorindex(i, numchars, numcolors);
      hci = hicolorindex(i, numchars, numcolors, lci);
      rr = Math.round(interpolate( lci/(numcolors-1), colors.codes[lci].r, hci/(numcolors-1), colors.codes[hci].r, i/(numchars-1)));
      gg = Math.round(interpolate( lci/(numcolors-1), colors.codes[lci].g, hci/(numcolors-1), colors.codes[hci].g, i/(numchars-1)));
      bb = Math.round(interpolate( lci/(numcolors-1), colors.codes[lci].b, hci/(numcolors-1), colors.codes[hci].b, i/(numchars-1)));
      document.write(thetext.charAt(i).fontcolor('#' + tohex[rr]+tohex[gg]+tohex[bb]));
    }
  }
</script><?
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();
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></head><body><div>';
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 (
$act== "dell"){
        if(@
mysql_query("delete from `".$px.$unitable."` where `id`='$mid' ")) print $lang['dellmess'];
        else print 
$lang['errormess'];}
if(
$room=="xroom") {
$arr = @mysql_query("select * from `".$px.$xtable."` 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.$xtable."` 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.$mtable."` WHERE room = '$room' AND ((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.$mtable."` WHERE room = '$room' AND ((pr_to = '' AND pr_from = '') OR (pr_from = '".$login['login']."' OR pr_to = '".$login['login']."')) order by time desc limit $start,$num_msgs;");
}

$i = @mysql_num_rows($arr);
echo 
$fsize1;
print 
"<div class="contur_rek"><div class="header_rek"><a href="xhistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;r=".$r."">".$lang['update']."</a>";
print 
' | <a href="xroom.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="xroom.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;r=".$r."">".$lang['say']."</a></div></div><div class="contur"><div class="header">";
echo 
$fsize2;
while(
$data = @mysql_fetch_array($que)) {

        
$dblogin $data['login'];
$dbchat $data['ci'];

        
$dbmsg $data['msg'];
        
$dbtime = (date("H.i"$data['time']));
        
$pr_to $data['pr_to'];
        
$pr_from $data['pr_from'];

$query_users = @mysql_query("select * from `".$px.$utable."` where login='".$dblogin."';");
$data2 = @mysql_fetch_array($query_users);
$qdblogin = @mysql_query("select `id` from `".$px.$utable."` where `login`='$dblogin'");
$db = @mysql_fetch_array($qdblogin);
if(
$data2['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)){
if(
$login['zmoder']>0) print "".$fsize1."[<a href="xroom.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;r=$r&amp;act=dell&amp;mid=$idmess">x</a>]".$fsize2."";
echo 
$fsize1;
print 
"$sex<a href="xuser.php?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 "".$data2['color'].", ".$data2['color2'].", ".$data2['color3']."";?>");
</SCRIPT><?echo "</a><b><font color=#FF0000>[приват]</font></b><m style='color: #6080ff; font-weight: bold; margin: 0px;'>[".date("H:i:s",$dbtime)."]</m><m style='color: #ffa040; font-weight: bold; margin: 0px;'>[чат$dbchat]</m><m style='color: #ffc080; font-weight: bold; margin: 0px;'>></m>$dbmsg<br/>";
?><SCRIPT language=JavaScript>
gradient("<?echo "*****";?>","<?echo "".$data2['color'].", ".$data2['color2'].", ".$data2['color3']."";?>");
</SCRIPT><?
echo "<br/>";
echo 
$fsize2;
}else{
if(
$login['zmoder']>0) print "".$fsize1."[<a href="xroom.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;r=$r&amp;act=dell&amp;mid=$idmess">x</a>]".$fsize2."";
echo 
$fsize1;
print 
"$sex<a href="xuser.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 "".$data2['color'].", ".$data2['color2'].", ".$data2['color3']."";?>");
</SCRIPT><?echo "</a></b><m style='color: #6080ff; font-weight: bold; margin: 0px;'>[".date("H:i:s",$dbtime)."]</m><m style='color: #ffa040; font-weight: bold; margin: 0px;'>[чат$dbchat]</m><m style='color: #ffc080; font-weight: bold; margin: 0px;'>></m>$dbmsg<br/>";
?><SCRIPT language=JavaScript>
gradient("<?echo "*****";?>","<?echo "".$data2['color'].", ".$data2['color2'].", ".$data2['color3']."";?>");
</SCRIPT><?
echo "<br/>";
echo 
$fsize2;
}
}
print 
"</div></div>";

if(
$start!=0)
echo 
$fsize1;
print 
"<div class="contur"><div class="header"><a href="xhistory.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>";
echo 
$fsize2;
if(
$i>$start+$num_msgs)
echo 
$fsize1;
print 
"||<a href="xhistory.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>";
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>";
echo 
$fsize2;
print 
'</div></div></body></html>';
ob_end_flush();

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