--- wap.php 2001/03/01 12:56:52 1.4 +++ wap.php 2001/03/05 12:02:11 1.5 @@ -2,13 +2,15 @@ require("Smarty.class.php"); -$accept=strtolower($HTTP_ACCEPT); if ($WAP || strstr($accept,"text/vnd.wap.wml") || strstr($accept,"hdml;version=3.0")) { + header("Content-Type: text/vnd.wap.wml"); +} global $WAP; $WAP=1; require("conn.inc"); -header("Content-Type: text/vnd.wap.wml"); + +$dbh->dbh_do("insert into wap_ua (ua,referer,url,accept) values ('$HTTP_USER_AGENT','$HTTP_REFERER','$QUERY_STRING','$HTTP_ACCEPT')"); $on_page=5; @@ -68,13 +70,9 @@ num_selected=>$num_selected, on_page=>$on_page ) ); -print ' -'; +$wml=$smarty->fetch("wap.tpl"); -$smarty->display("wap.tpl"); +print ' +'.$wml; -} else { - print "You need wap-enabled device or browser for this page! -
Go back to main site."; -} ?>