Файл: masteram_us/blogs/all_us.php
Строк: 17
<?php
require_once ('../shaxty.php');
check_login();
$title = 'Все блогеры';
$align = 'left';
include_once (H.'shaxty/head.php');
$k_post=mysql_result(mysql_query("select COUNT(*) from users where blogs > 0;"),0);
echo $div4.'<b>Все блогеры: '.$k_post.'</b>'.$div9;
echo '<dl></dl>';
if ($k_post == 0) {
echo "Блогеров пока нет<br/>";
} else {
if(!isset($user['id']))$user['max'] = 5;
$max = $user['max'];
$k_page=k_page($k_post,$max);
$page=page($k_page);
$start=$max*$page-$max;
$q2 = mysql_query("select * from `users` where blogs > 0 order by blogs desc limit $start, $max;");
$d==1;
while($a = mysql_fetch_array($q2)){
$d++;
if(is_integer($d / 2)) echo '<div class="second_name">'; else echo $div2;
$cat=mysql_fetch_array(mysql_query("select * from blogs where tip = 'cat' and `id` = '".$a['refid']."';"));
echo "<img src="img/cascade.png" alt=""/> <a href="us_blogs?id=".$a['id']."">".user($a['id'])."</a> (".mysql_result(mysql_query("select COUNT(*) from blogs WHERE tip = 'msg' and `user_id` = '".$a['id']."' and html = 0;"),0)." блогов)";
echo $div9.'<dl></dl>';
}
if ($k_page>1){
echo '<br /><dl><dt></dt></dl>';
str("?",$k_page,$page); // Вывод страниц
echo '<br /><dl><dt></dt></dl>';
}
}
echo '<br />';
echo $div1.'<a href="index.php">Блоги</a>'.$div9;
include_once (H.'shaxty/foot.php');
?>