View file PWB_f/index.php

File size: 1.79Kb
<?php
//////////////////////////////////////////////////////////////////////////////////
//		‘ЄаЁЇв:		Power W@P Builder				//
//		‚ҐабЁп:		0.1 alpha					//
//		ЋЇЁб ­ЁҐ:	‘ЄаЁЇв ЇаҐ¤бв ў«пҐв б®Ў®© ¤ўЁ¦®Є ¤«п Ї®бв஥­Ёп	//
//				WAP б ©в®ў! ѓЁЎ®Є ў ­ бва®©Є е! ќв® ЇҐаўл© ҐЈ®	//
//				ўлЇгбЄ! ЌЁЄ ЄЁе ¤®Ї®«­ЁвҐ«м­ле дЁз Ї®Є  ­Ґв!	//
//				‘Є®а® ўл©¤Ґв Ў®«ҐҐ ­ ў®а®зҐ­­ п ўҐабЁп!		//
//		„ в  ўлЇгбЄ :	21.10.2004					//
//		Ђўв®а:		Љг§м¬Ґ­Є®ў „¬ЁваЁ© aka Xakep			//
//		email:		[email protected]					//
//		WAP-б ©в:	http://mobynet.ru				//
//////////////////////////////////////////////////////////////////////////////////
//­ бва®©ЄЁ
//д ©« Ј« ў­®© бва ­Ёжл (Ї® 㬮«з ­Ёо "index")
$default_wml = "index";
//ђ бйЁаҐ­ЁҐ ¤«п д ©«®ў бва ­Ёж (Ї® 㬮«з ­Ёо "txt")
$ext = "txt";
//Ї ЇЄ , ў Є®в®а®© еа ­пвбп ўбҐ вҐЄбв®ўЁЄЁ
$dir = "wml";
//ўЄ«оз Ґ¬ д ©« б Є®­ўҐав жЁҐ© ў о­ЁЄ®¤
include "utf.inc.php";
//Ї®бл« Ґ¬ § Ј®«®ў®Є
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
//Ґб«Ё Ї а ¬Ґва Їгбв, нв® Ј« ў­ п бва ­Ёж  б ©в 
if(empty($wml)) $wml = $default_wml;
//ўлў®¤ ў Ўа г§аҐ Їа®«®Ј  wml бва ­Ёжл
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".
"<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n".
"<wml>\n".
"<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>\n";
//ЇҐаҐ¤ ­ «Ё Ї а ¬Ґва?
if ($wml!="")
{
	//зЁв Ґ¬ д ©« ў ®¤­г ЇҐаҐ¬Ґ­­го, в.Ґ. ў ®¤­г бва®Єг
	$text = @implode("", @file($dir."/".$wml.".".$ext));
	//Ґб«Ё д ©« Їгбв
	if ($text == "")
	{
		//ўлў®¤Ё¬ ®иЁЎЄг
		print "<b>” ©« бгйҐбвўгҐв, ­® ®­ Їгбв!</b><br/>";
		exit;
	}
	//ўлў®¤Ё¬ б ¬г бва ­Ёжг Ё§ д ©« 
	print $text;
}
else
{
	//ўлў®¤Ё¬ ®иЁЎЄг
	print "<b>” ©«  ­Ґ бгйҐбвўгҐв!</b><br/>";
}
//Є®­Ґж бва ­Ёжл
print "</wml>";
?>