View file sdark.mobi/adm_root/search_ip.php

File size: 1.48Kb
<?
require_once '../core/system.php';
echo moder();
$header = 'Поиск по  IP';
require_once '../core/head.php';
$_GET['id'] = htmlspecialchars($_GET['id']);
echo'<div class="player"><form action="?search&id='.$_GET['id'].'"  method="post">Введите ip:<br/>
<input type="text" class="text-area" value="'.$_GET['id'].'" name="ip"/><input class="inpc-ar form-submit"  type="submit" value="Искать"/></form></div>';

if(isset($_GET['search'])){
$ips = check($_GET['id']);
 
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `ip` = '".$ips."' "),0);
$k_page = k_page($k_post,50);
$page = page($k_page);
$start = 50*$page-50;
$ips = mysql_query("SELECT * FROM `user` where `ip` = '".$ips."'  ORDER by `datareg` DESC LIMIT $start, 50 ");
$kol = mysql_num_rows($ips);
while($ip = mysql_fetch_array($ips)){
echo '<div class="player" style = "color: #d3e2ed;">';

echo online($ip['id']);
echo ' <a href="/user/?id='.$ip['id'].'"><font color="'.$ip['font'].'">'.$ip['nick'].'</font></a>, '.$ip['level'].' ур. ['.vremja($ip['online']).'] <a href="/moder/ban.php?id='.$ip['id'].'"><font color="orange">БАН</font></a>';
echo "</div>";
}
if ($k_page>1){
echo "<div class='dot-line'></div>";
str('?search&id='.$_GET['id'].'&',$k_page,$page); // Вывод страниц
}
if($kol>0){
echo"<div class='line'></div><div class='foot'><a href='/adm_root/banip.php?id=".$_POST['ip']."'><img src='/images/icon/error.png'> Забанить IP</a></div>";
}}
require_once '../core/foot.php';
?>