Файл: www/servis/gdz/info.php
Строк: 38
<?
include '../../config.php';
if (is_numeric($_GET['id'])) $type = intval($_GET['id']);
div('ГДЗ: '.$type.' класс');
$x = file_get_contents('http://otvet.mobi/ngdz/'.$type.'.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 = preg_replace('#<img src="/img/id.gif" alt="(.*)" />#isU', '<img src="/style/icons_menu/pencil-ruler.png"/>', $x);
$x = preg_replace('#<!--(.*)-->#isU', '', $x);
$x = str_replace('<a href="/', '<a href="', $x);
$x = preg_replace('#<img src="/style/icons_menu/pencil-ruler.png"/> <a href="http://ask.otvet.mobi/translate/">(.*)</a>#isU', '', $x);
$x = preg_replace('#<img src="/style/icons_menu/pencil-ruler.png"/> <a href="/ask/">(.*)</a><br />#isU', '', $x);
$x = str_replace('<img src="/style/icons_menu/pencil-ruler.png"/>', '<div class="post0"><img src="/style/icons_menu/pencil-ruler.png"/>', $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='index.php'>ГДЗ</a><br />
</div></div>";
include '../../foot.php';
?>