Файл: gamele.ru/gameplay/ajax/pinfo_pvu.php
Строк: 162
<?php
session_start();
include($_SERVER["DOCUMENT_ROOT"]."/includes/config.inc.php");
include(DROOT."/includes/functions.php");
$WatchUser = GetUser();
if(in_array($_GET['hash'],$_SESSION['PVUcode'])){
unset($_SESSION['PVUcode']);
switch($_GET['see']){
case'1':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='1' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'2':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='2' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'4':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='4' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'8':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='8' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
/*
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
*/
echo"0|1|2|3|4|5|6|7|8|9::";
echo $result;
break;
case'16':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='16' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'32':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='32' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'64':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='64' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'128':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='128' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'256':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='256' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'256':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='256' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'512':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='512' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'2048':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='2048' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'4096':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='4096' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
$ip='';
$login='';
while($row = mysql_fetch_array($query)){
if($ip != $row['ip']){
$ip=$row['ip'];
$oneip = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid` != '".intval($_GET['puid'])."' and `see`='1' and `ip` = '".$ip."'");
if(mysql_num_rows($oneip)>0){
while($newrow = mysql_fetch_array($oneip)){
$User_Get = GetUserFID($newrow['uid'],1);
$User_Get['prison'] = explode("|",$User_Get['prison']);
$Block = (($User_Get['block'])?'2':(($User_Get['prison'][0]>time())?'1':''));
$result .= date("Y-m-d H:i:s",$row['time_unix']).'|'.$Block.'|'.$newrow['ip'].'|'.$User_Get['login'].'|'.$newrow['Browser'].'::';
}
}
}
}
echo $result;
break;
case'8192':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='8192' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
case'16384':
$query = mysql_query("SELECT * FROM `pvu_logs` WHERE `uid`='".intval($_GET['puid'])."' and `see`='16384' and `time_norm`>='".htmlspecialchars($_GET['date_f'])."' and `time_norm`<='".htmlspecialchars($_GET['date_t'])."' ORDER BY `id` DESC");
$result = 'OK::1::'.pinfo_PVU().'::';
while($row = mysql_fetch_array($query)){
$result .= date("Y-m-d H:i:s",$row['time_unix']).$row['reason'].'::';
}
echo $result;
break;
}
}
?>