Файл: sys/inc/news_main.php
Строк: 24
<?
$q = mysql_query("SELECT * FROM `news` WHERE `main_time` > '".time()."' ORDER BY `id` DESC LIMIT 1");
if (mysql_num_rows($q) == 1 && !$set['web'] && $user['news_read'] == 0)
{
$news = mysql_fetch_assoc($q);
echo '<div class="mess">';
echo '<div style="box-shadow: none; border: 1px solid #bed2a8;" class="gmenu">';
echo '<i class="fas fa-bullhorn"></i> <a href="/news/news.php?id=' . $news['id'] . '">' . text($news['title']) . '</a>';
if (isset($user))
echo '<span style="float:right;"><a href="?news_read"><i class="fas fa-times-circle"></i></a></span>';
echo '<p>' .output_text($news['msg']) . '</p>';
if ($news['link']!=NULL)
echo '<a href="' .htmlentities($news['link'], ENT_QUOTES, 'UTF-8').'">Подробности</a><br />';
echo '<i class="far fa-clock"></i> Добавлено ' . vremja($news['time']) . '';
echo '</div>';
echo '</div>';
}
?>