Вход Регистрация
Файл: sroom.php
Строк: 288
<?php
ini_set
('display_errors''off');
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");
include 
"./ini.php";

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>";
mysql_query ("select * from bannedib WHERE ci='$ci' AND ( ((ip = '".getenv(REMOTE_ADDR)."')and(browser = '".getenv(HTTP_USER_AGENT)."')) or ((ip = '".getenv(REMOTE_ADDR)."') and (browser = '')) or  (login='$id'))");
            if(
mysql_affected_rows()!=0){include "b.php";}
$start gettime();
$r rand(0,100000);

$login autorize();

$query_settings = @mysql_query("select `val2` from `".$px.$stable."` where var='$room' and mod='room' and ci='".$login['ci']."';");

$settings = @mysql_fetch_array($query_settings);

$num_msgs $login['nmsgs'];
$time_update $login['tupdate'];

if(empty(
$num_msgs)) $num_msgs=5;
if(empty(
$time_update)) $time_update=300;

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

$rtitle $settings['val2'];

$pass=htmlspecialchars(stripslashes(trim($pass)));
$room=htmlspecialchars(stripslashes(trim($room)));

$q_letters_in = @mysql_query("select count(*) from `".$px.$ltable."` where `to_user`='".$login['login']."' and ci='".$ci."' and `new`=1;");
$num_in=@mysql_fetch_array($q_letters_in);
$pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='$room' and ci= '$ci';");

$pdc = @mysql_fetch_array($pr_count);

$q_letters_in = @mysql_query("select count(*) from `".$px.$ltable."` where `to_user`='".$login['login']."' and ci='".$ci."' and `new`=1;");
$num_in=@mysql_fetch_array($q_letters_in);
$pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='$room' and ci= '$ci';");

if(
$mod=="privat")
print 
'<card id="main" title="'.$settings['val2'].'-('.$pdc['count(*)'].')" ontimer="sroom.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;mod=privat&amp;r='.$r.'"><timer value="'.$time_update.'"/>';
else
if (
$room == "intim"){     print '<card id="main" title="&#1048;&#1085;&#1090;&#1080;&#1084; -('.$pdc['count(*)'].')" ontimer="sroom.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;key='.$key.'&amp;room='.$room.'&amp;r='.$r.'"><timer value="'.$time_update.'"/>';
    }else{
print 
'<card id="main" title="'.$settings['val2'].'-('.$pdc['count(*)'].')" ontimer="sroom.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;r='.$r.'"><timer value="'.$time_update.'"/>';
}
if (
$login['sftwhr'] == "1")
print 
'<do type="options" name="whowhere" label="&#1050;&#1090;&#1086;?&#1043;&#1076;&#1077;?"><go href="online.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;r='.$r.'" method="get"/></do>';
if (
$login['sftltrs'] == "1")
print 
'<do type="options" name="letters" label="&#1055;&#1080;&#1089;&#1100;&#1084;&#1072;('.$num_in['count(*)'].')"><go href="letters/inbox.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;r='.$r.'" method="get"/></do>';
if ((
$login['sfthr'] == "1") and ($room !== "intim"))
print 
'<do type="options" name="whohere" label="&#1050;&#1090;&#1086; &#1079;&#1076;&#1077;&#1089;&#1100;('.$pdc['count(*)'].')"><go href="here.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;r='.$r.'" method="get"/></do>';
if (
$login['sftsay'] == "1")
print 
'<do type="options" name="say" label="&#1054;&#1073;&#1085;&#1086;&#1074;&#1080;&#1090;&#1100;"><go href="sroom.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;r='.$r.'" method="get"/></do>';
if (
$login['sftref'] == "1")
print 
'<do type="options" name="refresh" label="&#1057;&#1082;&#1072;&#1079;&#1072;&#1090;&#1100;"><go href="#say" method="get"/></do>';
if ((
$room !== "intim") and ($login['sftpriv'] == "1")) print '<do type="options" name="privat"  label="'.$lang['privat'].'"><go href="./sroom.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;mod=privat&amp;r='.$r.'" method="get"/></do>';
if (
$room == "intim") print '<do type="options" name="changekey"  label="&#1057;&#1084;&#1077;&#1085;&#1080;&#1090;&#1100; &#1082;&#1083;&#1102;&#1095;"><go href="./intim.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room=intim" method="get"/></do>';
if (
$room=="vict") print '<do type="options" name="stats" label="&#1058;&#1086;&#1087; 10"><go href="statistic.php?s='.$s.'&amp;ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$room.'&amp;mod=stats&amp;r='.$r.'" method="get"/></do>';
$pdc = @mysql_fetch_array($pr_count);
if(
$mod=="privat")
print 
"<title>".$lang['sort']."  (".$pdc['count(*)'].")</title><meta http-equiv="Content-Type" content="text/htmlcharset=utf-8"><link rel="StyleSheet" type="text/css" href="style/0".$s.".css"></head><body>";
else
print 
"<title>".$lang['sort']." (".$pdc['count(*)'].")</title><meta http-equiv="Content-Type" content="text/htmlcharset=utf-8"><link rel="StyleSheet" type="text/css" href="style/0".$s.".css"></head><body>";
print 
"<meta http-equiv="refresh" content=".$time_update.";url=./sroom.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=".$room."></a>";
print 
'<p>';

$posts $login['posts'];
$moder $login['moder'];
$admin $login['admin'];
$ltime $login['ltime'];
$ban $login['ban'];
$btime $login['btime'];
$breason $login['breason'];

if(
$login) {
    if(!empty(
$room)) {

    if(!empty(
$private)) $pr explode(".",$private);

    if(
$room=="vict")
    
$query_msg = @mysql_query("select * from `".$px.$vtable."` where ci='".$ci."' and login='".$login['login']."' order by id desc;");
    else
    
$query_msg = @mysql_query("select * from `".$px.$mtable."` where ci='".$ci."' and login='".$login['login']."' order by id desc;");
    if(
$room=="intim")
    
$query_msg = @mysql_query("select * from `".$px.$prtable."` where ci='".$ci."' and login='".$login['login']."' and key='$key' order by id desc;");
    if(
$room=="unlim")
    
$query_msg = @mysql_query("select * from `".$px.$untable."` where ci='".$ci."' and login='".$login['login']."' order by id desc;");
    
$prevmsg = @mysql_fetch_array($query_msg);

    if(
$ban == "kill")
    print 
$lang['you_are_killed'];

    elseif(!empty(
$ban)) {
    if(
$btime >= time()) {
    
$enter $btime time();
    print 
"<b>$ban ".$lang['kick_you'].$lang['reason'].": $breason! ".$lang['unban']."<u>".$enter."</u>".$lang['s']."!</b><br/>";
    } else {
    @
mysql_query("update `".$px.$utable."` set ban='', btime='', breason='' where id='".$id."' and ci='$ci';");
    require 
"./sroom.inc.php"; }
    } else {
    @
mysql_query("update `".$px.$utable."` set ltime='".time()."', room='".$room."' where id='".$id."' and ci='$ci';");

    if(
$translit=="user") { $nik=strtok($msg," "); $msg=strstr($msg," "); $msg=latrus($msg); $msg=$nik.$msg; }
    if(
$translit=="toall") { $msg=latrus($msg); }
    
$msg=htmlspecialchars(stripslashes(trim($msg)));
    if(
$login['moder'] && $bold$msg "<b>".$msg."</b>";
    if(
$login['moder'] && $small$msg "<small>".$msg."</small>";
    if(
$login['moder'] && $underline$msg "<u>".$msg."</u>";
    if(
$login['moder'] && $big$msg "<big>".$msg."</big>";
    if(
$login['admin'] && $superbig$msg "<big><big>".$msg."</big></big>";
    if(
$login['admin'] && $blink$msg "<blink>".$msg."</blink>";
    if(
$login && $color$msg "<span style="color:$color;">".$msg."</span>";
    if(
$login && $emotions$msg "$emotions".$msg."";
    include 
"./sm/convert_to_smiles.php";
    if(!empty(
$msg) && $msg!=$prevmsg['msg']) {

    if(
$room=="vict")
    {@
mysql_query("insert into `".$px.$vtable."` values(0,'".$login['login']."','$msg','".$pr[0]."','".$pr[1]."','','','".time()."','$ci');");}
    if(
$room=="unlim")
    {@
mysql_query("insert into `".$px.$untable."` values(0,'".$login['login']."','$msg','".$pr[0]."','".$pr[1]."','".time()."','$ci');");}
    if(
$room=="intim")
    {@
mysql_query("insert into `".$px.$prtable."` values(0,'".$login['login']."','$msg','$key','".time()."','$ci');");}
    if ((
$room !== "vict") and ($room !== "intim") and ($room !== "unlim"))
    {@
mysql_query("insert into `".$px.$mtable."` values(0,'".$login['login']."','$msg','".$pr[0]."','".$pr[1]."','".time()."','$room','$ci');");
    }
    @
mysql_query("update `".$px.$utable."` set posts='".++$posts."', ltime='".time()."' where id='".$id."' and ci='$ci';"); }

    if(
$room=="vict") include "./vict.inc.php";

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

    print 
$fsize1;
    include 
"./sroom.inc.php";
    print 
$fsize2;
        }     } else { print 
$lang['room_not_exist']; }
    } else { print 
$lang['not_loged']; }

@
mysql_close();
$end gettime();

print 
"</div></div><div class="contur_rek"><div class="header_rek"><a href="./shistory.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass&amp;room=$room&amp;start=$num_msgs&amp;r=$r">".$lang['history']."</a>";
print 
" | <a href="./ignor.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass">".$lang['ignor']."</a>";
print 
" | <a href="./enter.php?s=$s&amp;ci=$ci&amp;id=$id&amp;pass=$pass">&#1055;&#1088;&#1080;&#1093;&#1086;&#1078;&#1072;&#1103;</a></div></div>";
print 
"<small>Speed ".round(($end $start), 5)." sec";

print 
'</small></div></body></html>';
?>
Онлайн: 0
Реклама