Просмотр файла rap/index.php

Размер файла: 2.06Kb
<?php
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
echo '<div class="b">Rap_Новости</div>';

if (!$_GET['tdir'])
{
$tdir = "";
} else {
$tdir = $_GET['tdir'];
}

if ($_GET['tdirp'])
{
$tdir = $_GET['tdirp'];
}
$file = file("http://wap.rap.ru/".$tdir);
$file = @implode("", $file);

$file = str_replace('<a href="/', '<a href="index.php?tdir=', $file);

$file=preg_replace('/<?xml(.*?)<div class=\"adv\" \/>/si','',$file);
$file = str_replace('<em>', '<div class="menu">', $file);
$file = str_replace('</a><br/>', '</a></div>', $file);
$file = str_replace('</em>', '', $file);
$file = str_replace('<ahead>', '', $file);
$file = str_replace('</ahead>', '', $file);
$file = str_replace('<br/><div class="menu">', '<div class="menu">', $file);
$file = str_replace('<?', '', $file);
$file = str_replace('<td class="left">', '<div class="menu">', $file);
$file = str_replace('</td>', '</div>', $file);
$file = str_replace('<table>', '', $file);
$file = str_replace('<tr>', '', $file);
$file = str_replace('<td class="right">', '<div class="menu">', $file);
$file = str_replace('</tr>', '', $file);

$file=preg_replace('/<b class=\"r5\"><\/b><b class=\"r3\">(.*?)<\/html>/si','',$file);
$file = str_replace('<div class="adv_news"/>', '', $file);
$file = str_replace('<div id="rounded-box-5">', '', $file);
$file = str_replace('<b class="r5"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b><b class="r1"></b>', '', $file);
$file = str_replace('<div class="inner-box">', '', $file);
$file=preg_replace('/<\/table>(.*?)<\/html>/si','',$file);

echo '<div class="bmenu">RAP-Новости</div>';
echo $file;
echo '<div class="menu"><a href="index.php">Вернуться к списку</a></div>';
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?' . SID . '">На главную</a>';
echo"<center><b>Powered_By_DeFoRt</b></center>";
include_once "../themes/".$config['themes']."/foot.php";
?>