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

Размер файла: 8.79Kb
<?
###-------------------Zagolovok------------------------###
header("Content-type:text/vnd.wap.wml;charset=utf-8");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">";
echo "<wml>";
echo "<card id=\"index\" title=\"wap.vavan.ru\">";
echo "<p align='center'>";
//echo "<p align=\"center\">";
//$url='';
switch ($day)
{
###--------------------yesterday-----------------------###
case yesterday:
switch ($znak)
{
case oven:
$url = "http://wap.ngs.ru/horo/yesterday/oven.wml";
break;
case telec:
$url = "http://wap.ngs.ru/horo/yesterday/telec.wml";
break;
case twinz:
$url = "http://wap.ngs.ru/horo/yesterday/twinz.wml";
break;
case rak:
$url = "http://wap.ngs.ru/horo/yesterday/rak.wml";
break;
case lev:
$url = "http://wap.ngs.ru/horo/yesterday/lev.wml";
break;
case deva:
$url = "http://wap.ngs.ru/horo/yesterday/deva.wml";
break;
case vesy:
$url = "http://wap.ngs.ru/horo/yesterday/vesy.wml";
break;
case scorp:
$url = "http://wap.ngs.ru/horo/yesterday/scorp.wml";
break;
case strelec:
$url = "http://wap.ngs.ru/horo/yesterday/strelec.wml";
break;
case kozerog:
$url = "http://wap.ngs.ru/horo/yesterday/kozerog.wml";
break;
case vodoley:
$url = "http://wap.ngs.ru/horo/yesterday/vodoley.wml";
break;
case fish:
$url = "http://wap.ngs.ru/horo/yesterday/fish.wml";
break;
default:
echo "<br/><a href=\"./index.php?day=yesterday&amp;znak=oven\">&#x041E;&#x0432;&#x0435;&#x043D;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=telec\">&#x0422;&#x0435;&#x043B;&#x0435;&#x0446;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=twinz\">&#x0411;&#x043B;&#x0438;&#x0437;&#x043D;&#x0435;&#x0446;&#x044B;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=rak\">&#x0420;&#x0430;&#x043A;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=lev\">&#x041B;&#x0435;&#x0432;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=deva\">&#x0414;&#x0435;&#x0432;&#x0430;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=vesy\">&#x0412;&#x0435;&#x0441;&#x044B;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=scorp\">&#x0421;&#x043A;&#x043E;&#x0440;&#x043F;&#x0438;&#x043E;&#x043D;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=strelec\">&#x0421;&#x0442;&#x0440;&#x0435;&#x043B;&#x0435;&#x0446;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=kozerog\">&#x041A;&#x043E;&#x0437;&#x0435;&#x0440;&#x043E;&#x0433;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=vodoley\">&#x0412;&#x043E;&#x0434;&#x043E;&#x043B;&#x0435;&#x0439;</a><br/>";
echo "<a href=\"./index.php?day=yesterday&amp;znak=fish\">&#x0420;&#x044B;&#x0431;&#x044B;</a><br/>";
echo "************<br/>";
echo "<a href=\"./index.php\">&#x0413;&#x043E;&#x0440;&#x043E;&#x0441;&#x043A;&#x043E;&#x043F;</a>";
}
break;
###----------------------today-------------------------###
case today:
switch ($znak)
{
case oven:
$url = "http://wap.ngs.ru/horo/today/oven.wml";
break;
case telec:
$url = "http://wap.ngs.ru/horo/today/telec.wml";
break;
case twinz:
$url = "http://wap.ngs.ru/horo/today/twinz.wml";
break;
case rak:
$url = "http://wap.ngs.ru/horo/today/rak.wml";
break;
case lev:
$url = "http://wap.ngs.ru/horo/today/lev.wml";
break;
case deva:
$url = "http://wap.ngs.ru/horo/today/deva.wml";
break;
case vesy:
$url = "http://wap.ngs.ru/horo/today/vesy.wml";
break;
case scorp:
$url = "http://wap.ngs.ru/horo/today/scorp.wml";
break;
case strelec:
$url = "http://wap.ngs.ru/horo/today/strelec.wml";
break;
case kozerog:
$url = "http://wap.ngs.ru/horo/today/kozerog.wml";
break;
case vodoley:
$url = "http://wap.ngs.ru/horo/today/vodoley.wml";
break;
case fish:
$url = "http://wap.ngs.ru/horo/today/fish.wml";
break;
default:
echo "<br/><a href=\"./index.php?day=today&amp;znak=oven\">&#x041E;&#x0432;&#x0435;&#x043D;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=telec\">&#x0422;&#x0435;&#x043B;&#x0435;&#x0446;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=twinz\">&#x0411;&#x043B;&#x0438;&#x0437;&#x043D;&#x0435;&#x0446;&#x044B;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=rak\">&#x0420;&#x0430;&#x043A;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=lev\">&#x041B;&#x0435;&#x0432;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=deva\">&#x0414;&#x0435;&#x0432;&#x0430;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=vesy\">&#x0412;&#x0435;&#x0441;&#x044B;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=scorp\">&#x0421;&#x043A;&#x043E;&#x0440;&#x043F;&#x0438;&#x043E;&#x043D;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=strelec\">&#x0421;&#x0442;&#x0440;&#x0435;&#x043B;&#x0435;&#x0446;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=kozerog\">&#x041A;&#x043E;&#x0437;&#x0435;&#x0440;&#x043E;&#x0433;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=vodoley\">&#x0412;&#x043E;&#x0434;&#x043E;&#x043B;&#x0435;&#x0439;</a><br/>";
echo "<a href=\"./index.php?day=today&amp;znak=fish\">&#x0420;&#x044B;&#x0431;&#x044B;</a><br/>";
echo "************<br/>";
echo "<a href=\"./index.php\">&#x0413;&#x043E;&#x0440;&#x043E;&#x0441;&#x043A;&#x043E;&#x043F;</a>";

}
break;
###---------------------tomorrow-----------------------###
case tomorrow:
switch ($znak)
{
case oven:
$url = "http://wap.ngs.ru/horo/tomorrow/oven.wml";
break;
case telec:
$url = "http://wap.ngs.ru/horo/tomorrow/telec.wml";
break;
case twinz:
$url = "http://wap.ngs.ru/horo/tomorrow/twinz.wml";
break;
case rak:
$url = "http://wap.ngs.ru/horo/tomorrow/rak.wml";
break;
case lev:
$url = "http://wap.ngs.ru/horo/tomorrow/lev.wml";
break;
case deva:
$url = "http://wap.ngs.ru/horo/tomorrow/deva.wml";
break;
case vesy:
$url = "http://wap.ngs.ru/horo/tomorrow/vesy.wml";
break;
case scorp:
$url = "http://wap.ngs.ru/horo/tomorrow/scorp.wml";
break;
case strelec:
$url = "http://wap.ngs.ru/horo/tomorrow/strelec.wml";
break;
case kozerog:
$url = "http://wap.ngs.ru/horo/tomorrow/kozerog.wml";
break;
case vodoley:
$url = "http://wap.ngs.ru/horo/tomorrow/vodoley.wml";
break;
case fish:
$url = "http://wap.ngs.ru/horo/tomorrow/fish.wml";
break;
default:
echo "<br/><a href=\"./index.php?day=tomorrow&amp;znak=oven\">&#x041E;&#x0432;&#x0435;&#x043D;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=telec\">&#x0422;&#x0435;&#x043B;&#x0435;&#x0446;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=twinz\">&#x0411;&#x043B;&#x0438;&#x0437;&#x043D;&#x0435;&#x0446;&#x044B;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=rak\">&#x0420;&#x0430;&#x043A;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=lev\">&#x041B;&#x0435;&#x0432;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=deva\">&#x0414;&#x0435;&#x0432;&#x0430;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=vesy\">&#x0412;&#x0435;&#x0441;&#x044B;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=scorp\">&#x0421;&#x043A;&#x043E;&#x0440;&#x043F;&#x0438;&#x043E;&#x043D;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=strelec\">&#x0421;&#x0442;&#x0440;&#x0435;&#x043B;&#x0435;&#x0446;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=kozerog\">&#x041A;&#x043E;&#x0437;&#x0435;&#x0440;&#x043E;&#x0433;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=vodoley\">&#x0412;&#x043E;&#x0434;&#x043E;&#x043B;&#x0435;&#x0439;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&amp;znak=fish\">&#x0420;&#x044B;&#x0431;&#x044B;</a><br/>";
echo "************<br/>";
echo "<a href=\"./index.php\">&#x0413;&#x043E;&#x0440;&#x043E;&#x0441;&#x043A;&#x043E;&#x043F;</a>";

}
break;
###----------------------default-----------------------###
default:
echo "<a href=\"./index.php?day=yesterday\">&#x041D;&#x0430; &#x0432;&#x0447;&#x0435;&#x0440;&#x0430;</a><br/>";
echo "<a href=\"./index.php?day=today\">&#x041D;&#x0430; &#x0441;&#x0435;&#x0433;&#x043E;&#x0434;&#x043D;&#x044F;</a><br/>";
echo "<a href=\"./index.php?day=tomorrow\">&#x041D;&#x0430; &#x0437;&#x0430;&#x0432;&#x0442;&#x0440;&#x0430;</a><br/>";
}
###------------------------EDN-------------------------###
if(empty($day))
{
echo "<br/>************<br/><a href=\"http://wap.vavan.ru/\">wap.vavan.ru</a>";
echo "</p></card></wml>";
}
elseif(empty($znak))
{
echo "<br/>************<br/><a href=\"http://wap.vavan.ru/\">wap.vavan.ru</a>";
echo "</p></card></wml>";
}
else
{
//echo file($url);
$data_start = '<b>';
$data_end = '</p>';
$data_new_start = '';
$data_new_end ='';
@eregi("$data_start(.*)$data_end",@fread(@fopen($url,"rb"),65536), $out);
echo '</p><p><b>';
echo "$data_new_start ".$out[1]."  $data_new_end";
echo "<br/>************<br/><a href=\"http://site.ru/\">site.ru</a>";
echo "</p></card></wml>";
}
?>