File size: 2.49Kb
<?
#-----------------------------------------------#
# Аuthor: Nu3oN #
# ICQ : 100-50-97 #
#-----------------------------------------------#
require_once ('../includes/start.php');
require_once ('../includes/functions.php');
require_once ('../includes/header.php');
require_once ('distribution/db.php');
require_once ('distribution/fnc.php');
include_once ('../themes/'.$config['themes'].'/index.php');
show_title('partners.gif', 'Блоги / Поиск по ключу');
$key = check(rawurldecode(base64_decode(str_replace('&?&', '%', $_GET['key_teg']))));
if (isset($key) && $key != null)
{
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `directly_blogs` WHERE `key_blog_categories` LIKE '%".$key."%'"), 0);
if ($start > $total) $start = false;
if ($total < $start + $config['navig_blog']) $end = $total;
else $end = $start + $config['navig_blog'];
$search_ht = mysql_query("SELECT * FROM `directly_blogs` WHERE `key_blog_categories` LIKE '%".$key."%' ORDER BY `id` DESC LIMIT ".$start.",".$config['navig_blog']."");
if (@mysql_num_rows($search_ht))
{
while ($search = mysql_fetch_array($search_ht)):
echo '<div class="b"><img src="images/blg.gif" alt="" />
<a href="index.php?do=blog&id='.$search['id'].'&"><b>'.$search['name_blog_categories'].'</b></a>
</div>
<div>Просмотров: '.$search['read_blog_categories'].'<br />
Комментариев: '.mysql_result(mysql_query("SELECT COUNT(*) FROM `blog_comments` WHERE `id_blog` = '".$search['id']."'"),0).'<br />
Добавил: <b>'.nickname($search['author_blog_categories']).'</b> ('.date_fixed($search['time_blog_categories']).')
</div>'; endwhile;
if ($total > $config['navig_blog'])
{
page_jumpnavigation('search_key.php?key_teg='.$_GET['key_teg'].'&', $config['navig_blog'], $start, $total);
page_strnavigation('search_key.php?key_teg='.$_GET['key_teg'].'&', $config['navig_blog'], $start, $total);
}
}
else
{
echo '<div class="b"><b> Блогов с таким ключем не найдено! </div>';
}
}
else
{
echo '<div class="b"><b> Ошибка! Пустой ключ! </b><br /> Вы не ввели ключ </div>';
}
echo '<br /><img src="../images/img/back.gif" alt="Image" /> <a href="index.php?'.SID.'">В блоги</a><br />
<img src="../images/img/homepage.gif" alt="Image" /> <a href="../index.php?'.SID.'">На главную</a>';
include_once ('../themes/'.$config['themes'].'/foot.php');
?>