Файл: panel/page/news.php
Строк: 21
<?php
require '../../system/sid.php';
require '../../system/config.php';
include '../../system/user.php';
include '../../system/head_n.php';
include '../../system/navigator.php';
whorm(0, 'news');
echo '<div class="logo">Новости</div>';
$look = mysql_result(mysql_query("SELECT COUNT(id) FROM `news`"), 0);
if ($look != false)
{
$n = new navigator($look, 5, '?');
$result = mysql_query("SELECT * FROM `news` ORDER BY `news`.`id` DESC LIMIT 5");
$i = 0;
while($sql = mysql_fetch_assoc($result))
{
echo ($i ++ % 2)? $div_tworazdel : $div_razdel;
echo '<div class="style"><div id="border"><div class="tag">'.$sql['name'].'<small> (' . date('d-m-Y H:i', $sql['date']) . ')</small></div>
<br>'.bb_code($sql['content']).'</div>';
}
echo $n->navi();
}
else
{
echo 'Новостей нет!<br>';
}
echo '<img src="../image/homepage.gif" alt="" /> <a href="../index.php?">В аккаунт</a><br />
</div>
<div style="float:right;"></div> <div class="v">© 2013</div>';
include '../../system/foot.php';
?>