View file new_fo/themes/wml.php

File size: 1.39Kb
<?php

$separator='---<br/>';

list($msec,$sec)=explode(chr(32),microtime()); 
$HeadTime=$sec+$msec;

function head(){
header('Content-type: text/vnd.wap.wml; charset=utf-8');
print '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';
}

function title($title,$refresh_url='',$refresh=0,$no_align=0){
$url_l=htmlspecialchars($_GET['url'],ENT_QUOTES);
if(!empty($url_l)){$t_url = $url_l.'.:.';}
print '<card title="'.$t_url.$title.'">
<p><small>';
}

function div($text,$div){
if($div=='b') echo '<b><u>['.$text.']</u></b><br/>';
else echo '<b>'.$text.'</b><br/>';
}

function footer(){
global $HeadTime, $config, $separator;

if(isset($_GET['wml'])){
	$link=str_replace('wml','xhtml',val($_SERVER['REQUEST_URI']));
	}
else
	{
$link = str_replace('?','?xhtml&amp;',val((strpos($_SERVER['REQUEST_URI'],'?') ? $_SERVER['REQUEST_URI'] : '?')));
	}

echo $separator.'[<b>WML</b>|<a href="'.$link.'">HTML</a>]<br/>
<b>&#169; <a href="http://'.$config['url'].'">'.$config['site'].'</a></b><br/>
<a href="servis.php?wml&amp;url='.htmlspecialchars($_GET['url']).'">Сервис обменника</a><br/>
</small>';
echo'<img src="http://imtop.ru/229/small.png" alt="imTop.ru" /><br/>';
echo'</p></card></wml>';
}
?>