Размер файла: 1.14Kb
<?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))) {
echo'<a href="'.ADMINDIR.'news.php">Adm</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"><b>'.$data[0].'</b><small> ('.date_fixed($data[3]).')</small></div>';
echo'<div>'.bb_code($data[1]).'</div>';
}
page_jumpnavigation('index.php?', $config['postnews'], $start, $total);
page_strnavigation('index.php?', $config['postnews'], $start, $total);
} else {show_error('Новостей еще нет!');}
echo'<br><a href="../index.php">На главную</a>';
include_once ("../themes/".$config['themes']."/niz.dat");
?>