View file wapnews/it/view.php

File size: 1.12Kb
<?php 
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
function myErrorHandler ($errno, $errstr, $errfile, $errline) {}
set_error_handler("myErrorHandler"); 
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);
extract($HTTP_SESSION_VARS);
include_once("../temp/header.php");
$sub=$_GET['sub'];
$news=$_GET['news'];
$news=$news-1;
$prevnews=$news-1;
$nextnews=$news+2;
$razdel="it";
$a=file("http://news.wep.ru/$razdel/$sub/$news.xhtml");

echo"<div class=b>Новости</div>";
$string=implode('<br/>',$a);
$a=explode(">Назад</a>",$string);
$string=$a[1];
$a=explode("<hr />",$string);
$string=$a[0];
echo"$string";
echo"<hr />&#187; <a href=\"view.php?sub=$sub&news=$prevnews\">Назад</a><br/>";
echo"&#187; <a href=\"view.php?sub=$sub&news=$nextnews\">Вперед</a>";
echo"<hr /><br />&#187; <a href=\"index.php?".SID."\"><font color=\"#FF0033\"> K разделам</font></a><br/>&#187; <a href=\"../../index.php?".SID."\"><font color=\"#FF0033\">На главную</font></a>";
include_once("../temp/footer.php");
?>