Просмотр файла kurs/currency.php

Размер файла: 2.37Kb
<?php
#-----------------------------------------------------#
#          ********* WAP-MOTORS *********             #
#             Made by   :  Hooch                     #
#               E-mail  :  [email protected]             #
#             WAP-Site  :  http://vira.h2m.ru         #
#                  ICQ  :  77-148-55                  #
#  Вы не имеете право вносить изменения в код скрипта #
#        для его дальнейшего распространения          #
#-----------------------------------------------------#	
$dt = date("d.m.Y");
$charcode = (isset($_GET['charcode'])) ? $_GET['charcode'] : "USD";
$day = $_GET['day'];
$mon = $_GET['mon'];
$year = $_GET['year'];
$summ = $_GET['summ'];
$charcode_to = $_GET['charcode_to'];
if($day !=''){ $title='Курс '.$charcode.' на '.$day.'.'.$mon.'.'.$year;}
else{
$title='Курс '.$charcode.' на '.$dt;}
require_once "../includes/start.php";
require_once "../includes/functions.php";
require_once "../includes/header.php";
include_once "../themes/".$config['themes']."/index.php";
include_once "../conf.php";
header("Content-type:application/vnd.wap.xhtml+xml; charset=utf-8");
$set['title']=''.$title.'';
echo '<div align="center" class="foot"><b>'.$title.' от '.$config_home.'</b></div>
<div align="left" class="content">';
if($day !=''){
$file = file_get_contents("http://wap.rate.mail.ru/currency?day=".$day."&mon=".$mon."&year=".$year."&charcode=".$charcode);
}
elseif($charcode_to !=''){
$file = file_get_contents("http://wap.rate.mail.ru/currency?charcode=".$charcode."&charcode_to=".$charcode_to."&summ=".$summ);
}else{
$file = file_get_contents("http://wap.rate.mail.ru/currency?charcode=".$charcode);
}

$file = preg_replace('/<!DOCTYPE html(.*?)<div class="marg">/si','',$file);
$file = preg_replace('/class="(.*?)"/si','',$file);
$file = str_replace('</select>','</select><br/>',$file);
$file = str_replace('<img src="/img/','<img src="img/',$file);
$file = preg_replace('/<a href="\/">(.*?)<\/html>/si','',$file);
echo $file;
echo '<div class="foot"><img src="img/reload.gif" alt="Назад"/><a href="index.php">&nbsp;Назад</a><br/>';
echo $endpage;
echo '<img src="../images/img/homepage.gif" alt="image" /> <a href="../index.php?'.SID.'">На главную</a> '; 
include_once "../themes/".$config['themes']."/foot.php";
?>