Файл: vk.com_vhllam/forum/inc/razdel.php
Строк: 54
<?
err();
aut();
echo "<div class ='kabinet'><img src='/style/images/forums.xhata.png' alt='' class='xhata'/> <a href='/forum/'>Форум</a> | <a href='/forum/$forum[id]/' title='В подфорум'>$forum[name]</a> | <a href='/forum/$forum[id]/$razdel[id]/' title='В раздел'>$razdel[name]</a></div>";
if (isset($user) && (!isset($_SESSION['time_c_t_forum']) || $_SESSION['time_c_t_forum']<$time-600 || $user['level']>0))
{
echo '<div class="cont">';
echo '<img src="/style/icons/add.png" alt="*"> <a href="/forum/' . $forum['id'] . '/' . $razdel['id'] . '/?act=new" title="Создать новую тему">Новая тема</a><br />';
echo '</div>';
}
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_t` WHERE `id_forum` = '$forum[id]' AND `id_razdel` = '$razdel[id]'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
echo '<table class="post">';
$q=mysql_query("SELECT * FROM `forum_t` WHERE `id_forum` = '$forum[id]' AND `id_razdel` = '$razdel[id]' ORDER BY `up` DESC,`time` DESC LIMIT $start, $set[p_str]");
if (mysql_num_rows($q)==0)
{
echo '<div class="err">';
echo 'Нет тем в разделе "' . htmlspecialchars($razdel['name']);
echo '</div>';
}
while ($them = mysql_fetch_assoc($q))
{
/*-----------зебра-----------*/
if ($num == 0)
{
echo '<div class="x1">';
$num = 1;
}
elseif ($num == 1)
{
echo '<div class="x2">';
$num = 0;
}
/*---------------------------*/
echo "<img src='/style/themes/$set[set_them]/forum/14/them_$them[up]$them[close].png' alt='ENK' /> ";
echo "<a href='/forum/$forum[id]/$razdel[id]/$them[id]/'>$them[name]</a> <a href='/forum/$forum[id]/$razdel[id]/$them[id]/?page=end'>[<font color='green'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` WHERE `id_forum` = '$forum[id]' AND `id_razdel` = '$razdel[id]' AND `id_them` = '$them[id]'"),0)."</font> сообщ.] </a><br />n";
$post1=mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_p` WHERE `id_them` = '$them[id]' AND `id_razdel` = '$razdel[id]' AND `id_forum` = '$forum[id]' ORDER BY `time` ASC LIMIT 1"));
$ank=get_user($post1['id_user']);
echo "[<a href='/info.php?id=$ank[id]' title='Анкета "$ank[nick]"'><span style="color:$ank[ncolor]">$ank[nick]</span></a>n";
$post2=mysql_fetch_assoc(mysql_query("SELECT * FROM `forum_p` WHERE `id_them` = '$them[id]' AND `id_razdel` = '$razdel[id]' AND `id_forum` = '$forum[id]' ORDER BY `time` DESC LIMIT 1"));
$ank2=get_user($post2['id_user']);
echo "| <a href='/info.php?id=$ank2[id]' title='Анкета "$ank2[nick]"'><span style="color:$ank[ncolor]">$ank2[nick]</span></a>]</br>[Посл:<font color='green'>".vremja($post2['time'])."</font>]<br />n";
echo "</div>n";
}
echo "<div class ='kabinet'><img src='/style/images/forums.xhata.png' alt='' class='xhata'/> <a href='/forum/'>Форум</a> | <a href='/forum/$forum[id]/' title='В подфорум'>$forum[name]</a> | <a href='/forum/$forum[id]/$razdel[id]/' title='В раздел'>$razdel[name]</a></div>";
if ($k_page>1)str("/forum/$forum[id]/$razdel[id]/?",$k_page,$page); // Вывод страниц
?>