File size: 6.68Kb
<?php
///////////////////////////////////////
include "./pteam.php";
$id_nick2= $_GET['nick'];
$query45 = "SELECT * FROM bannedib WHERE login='$id_nick2' limit 1";
$result14 = mysql_query($query45) or die(mysql_error());
if (mysql_num_rows($result14) !== 0)
{
$expire=time()+60*60*24*6;
// time()+60*60*24*30 will set the cookie to expire in 30 days. If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes).//
setcookie("inactive", "inactive", "$expire");
}
else
{
session_start();
$_SESSION['csskey'] = "hello";
$expire=time()+60*60*24*15;
// time()+60*60*24*30 will set the cookie to expire in 30 days. If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes).//
setcookie("active", "active", "$expire");
}
$online = mysql_fetch_array(mysql_query("SELECT COUNT(`id`) FROM chat_users WHERE ltime>'".intval(time()-$offline)."'"));
$TimeZone="11.50";
$New_Time = time() + ($TimeZone * 60 * 60);
$_time=date("H:i",$New_Time);
///////////////////////////////////////
echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">';
echo "<html>";
echo "<head>";
$r = rand(0,100000);
if($RF=="") echo "<meta http-equiv=\"refresh\" content=\"60;url=./chat.php?nick=$nick&room=$room&r=".$r."&RF=$RM\"/>";
$start = gettime();
$login = autorize();
$head = mysql_fetch_array(mysql_query("SELECT `head` FROM `".$px.$stable."` where room='$room'"));
$num_msgs=18;
$time_update=300;
$w = $login['warn'];
$timenow = strftime("%H:%M");
$room=htmlspecialchars(stripslashes(trim($room)));
$hco = mysql_fetch_array(mysql_query("SELECT COUNT(`id`) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='$room'"));
echo "<title>$head[0]-($hco[0])</title>";
echo'<link rel="stylesheet" href="style.css" type="text/css"/>';
echo"<link rel='shortcut icon' href='fevicon.ico' />";
echo'</head>';
echo'<body>';
echo"<div class='logo2' align='center'>$head[0] [$hco[0]]</div>";
/////////////idblock sytem star/////////////////
$login = autorize();
if($login) {
$id_nick= $_GET['nick'];
$query45 = "SELECT * FROM bannedib WHERE login='$id_nick' limit 1";
$result14 = mysql_query($query45) or die(mysql_error());
while($row = mysql_fetch_array($result14)){
$mid1="{$row['mid']}";
$ip1="{$row['ip']}";
$browser1="{$row['browser']}";
$login1="{$row['login']}";
}
$check2 = mysql_num_rows($result14);
if (mysql_num_rows($result14) !== 0)
{
echo" <div class='errnotice'><b>Nick Name: $id_nick of IP: $ip BLOCKED FOR 6 DAYS DUE TO ABUSING AND SPAMING!!</b></div>";
echo"<br/>";
echo"<br/>";
echo"<div class='ptn'><a href='index.php'>< Home</a></div>";
$sql24 = "delete FROM chat_messages WHERE login = '$id_nick'";
$result = mysql_query($sql24);
}
else
{
///////////idblock sytem end////////////////////
///////////////////ip block system start////////////////////////////
$id_nick= $_GET['nick'];
$query46 = "SELECT * FROM `".$px.$utable."` WHERE nick='$id_nick' limit 1";
$result15 = mysql_query($query46) or die(mysql_error());
while($row = mysql_fetch_array($result15)){
$ip3="{$row['ip']}";
}
$query47 = "SELECT * FROM bannedib WHERE ip='$ip3' limit 1";
$result16 = mysql_query($query47) or die(mysql_error());
while($row = mysql_fetch_array($result16)){
$ip4="{$row['ip']}";
$browser1="{$row['browser']}";
$login1="{$row['login']}";
}
$check3 = mysql_num_rows($result16);
if (mysql_num_rows($result16) !== 0)
{
echo"<div class='errnotice'> <b>Nick Name: $id_nick of IP: $ip BLOCKED FOR 6 DAYS DUE TO ABUSING AND SPAMING!!</b></div>";
echo"<br/>";
$sql23 = "delete FROM `".$px.$mtable."` WHERE login = '$id_nick'";
$result = mysql_query($sql23);
echo"<br/>";
echo"<div class='ptn'><a href='index.php'>< Home</a></div>";
}
else
{
///////////////////ip block system end////////////////////////////
@mysql_query("DELETE FROM `".$px.$mtable."` WHERE `time` < ".(time() + (11.50 * 60 * 60) - 1*1*86400).";");
if($login) {
if(!empty($room)) {
$query_msg = @mysql_query("select * from `".$px.$mtable."` where login='".$login['nick']."' order by id desc;");
$prevmsg = @mysql_fetch_array($query_msg);
@mysql_query("update `".$px.$utable."` set ltime='".time()."', room='".$room."' where nick='".$nick."';");
$mms=htmlspecialchars(stripslashes(trim($mms)));
$nik="";
$spm = $mms;
$getwords = mysql_query("SELECT word FROM chat_spam");
while ($row = mysql_fetch_array($getwords))
{
$sfil[] = $row[0];
}
$msg = strtolower($mms);
for($i=0;$i<count($sfil);$i++)
{
$check = stristr($mms,$sfil[$i]);
if($check != false)
{
$t=$w+1;
@mysql_query("update `".$px.$utable."` set warn='".$t."' where nick='".$nick."' and ci='$ci';");
$mms = 'Stop SPAMMING !!! next tym ur nick ll be Logged out..!!!<img
src=\"sm/smiles/warning.gif\" alt=\"*\"/>';
$name = $login['id'];
$nik="Warning to ";
}
}
$moo = $mms;
////////////////////////////////////////////
include "./sm/convert_to_smiles2.php";
include "./lol.php";
/////post delete system start/////
$time=time();
$query2a = "SELECT * FROM `".$px.$mtable."` WHERE login='$id_nick' ORDER BY id DESC limit 1";
$result2a = mysql_query($query2a) or die(mysql_error());
if (mysql_num_rows($result2a) == 0)
{
$lastmstime22=time();
$msgtm3=(60*60);
$lastmstime="$lastmstime22";
$newusr="1";
}
else
{
while($row = mysql_fetch_array($result2a)){
$lastmsgid="{$row['id']}";
$lastmsuser="{$row['login']}";
$lastmstime="{$row['time']}";
$msg2="{$row['msg']}";
$newusr="0";
}
}
$simtime2=time();
$newtime2=(time() + (13.50 * 60 * 60));
$msgtime2=($msgtime*60*60);
$counttime=($lastmstime+$msgtime);
/////post delete system end/////
if(!empty($mms) && $mms!=$prevmsg['msg']) {
if($newtime2>"$counttime")
{
@mysql_query("insert into `".$px.$mtable."` values(0,'".$nik."".$login['nick']."','','$mms','".$login['c']."','".$name."','".(time() + (13.50 * 60 * 60))."','$room','$ci');");
}
@mysql_query("update `".$px.$utable."` set ltime='".time()."' where nick='".$nick."';");}
include "./room.inc.php";
} else { echo "<b>Room Not Exist !!!</b>"; }}}}
} else { print "Must use your main mobile browser to avoid this massage. Sorry!!! Some One Already Using This Nick Plz Try Any Diffrent Nick<br />
<a href=\"index.php\">Re Enter</a><br />"; }
@mysql_close();
$end = gettime();
echo"<div class='pw' align='center'>© $sitename 2012</div>";
echo "</body>";
echo "</html>";
?>