File size: 2.9Kb
<?php
// Уведомление о закрытии форума
if ($system['forum_module'] == '2' && !user_access('view_closed_modules')) {
# Шапка модуля
require_once(HOME .'/incfiles/header.php');
echo '<div class="title">Технические работы</div>
<div class="menu">
'. output($system['forum_module_about']) .'
</div>';
echo '<div class="block">
» <a href="/">На главную</a>
</div>';
# Ноги модуля
require_once(HOME .'/incfiles/footer.php');
}
# Шапка модуля
require_once(HOME .'/incfiles/header.php');
error($err);
echo '<div class="title">Новые темы</div>';
# Кол-во новостей
$k_new_themes = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` WHERE `theme` != '' AND `theme_id` = '1' AND `time` > '". (time()-3600*12) ."'". (isset($user)?" AND `user_id` != '". $user['id'] ."'":NULL) ." ORDER BY time DESC"), 0);
# Старт навигации
nav_start($k_new_themes, 10);
if ($k_new_themes == 0)
{
echo '<div class="menu">Тем за последние 12 часов нет.</div>';
}
else
{
$sql_new_themes = mysql_query("SELECT * FROM `forum_p` WHERE `theme` != '' AND `theme_id` = '1' AND `time` > '". (time()-3600*12) ."'". (isset($user)?" AND `user_id` != '". $user['id'] ."'":NULL) ." ORDER BY time DESC LIMIT $start, 10");
while ($theme = mysql_fetch_assoc($sql_new_themes))
{
$c = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` WHERE `t_id` = '". $theme['t_id'] ."'"), 0) - 1;
echo '<div class="menu">';
if ($theme['attach']) echo (isset($user) && $settings['img_site'] == 2?'[!]':'<img src="/design/icons/forum_tz.png" alt="!" /> ');
else if ($theme['closed'] == 1) echo (isset($user) && $settings['img_site'] == 2?'[#]':'<img src="/design/icons/forum_tc.png" alt="#" /> ');
else echo (isset($user) && $settings['img_site'] == 2?'[t]':'<img src="/design/icons/forum_t.png" alt="t" /> ');
$author_id = mysql_result(mysql_query("SELECT `user_id` FROM `forum_p` WHERE `t_id` = '$theme[t_id]' ORDER BY theme_id DESC LIMIT 1"), 0);
echo '<a href="/forum/topic.php?forum_t_id='. $theme['t_id'] .'">'. $theme['theme'] .'</a> ('. $c .') '. mysql_result(mysql_query("SELECT `nick` FROM `users` WHERE `id` = '$author_id'"), 0) .' <a href="/forum/topic.php?forum_t_id='. $theme['t_id'] .'&page=end">»</a>
</div>';
}
# Вывод навигации
view_nav();
}
echo '<div class="block">
» <a href="/news/index.php">К списку новостей</a><br />
» <a href="/">На главную</a>
</div>
<div class="block">
'. ($user['level'] >= 14?'» <a href="/news/admin_news.php">Управление новостями</a><br />':NULL) .'
</div>';
# Ноги модуля
require_once(HOME .'/incfiles/footer.php');
?>
?>