Файл: test.masteram.us/forum/inc/razdel.php
Строк: 161
<?
err();
echo "<div class="menu_razd">n";
echo "<img src='/forum/Back.gif' alt=''/>n";
echo "<a href="/forum/">Форум</a> < n";
echo "<a href="/forum/$forum[id]/">$forum[name]</a><br />n";
echo "</div>n";
echo "<div class="tmn">n";
if (isset($user) && (!isset($_SESSION['time_c_t_forum']) || $_SESSION['time_c_t_forum']<$time-600 || $user['level']>0))
echo "<img src='/style/icons/plus.gif' alt=''/>n";
echo "<a href="/forum/$forum[id]/$razdel[id]/?act=new" title='Создать новую тему'>Новая тема</a><br />n";
echo "</div>n";
$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'>n";
$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 " <tr>n";
echo " <td class='p_t'>n";
echo "Нет тем в разделе "$razdel[name]"n";
echo " </td>n";
echo " </tr>n";
}
while ($them = mysql_fetch_assoc($q))
{
echo " <tr>n";
echo "</div>n";
if ($user['zebra_forum']==0)
{
if($num==1){
echo "<td class='linechat'>";
$num=0;
}else{
echo "<td class='linechat'>";
$num=1;}
}
if ($user['zebra_forum']==1)
{
if($num==1){
echo "<td class='forumwup'>";
$num=0;
}else{
echo "<td class='forumdiv'>";
$num=1;}
}
$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']);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]' AND `time` > '$time'"), 0)!=0)
echo "<font color='red'>[BAN]</font>n";
echo "<img src='/style/themes/$set[set_them]/forum/14/them_$them[up]$them[close].png' alt='' />";
echo " <a href='/forum/$forum[id]/$razdel[id]/$them[id]/'>$them[name]</a> n";
echo "(".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).") <a href='/forum/$forum[id]/$razdel[id]/$them[id]/?page=end'>»</a>n";
echo "".online($ank['id'])." <a href='/info.php?id=$ank[id]' title='Анкета "$ank[nick]"'><span style="color:$ank[ncolor]">$ank[nick]</span></a> n";
$ank1=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1"));
if ($ank['group_access']>1)echo "<img src='/img/online/$ank[pol].png'>n";
///if ($ank['group_access']>1)echo "<img src='/style/adm.png'>n";
if ($ank['status_vip']==1)echo " <img src='/status_vip/img/vip.gif'<br />";
if($ank['akt_rating']>=0 && $ank['akt_rating']<=1.000)echo " ";
if($ank['akt_rating']>=1.001 && $ank['akt_rating']<=2.500)echo " <img src='/style/rating/bronze.gif'></img> ";
if($ank['akt_rating']>=2.501 && $ank['akt_rating']<=5.000)echo " <img src='/style/rating/silver.gif'></img> ";
if($ank['akt_rating']>=5.001 && $ank['akt_rating']<=7.500)echo " <img src='/style/rating/gold.gif'></img> ";
if($ank['akt_rating']>=7.501 && $ank['akt_rating']<=10.000)echo " <img src='/style/rating/lafes_user.gif'></img> ";
if($ank['akt_rating']>=10.001 && $ank['akt_rating']<=200.000)echo " <img src='/rating/konkurs.png'></img> ";
if ($ank['stran']==0)echo "n";
if ($ank['stran']==1)echo "<img src='/style/strana/ru.png'>n";
if ($ank['stran']==2)echo "<img src='/style/strana/ua.png'>n";
if ($ank['stran']==3)echo "<img src='/style/strana/by.png'>n";
if ($ank['stran']==4)echo "<img src='/style/strana/az.png'>n";
if ($ank['stran']==5)echo "<img src='/style/strana/kz.png'>n";
if ($ank['stran']==6)echo "<img src='/style/strana/uz.png'>n";
if ($ank['stran']==7)echo "<img src='/style/strana/england.png'>n";
if ($ank['stran']==8)echo "<img src='/style/strana/de.png'>n";
echo "(".vremja($them['time_create']).")n";
echo "<br/>n";
//echo "<img src='/style/themes/$set[set_them]/forum/14/them_$them[up]$them[close].png' alt='' />";
//echo " <a href='/forum/$forum[id]/$razdel[id]/$them[id]/'>$them[name]</a> n";
////////////////////////////нЕ Много перековеркал))ничего страшного
//echo "(".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).") <a href='/forum/$forum[id]/$razdel[id]/$them[id]/?page=end'>»</a><br />n";
///////////////////////////////
}
echo "</table>n";
if ($k_page>1)str("/forum/$forum[id]/$razdel[id]/?",$k_page,$page); // Вывод страниц
echo "<div class="menu_razd">n";
echo "<img src='/forum/Back.gif' alt=''/>n";
echo "<a href="/forum/">Форум</a> < n";
echo "<a href="/forum/$forum[id]/">$forum[name]</a><br />n";
echo "</div>n";
?>