/[corp_html]/wap.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /wap.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dpavlin, Thu Mar 1 07:12:34 2001 UTC revision 1.6 by dpavlin, Mon Mar 5 18:49:13 2001 UTC
# Line 1  Line 1 
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    
# Line 42  function fixup($html) { Line 44  function fixup($html) {
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()) {
# Line 68  $smarty->assign( array ( Line 71  $smarty->assign( array (
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  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.26