File size: 1.3Kb
<?php
###################################################
# Скрипт портфолио #
# Версия системы: 1.0 #
# Автор: RonsoN #
# ICQ: 7-191-321 #
# Email: [email protected] #
###################################################
$system['page_title'] = 'Новости';
require_once(HOME .'/system/header.php');
echo '<div class="menu">Новости</div>';
$news_n = $db->query("SELECT * FROM `news`")->rowCount();
if($news_n == 0) {
echo '<div class="main"><div class="error">Новостей нет!</div></div>';
} else {
$objects = $system['objects'];
nav_start($news_n, $objects);
$news_sql = $db->query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT $start, $objects ");
while($news = $news_sql->fetch()) {
echo '<div class="main">'.NEWS.''.$news['title'].' [<a href="/news/inc/edit/'.$news['id'].'.xhtml">Изм.</a> | <a href="/news/inc/delete/'.$news['id'].'.xhtml">Удал.</a>]</div>';
}
view_nav(URL.'/panel/news.xhtml/');
}
echo '<div class="navi">
'.NAVI .'<a href="/news/inc/add_news.xhtml">Добавить новость</a><br/>
'.INDEX.'<a href="/">Главная</a>
</div>';
require_once(HOME.'/system/footer.php');
?>