<?php
require_once('../classes/body.class.php');
require_once('../classes/db.class.php');
require_once('../classes/system.class.php');
$title= new Body;
$title->SetTitle('Панель управления - Поиск по IP');

///Подключаем шапку
$title->GetHeader();
if ($b['level'] == 0) {
header('location:/');
die();
}
echo '<div class="container-fluid page_header"><div class="container"><div class="row"><div class="col-xs-12 col-sm-8 col-md-9 col-lg-9"><h1>Поиск по IP </h1><ol class="breadcrumb" xmlns:v="http://'.homeurl.'/#"><li typeof="v:Breadcrumb"><a href="/" rel="v:url" property="v:title">'.homeurl.'</a></li><li typeof="v:Breadcrumb"><a href="/panel" rel="v:url" property="v:title">Дата-центр</a></li><li class="active" typeof="v:Breadcrumb"><span property="v:title">Поиск по IP</span></li></ol></div></div></div></div>';
echo'<div class="container page_body"><div class="row"><div class="col-xs-12 page_content col-lg-9"><div class="navbar page_content_navbar collapse hidden-lg"><div class="container-fluid"><div class="navbar-collapse"></div></div></div><div class="text_box hidden-lg pr_block_small hidden"></div><div class="container-fluid cols_table">';
echo '<div class="catSides"><a href="/panel"><i class="md-format-list-bulleted"></i> Админка</a> - Поиск по IP</div>';
if (isset($_POST['ok'])) {
$ip = check($_POST['ip']);
$s = DB::$dbs->query("SELECT id,soft FROM blogger WHERE ip = ? ORDER BY id DESC", [$ip]);
if (empty($ip)) {
err('Не введен IP!');
}
elseif ($s -> rowCount() == false) {
err('Результат: не найдено.');
}
else
{
echo '<div class="row text_box">IP: <b>'.$ip.'</b></div>';
$c = 1;
while($a = $s -> fetch())
{

echo '<div class="row text_box">'.$c++ . ') ' . Nick($a['id']) . '<br/>Soft: '.$a['soft'].'</div>';
}
}
}
echo '<div class="row text_box"><form action="?" method="post">IP:<br/><input type="text" class="form-control" name="ip"/><br/><input class="btn btn-primary" type="submit" name="ok" value="Искать редиску"/></form></div>';

///Подключаем меню
$title->GetMenu();


///Подключаем футер
$title->GetFooter();
?>