Вход Регистрация
Файл: blog_ecsx/search.php
Строк: 13
<?php
/*

** TJCompany
** Delovoper: TJersy
** Date: 11.2014

*/


$title = ('Поиск статей');

require_once(
'private.files/core.file.php');

require_once(
'private.files/head.file.php');


if(isset(
$_POST['post'])){

$post text($_POST['text']);

$sql $db->query("SELECT * FROM `articles` WHERE `theme` like '%".$post."%' ");

if(empty(
$post)){ 
msg('Поле ввода пустое');
require_once(
'private.files/foot.file.php');
exit();
}

if(
$sql->num_rows != '0'){

echo 
'<div class="complate"> По запросу "'.text($post).'" найдено '.$sql->num_rows.' статей: </div>';

$i '1';
while(
$a $sql->fetch_assoc()){

echo 
'<div class="name">'.$i.'.'.$a['theme'].'</div>

<div class="wrap">'
.$a['text'].'<br/> <br/>  

<img src="/design.files/time.png"> Время публикации: '
.timer($a['time']).' <br/> <img src="/design.files/views.png"> Просмотры: '.$a['views'].

 <a href="/post/'
.$a['id'].'/">Читать полностью »</a></div>';

$i++;
}

}else{

msg('Статей не найдено');

}
}

require_once(
'private.files/foot.file.php');

?>
Онлайн: 2
Реклама