Размер файла: 5.58Kb
<?php
/*
TV for Wap-Motor 19
Автор: SmartMan
E-mail: [email protected]
Site: http://my60.ru
ICQ: 199426
*/
require_once ("../includes/start.php");
require_once ("../includes/functions.php");
require_once ("../includes/header.php");
include_once ("../themes/".$config['themes']."/index.php");
$do = isset($_GET['do']) ? check($_GET['do']) : '';
$tv = isset($_GET['tv']) ? check($_GET['tv']) : '';
switch($do){
default:
echo '<div><img src="../images/img/partners.gif" alt="img" /><b>TV программа</b></div>';
echo '<img src="/images/tv/ort.gif" alt="Первый канал" /> <a href="/tv/?do=show&tv=ort&'.SID.'">Первый канал</a><br />
<img src="/images/tv/rtr.gif" alt="РТР" /> <a href="/tv/?do=show&tv=rtr&'.SID.'">РТР</a><br />
<img src="/images/tv/tvc.gif" alt="ТВЦ" /> <a href="/tv/?do=show&tv=tvc&'.SID.'">ТВЦ</a><br />
<img src="/images/tv/ntv.gif" alt="НТВ" /> <a href="/tv/?do=show&tv=ntv&'.SID.'">НТВ</a><br />
<img src="/images/tv/kult.gif" alt="Культура" /> <a href="/tv/?do=show&tv=kult&'.SID.'">Культура</a><br />
<img src="/images/tv/spo.gif" alt="Спорт" /> <a href="/tv/?do=show&tv=sport&'.SID.'">Спорт</a><br />
<img src="/images/tv/sts.gif" alt="СТС" /> <a href="/tv/?do=show&tv=ctc&'.SID.'">СТС</a><br />
<img src="/images/tv/tnt.gif" alt="ТНТ" /> <a href="/tv/?do=show&tv=tnt&'.SID.'">ТНТ</a><br />
<img src="/images/tv/ren.gif" alt="Рен-ТВ" /> <a href="/tv/?do=show&tv=rentv&'.SID.'">Рен-ТВ</a><br />
<img src="/images/tv/tv3.gif" alt="ТВ-3" /> <a href="/tv/?do=show&tv=tv3&'.SID.'">ТВ-3</a><br />
<img src="/images/tv/7tv.gif" alt="7-ТВ" /> <a href="/tv/?do=show&tv=7tv&'.SID.'">7-ТВ</a><br />
<img src="/images/tv/domashnii.gif" alt="Домашний" /> <a href="/tv/?do=show&tv=dom&'.SID.'">Домашний</a><br />
<img src="/images/tv/zvezda.gif" alt="Звезда" /> <a href="/tv/?do=show&tv=zvezda&'.SID.'">Звезда</a><br />
<img src="/images/tv/dar.gif" alt="Дарьял ТВ" /> <a href="/tv/?do=show&tv=dar&'.SID.'">Дарьял ТВ</a><br />
<img src="/images/tv/mtv.gif" alt="MTV" /> <a href="/tv/?do=show&tv=mtv&'.SID.'">MTV</a><br />
<img src="/images/tv/muztv.gif" alt="Муз-ТВ" /> <a href="/tv/?do=show&tv=muztv&'.SID.'">Муз-ТВ</a><br />';
break;
case ("show"):
if($tv){
if($tv=='ort'){$n='Первый канал.ort';}
elseif($tv=='rtr'){$n='РТР.rtr';}
elseif($tv=='tvc'){$n='ТВЦ.tvc';}
elseif($tv=='ntv'){$n='НТВ.ntv';}
elseif($tv=='kult'){$n='Культура.kult';}
elseif($tv=='sport'){$n='Спорт.spo';}
elseif($tv=='ctc'){$n='СТС.sts';}
elseif($tv=='tnt'){$n='ТНТ.tnt';}
elseif($tv=='rentv'){$n='Рен-ТВ.ren';}
elseif($tv=='tv3'){$n='ТВ-3.tv3';}
elseif($tv=='7tv'){$n='7-ТВ.7tv';}
elseif($tv=='dom'){$n='Домашний.domashnii';}
elseif($tv=='zvezda'){$n='Звезда.zvezda';}
elseif($tv=='dar'){$n='Дарьял ТВ.dar';}
elseif($tv=='mtv'){$n='MTV.mtv';
} else { $n='Муз-ТВ.muztv';}
$dt=split("\.",$n);
echo '<div><img src="/images/tv/'.$dt[1].'.gif" alt="img" /> <b>'.$dt[0].' на <span style="color:#BB00BB">'.date("d.m.y").'</span></b></div>';
error_reporting(0);
$host = "wapos.ru";
$path = "/tvprogs/$tv.wml?$QUERY_STRING";
$fp = fsockopen($host,80,$errno,$errstr,30);
if(!$fp) echo"$errstr ($errno)<br />\n";
else{
$headers = "GET $path HTTP/1.0\r\n";
$headers .= "Host: $host\r\n";
$headers .= "Accept: *\r\n";
$headers .= "Accept-Charset: UTF-8\r\n";
$headers .= "Accept-Charset: *\r\n";
$headers .= "Accept-Encoding: deflate\r\n";
$headers .= "Accept-Language: ru\r\n";
$headers .= "Referer: my60.ru\r\n";
$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.01\r\n\r\n";
fwrite($fp,$headers);
while($file != "\r\n") $file = fgets($fp,128);
$file = "";
while(!feof($fp)) $file .= fgets($fp,4096);
fclose($fp);
}
$file = str_replace('Java-кaтaлoг зaгpузoк!', '',$file);
$file = str_replace('XИT! Дуpaк нa paздeвaниe', '',$file);
$file = str_replace('На главную', '',$file);
$file = str_replace('<a href="http://waplog.net/ru/c.shtml?4102"><img src="http://c.waplog.net/ru/4102.cnt" alt="w" /></a>', '',$file);
$file=str_replace(' <br/>
<br/><br/>
---<br/>
<a href="index.wml">Kaнaлы</a>
<br/>
<a href="../index.wml"></a>
</small>
</p>
<p><br/><br/>
</p>
</card>
</wml>','',$file);
$file=str_replace('<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>','',$file);
$file = preg_replace('#\<card title="(.*?)">
<p>
<a href="http://wap.1124.ru/partner/6577264562/game/,desc,5014"></a>
<br/>
<a href="http://wapos.ru/javakat.wml"></a><br/>
</p>
<p>#si', '', $file);
$file=preg_replace('#\<small>
<b>(.*?)</b>
</small>
</p>
<p>
<small>#si','',$file);
$file=str_replace('<br/>','<br />',$file);
echo '<div>'.$file.'</div>';
echo '<img src="/images/img/back.gif" alt="img" /> <a href="/tv/?'.SID.'">TV программа</a><br />';
} else {
header("Location /tv/?rand=".rand(100,999)."&".SID);}
break;
}
echo '<img src="/images/img/homepage.gif" alt="image" /> <a href="/?'.SID.'">На главную</a>';
include_once ("../themes/".$config['themes']."/foot.php");
?>