$raztype = "newsmain";
$rub['arc'] = "Архив новостей";
include ('inc/top.inc');
$filename = "news.phtml";
$folder = "news";
$ID = split ("\.", $id);
$head = $ID[0];
$article = $ID[1];
$action = "";
function printhead ($header,$action,$head) {
echo "
Новости ресторанов >> ";
echo "$header";
echo "
";
}
if (!empty($rub[$head])) {
$path = "$folder";
if (!empty($article)) {
if (file_exists("$path/$article.txt")) {
$view = "$path/$article.txt";
$action = "article";
printhead ($rub[$head],$action,$head);
include("$view");
}
else {printhead ($rub[$head],$action,$head); include("$path/index.txt");$action = "head";}
}
else {printhead ($rub[$head],$action,$head); include("$path/index.txt");$action = "head";}
} // end if open head
elseif (!empty($file)) {
$nameh = 'Архив новостей';
include ("inc/nameh.inc");
nameh($nameh,'news.phtml','Архив новостей');
include ('inc/resinfo.inc');
include ('inc/res_news.inc');
include_once ('inc/tdforms.inc');
if ($res = raw2array('restoran','file',$file)) {
resinfo($res, $viewtype);
echo '';
include('inc/anons.inc');
include('inc/anonsb.inc');
echo ' |
';
$b = $_GET['b'];
settype($b,'integer');
show_resnews($res['file'],$b,'news');
} // if res
} // elseif file
else {
$nameh = 'Новости ресторанов';
include ("inc/nameh.inc");
nameh($nameh,'news.phtml','Новости ресторанов');
include('inc/anons.inc');
include('inc/anonsb.inc');
?>
$limit = 15;
include('inc/anews.inc');
//include ("news.txt");
//include ("news-month.txt");
include ("$folder/index.txt");
$action = "main";
}
include ('inc/bottom.inc');
?>