<?
include '../inc/head.php';
#######################
$dir=$_GET['dir'];

$file=file_get_contents('http://www.o5wap.ru/picture/'. (!empty($dir) ? $dir : ''));
#############################################
$file=preg_replace('|<div id="begun_block(.*?)</html>|si','',$file);

$file=preg_replace('|</big><br/>стр.(.*?)</form>|si','',$file);
$file=preg_replace('|<div><img width="1"(.*?)</html>|si','',$file);

$file=preg_replace('|<div class="menu"><div id="begun_block_202916(.*?)</html>|si','',$file);

$file=preg_replace('|<?xml(.*?)Глав.</a>/|si','',$file);

$file=preg_replace('|</big><br/>стр.(.*?)</html>|si','</big></div>',$file);

$file=str_replace('src="/Images/1/dir.gif" alt=""/>','src="../../images/papka.gif" alt=""/>',$file);

$file=str_replace('<a href="/picture/','<a href="k.php?dir=/',$file);

$file=str_replace('<br/><hr/>','</div><div class="hov">',$file);

$file=str_replace('<div>','<div class="hov">',$file);

$file=str_replace('<?</a>/
','',$file);

$file=str_replace('<div class="h">','<div class="hov">',$file);

$file=str_replace('<img src="/content/','<img src="http://o5wap.ru/content/',$file);

$file=str_replace('<img src="/images','<img src="http://o5wap.ru/Images',$file);

$file=str_replace('<?</a>/','<div class="hov">',$file);

$file=str_replace('<hr/>','</div><div class="hov">',$file);

$file=preg_replace('|<div class="menu"><img width="1" height="1" alt="" style=(.*?)</html>|si','',$file);
$file=str_replace('<hr>','<div class="hov">',$file);

$file=str_replace('<?','<div class="hov">',$file);

$file=str_replace('<div class="hov">стр.','</div><div class="hov">стр.',$file);

$file=str_replace('<img class="icon" src="/Images/1/dwn.gif" alt=""/>','',$file);

$file=str_replace('<a href="?dir=/save/','<a href="http://o5wap.ru/picture/save/',$file);

$file=str_replace('<a href="/picture/k.php?dir=/?sid=','<a href="?sid=',$file);

$file=str_replace('<a href="k.php?dir=/save','<a href="http://o5wap.ru/picture/save',$file);

echo $file;
include '../inc/foot.php';
?>

