EngineGP/system/engine/index.php
Sergei Solovev b59003e559 Reformat code
This update contains code reformatting to meet PHP standards.
2023-11-12 21:12:42 +03:00

26 lines
No EOL
805 B
PHP

<?php
if (!DEFINED('EGP'))
exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
$title = 'Главная страница';
$html->nav($title);
$sql->query('SELECT `id`, `name`, `text`, `views`, `tags`, `date` FROM `news` ORDER BY `id` DESC LIMIT 3');
while ($news = $sql->get()) {
$html->get('list', 'sections/news');
$html->set('id', $news['id']);
$html->set('name', htmlspecialchars_decode($news['name']));
$html->set('text', htmlspecialchars_decode($news['text']));
$html->set('views', $news['views']);
$html->set('tags', sys::tags($news['tags']));
$html->set('date', sys::today($news['date']));
$html->pack('news');
}
$html->get('index');
$html->set('news', isset($html->arr['news']) ? $html->arr['news'] : '');
$html->pack('main');
?>