--- wap.php 2001/03/01 07:12:34 1.2
+++ wap.php 2001/03/05 18:49:13 1.6
@@ -1,14 +1,16 @@
-require("Smarty.class.php");
-
-$accept=strtolower($HTTP_ACCEPT);
-if (strstr($accept,"text/vnd.wap.wml") || strttr($accept,"hdml;version=3.0")) {
+#$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");
+#}
+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;
@@ -42,6 +44,7 @@
return utf8_encode(htmlspecialchars($tmp));
}
+require("Smarty.class.php");
$smarty = new Smarty;
while ($row=$sth->fetchrow_hash()) {
@@ -68,13 +71,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.";
-}
?>