2 |
|
|
3 |
require("Smarty.class.php"); |
require("Smarty.class.php"); |
4 |
|
|
|
$accept=strtolower($HTTP_ACCEPT); |
|
5 |
if ($WAP || strstr($accept,"text/vnd.wap.wml") || strstr($accept,"hdml;version=3.0")) { |
if ($WAP || strstr($accept,"text/vnd.wap.wml") || strstr($accept,"hdml;version=3.0")) { |
6 |
|
header("Content-Type: text/vnd.wap.wml"); |
7 |
|
} |
8 |
|
|
9 |
global $WAP; |
global $WAP; |
10 |
$WAP=1; |
$WAP=1; |
11 |
require("conn.inc"); |
require("conn.inc"); |
12 |
header("Content-Type: text/vnd.wap.wml"); |
|
13 |
|
$dbh->dbh_do("insert into wap_ua (ua,referer,url,accept) values ('$HTTP_USER_AGENT','$HTTP_REFERER','$QUERY_STRING','$HTTP_ACCEPT')"); |
14 |
|
|
15 |
$on_page=5; |
$on_page=5; |
16 |
|
|
70 |
num_selected=>$num_selected, |
num_selected=>$num_selected, |
71 |
on_page=>$on_page |
on_page=>$on_page |
72 |
) ); |
) ); |
73 |
print '<?xml version="1.0"?> |
$wml=$smarty->fetch("wap.tpl"); |
|
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">'; |
|
74 |
|
|
75 |
$smarty->display("wap.tpl"); |
print '<?xml version="1.0"?> |
76 |
|
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">'.$wml; |
77 |
|
|
|
} else { |
|
|
print "You need wap-enabled device or browser for this page! |
|
|
<br>Go <a href=\"index.php\">back to main site</a>."; |
|
|
} |
|
78 |
?> |
?> |