<?php

//By FlySelf

defined('_IN_JOHNCMS') or die('Error: restricted access');
if($id > 12)
	$id = 1;
$contents = contents('http://wap.horo.mail.ru/prediction.html?time=' . $mod . ($id ? '&sign=' . $id : '') . ($start ? '&cp=' . $start : ''));
$contents = preg_replace('/<\?xml(.*?)<div class=\"inner\">/si', '', $contents);
$contents = preg_replace('/<div class=\"inner f7\">(.*?)<\/div>/si', '<div class="list2">\1</div>', $contents);
$contents = preg_replace('/<div id=\"footer\"(.*?)<\/html>/si', '<div class="phdr"><a href="index.html">Гороскоп</a></div>', $contents);
$contents = strtr($contents, array('=17' => '="17"', '&sign' => '&amp;sign', '<p>&#032;</p>' => '', '<p>&#032;</p><br/>' => '', '<br/>' => '</div><div>', '<p>' => '', '</p>' => '<br />', '/img/zodiac' => 'images', '/index' => 'index', '/prediction' => 'prediction', '<h1>' => '<div class="phdr"><b>', '</h1>' => '</b></div><div class="bmenu">', '&sign=&cp' => '?start', '&cp' => '?start', '<div class="inner">' => '<div class="list1">'));
$contents = preg_replace('/<img(.*?)<\/div>/si', '<div class="list1"><img\1</div></div>', $contents);
$contents = preg_replace('/\.html\?time=(1|yesterday|tomorrow|week|month|year|today)&amp;sign=([0-9]+)/si', '_\2_\1.html', $contents);
$contents = preg_replace('/\.html\?time=(1|yesterday|tomorrow|week|month|year|today)/si', '_\1.html', $contents);

?>