Размер файла: 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&znak=oven\">Овен</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=telec\">Телец</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=twinz\">Близнецы</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=rak\">Рак</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=lev\">Лев</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=deva\">Дева</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=vesy\">Весы</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=scorp\">Скорпион</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=strelec\">Стрелец</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=kozerog\">Козерог</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=vodoley\">Водолей</a><br/>";
echo "<a href=\"./index.php?day=yesterday&znak=fish\">Рыбы</a><br/>";
echo "************<br/>";
echo "<a href=\"./index.php\">Гороскоп</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&znak=oven\">Овен</a><br/>";
echo "<a href=\"./index.php?day=today&znak=telec\">Телец</a><br/>";
echo "<a href=\"./index.php?day=today&znak=twinz\">Близнецы</a><br/>";
echo "<a href=\"./index.php?day=today&znak=rak\">Рак</a><br/>";
echo "<a href=\"./index.php?day=today&znak=lev\">Лев</a><br/>";
echo "<a href=\"./index.php?day=today&znak=deva\">Дева</a><br/>";
echo "<a href=\"./index.php?day=today&znak=vesy\">Весы</a><br/>";
echo "<a href=\"./index.php?day=today&znak=scorp\">Скорпион</a><br/>";
echo "<a href=\"./index.php?day=today&znak=strelec\">Стрелец</a><br/>";
echo "<a href=\"./index.php?day=today&znak=kozerog\">Козерог</a><br/>";
echo "<a href=\"./index.php?day=today&znak=vodoley\">Водолей</a><br/>";
echo "<a href=\"./index.php?day=today&znak=fish\">Рыбы</a><br/>";
echo "************<br/>";
echo "<a href=\"./index.php\">Гороскоп</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&znak=oven\">Овен</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=telec\">Телец</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=twinz\">Близнецы</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=rak\">Рак</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=lev\">Лев</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=deva\">Дева</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=vesy\">Весы</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=scorp\">Скорпион</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=strelec\">Стрелец</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=kozerog\">Козерог</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=vodoley\">Водолей</a><br/>";
echo "<a href=\"./index.php?day=tomorrow&znak=fish\">Рыбы</a><br/>";
echo "************<br/>";
echo "<a href=\"./index.php\">Гороскоп</a>";
}
break;
###----------------------default-----------------------###
default:
echo "<a href=\"./index.php?day=yesterday\">На вчера</a><br/>";
echo "<a href=\"./index.php?day=today\">На сегодня</a><br/>";
echo "<a href=\"./index.php?day=tomorrow\">На завтра</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>";
}
?>