Файл: www/servis/gdz/ucheb.php
Строк: 24
<?
include '../../config.php';
if (is_numeric($_GET['id'])) $type = intval($_GET['id']);
if (is_numeric($_GET['book'])) $book = intval($_GET['book']);
$x = file_get_contents('http://otvet.mobi/ngdz/'.$type.'/'.$book.'.htm');
if (empty($x)) {
echo 'Извините, раздел ГДЗ пока недоступен!';
} else {
$x = preg_replace('#<!DOCTYPE(.*)(<title>)#isU', '', $x);
$x = preg_replace('#</title>(.*)</html>#isU', '', $x);
div(''.$x.'');
}
$x = file_get_contents('http://otvet.mobi/ngdz/'.$type.'/'.$book.'.htm');
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="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/', '<div class="post0"><a href="/servis/gdz/', $x);
$x = str_replace('</a>', '</a></div>', $x);
echo $x;
}
echo "<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='index.php'>ГДЗ</a><br />
</div></div>";
include '../../foot.php';
?>