Размер файла: 1.26Kb
<?php
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/verh.dat");
if (isset($_GET['start'])){$start = (int)$_GET['start'];} else {$start = 0;}
show_title('Новости');
if (is_admin(array(101,102))){
echo'<a href="'.ADMINDIR.'news.php">Адм</a><br>';
}
$file = file(DATADIR."news.dat");
$file = array_reverse($file);
$total = count($file);
if ($total>0){
if ($start < 0 || $start > $total){$start = 0;}
if ($total < $start + $config['postnews']){ $end = $total; }
else {$end = $start + $config['postnews']; }
for ($i = $start; $i < $end; $i++){
$data = explode("|",$file[$i]);
echo'<div class="b">';
echo'<b>'.$data[0].'</b><small> ('.date_fixed($data[3]).')</small></div>';
echo'<div>'.bb_code($data[1]).'<br>';
echo'</div>';
}
page_jumpnavigation('index.php?', $config['postnews'], $start, $total);
page_strnavigation('index.php?', $config['postnews'], $start, $total);
} else {show_error('Новостей еще нет!');}
echo'<br><br><a href="rss.php">RSS подписка</a><br>';
echo'<img src="'.BASEDIR.'images/home.svg" alt="+">
<a href="../index.php">Главъ</a>';
include_once ("../themes/".$config['themes']."/niz.dat");
?>