Файл: www/servis/gdz/book.php
Строк: 29
<?
include '../../config.php';
if (is_numeric($_GET['f'])) $book = intval($_GET['f']);
$x = file_get_contents('http://otvet.mobi/ngdz/book/'.$book.'.html?' . $_SERVER['QUERY_STRING']);
if (empty($x)) {
echo 'Извините, раздел ГДЗ пока недоступен!';
} else {
$x = preg_replace('#<!DOCTYPE(.*)(<title>)#isU', '', $x);
$x = preg_replace('#</title>(.*)</html>#isU', '', $x);
div(''.$x.'');
}
div('Списывай с GeFan.Ru!');
$x = file_get_contents('http://otvet.mobi/ngdz/book/'.$book.'.html?' . $_SERVER['QUERY_STRING']);
if (empty($x)) {
echo 'Извините, раздел ГДЗ пока недоступен!';
} else {
$x = preg_replace('#<!DOCTYPE(.*)(<body>)#isU', '', $x);
$x = preg_replace('#<div class="logo">(.*)</div>#isU', '', $x);
$x = preg_replace('#<div class="other">(.*)</div>#isU', '', $x);
$x = preg_replace('#<font(.*)</font>#isU', '', $x);
$x = preg_replace('#<div class="old">(.*)</html>#isU', '', $x);
$x = str_replace('<div class="otherme">', '', $x);
$x = str_replace('<div class="mainmode">', '', $x);
$x = str_replace('<div class="one">', '', $x);
$x = str_replace('</div>', '', $x);
$x = str_replace('<img src="', '<img src="http://otvet.mobi', $x);
$x = preg_replace('#<!--(.*)-->#isU', '', $x);
$x = str_replace('<a href="/ngdz/', '<a href="', $x);
$x = str_replace('</a>', '</a><br/>', $x);
$x = str_replace('<br/>', '', $x);
$x = str_replace('»', '', $x);
$x = str_replace('<a href="book', '<a href="/servis/gdz/book', $x);
$x = str_replace('</form>', '', $x);
$x = str_replace('<form action="/ngdz/book/', '<div class="menu_path_title">Содержание</div><form action="/servis/gdz/book/', $x);
$x = str_replace('</a><a href="/servis/gdz/book/', '</a><br/><a href="/servis/gdz/book/', $x);
$x = str_replace('</a><a href="/sgdz/', '</a><br/><a href="http://otvet.mobi/sgdz/', $x);
$x = str_replace('</a><select name="s"', '</a><br/><select name="s"', $x);
echo $x;
}
echo "</form><div class="menu_path_title">Путь</div>
<div class="menu_path">
<a class='menu_path' href='javascript:history.go(-1)'>Назад</a><br />
<a class='menu_path' href='/servis/gdz/index.php'>ГДЗ</a><br />
</div></div>";
include '../../foot.php';
?>