File size: 1.07Kb
<?php
$str_title = 'Новости';
if ($_GET['line'] == '')
echo '
<META HTTP-EQUIV="Refresh" CONTENT="1; URL=/">
';
else
{
echo '<a class="stroka" href="/">Главная</a>/Читать новость';
if (is_file($cms.'news/base.txt')) $post = @file($cms.'news/base.txt'); else echo 'Ошибка';
$count_post = count($post);
$j = trim($_GET['line']);
$fn = explode("|",$post[$j]);
if (count($post) > $j)
{
echo '
<table
style="width: 99%; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="text-align: left; vertical-align: top;"><div class="mess1"><div align="left">'.$fn[2].'</div><div align="right">'.$fn[0].'</div></div> <div class="mess2">'.$fn[1].'</div> </td>
</tr>
</tbody>
</table>
<br>
';
include_once($cms.'news/com_add.php');
include_once($cms.'news/coment.php');
}
else
{
echo '<div class="error">Запрошенная новость не существует.</div>';
}
}
?>