Файл: forum/apa-topic.php
Строк: 34
<?
include_once('../apahe/ini.php');
$urlup='/forum/index';
$inc['title'] = 'Форум - мои темы';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
$forum_s = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum-s` WHERE `id` = '1'"));
echo '<div class="main-text">';
echo '<a href="index.dll" title="Форум">Форум</a>';
echo '</div>';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum-u` WHERE `id-apache` = '".$apache['id']."'"), 0);
nav_start($total, $forum_s[tf]);
if ($total!=0){
$forum_u_c = mysql_query("SELECT * FROM `forum-u` WHERE `id-apache` = '".$apache['id']."' ORDER BY `last` LIMIT $start, $forum_s[tf]");
while ($forum_u = mysql_fetch_assoc($forum_u_c)){
$f_m = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum-m` WHERE `id-forum-u` = '".int($forum_u['id'])."'"), 0);
$f_m_n = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum-m` WHERE `id-forum-u` = '".int($forum_u['id'])."' and `date` > '".(time()-86400)."'"), 0);
$f_m_t = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum-m` WHERE `id-forum-u` = '".int($forum_u['id'])."' ORDER BY `id` DESC LIMIT 1"));
$l_p = ceil($forum_m/$forum_s[tm]);
echo '<div class="main-href">';
echo '<table width="100%" cellspacing="0" cellpadding="0">';
echo '<tr><td class="apa-l">';
echo '<a href="topic-'.int($forum_u['id']).'.dll?page='.$l_p.'" title="'.$forum_u['name'].'">';
icons('topic-'.int($forum_u['act']).'');
echo ''.$forum_u['name'].'';
echo '</td>';
echo '<td class="apa-r">';
echo '<time>'.$f_m.'';
if ($f_m_n!=0)echo '<new>+'.$f_m_n.'</new>';
echo '</time>';
echo '</td></tr>';
echo '</table>';
echo 'Последний: '.name($f_m_t['id-apache']).'</br>';
echo '</div>';
}}else{
error('Новые темы еще не создавались.');
}
view_nav('/forum/apa-topic.dll?');
include_once('../apahe/bottom.php');
?>