1 |
<? |
<? |
2 |
|
|
3 |
require("Smarty.class.php"); |
#$accept=strtolower($HTTP_ACCEPT); |
4 |
|
#if ($WAP || strstr($accept,"text/vnd.wap.wml") || strstr($accept,"hdml;version=3.0")) { |
5 |
$accept=strtolower($HTTP_ACCEPT); |
# header("Content-Type: text/vnd.wap.wml"); |
6 |
if (strstr($accept,"text/vnd.wap.wml") || strttr($accept,"hdml;version=3.0")) { |
#} |
7 |
|
header("Content-Type: text/vnd.wap.wml"); |
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 |
|
|
44 |
return utf8_encode(htmlspecialchars($tmp)); |
return utf8_encode(htmlspecialchars($tmp)); |
45 |
} |
} |
46 |
|
|
47 |
|
require("Smarty.class.php"); |
48 |
$smarty = new Smarty; |
$smarty = new Smarty; |
49 |
|
|
50 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
71 |
num_selected=>$num_selected, |
num_selected=>$num_selected, |
72 |
on_page=>$on_page |
on_page=>$on_page |
73 |
) ); |
) ); |
74 |
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">'; |
|
75 |
|
|
76 |
$smarty->display("wap.tpl"); |
print '<?xml version="1.0"?> |
77 |
|
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">'.$wml; |
78 |
|
|
|
} else { |
|
|
print "You need wap-enabled device or browser for this page! |
|
|
<br>Go <a href=\"index.php\">back to main site</a>."; |
|
|
} |
|
79 |
?> |
?> |