Wml And Xhtml In One Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wml And Xhtml In One Page

    this is like on lavalair.net, who knows how to do that coding?

    #2
    Code:
    if ($force=="wml")
    {
    $head = "text/vnd.wap.wml";  //used for debugging
    $mime = ((stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) ? "application/xhtml+xml" : "text/vnd.wap.wml");
    }else{
        $mime = $force;
    }
    $uid = getuid_nick($uname);
    $charset = "utf-8";
    header("content-type:$mime;charset=$charset");
    if($mime=="application/xhtml+xml")
    {
    echo("<?xml version=\"1.0\"?>\n");
        echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
    }else{
        echo("<?xml version=\"1.0\"?>\n");
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
    }
    if ($force=="xhtml")
    {
    $header = "";  //used for debugging
    $mime = ((stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) ? "application/xhtml+xml" : "text/vnd.wap.wml");
    }else{
        $mime = $force;
    }
    $uid = getuid_nick($uname);
    $charset = "utf-8";
    if($mime=="application/xhtml+xml")
    {
    echo("\n");
        echo "\n";
    }else{
        echo("\n");
    echo "\n";
    }
    //show mean page
        
    
    if($mime== MIME_TYPE)
        {
            
            
            echo header($uname."@lavalair.net",$pstyle);
    
                   what ever you need here        
    
            echo "</p>";
            echo foot();
        }else{
    echo "<a href=\" url .php?action=main&amp;sid=$sid&amp;force=wml or xhtml\">Index</a>";
    change what you need in xhtml
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      mmhm NOT HELPING, but thnx anyway

      Comment


        #4
        that how they do it at same time action + force they both work as a team lol i had done this
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          mmhm http://wap.funmobile.ws
          Code:
          <?php
          
          include("config.php");
          include("core.php");
          
          
          if($mime== WEB)
          {
              echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
          
              echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
          }else{
              echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
          
              echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
          }
          $bcon = connectdb();
          if (!$bcon)
          {
          echo dberror();
          }
          $uid = getuid_ses($ses);
          if($act!="") {
          if((islogged($ses)==false)||($uid==0))
              {
                  $msg = "You Are Not Logged In Or Your Session Has Expired!";
          
              if($mime== WEB)
              {
                  echo xhtmlhead(ERROR);
                  echo $msg;
                  echo xhtmlfoot();
                  exit();
              }else{
                  echo wmlhead(ERROR);
                  echo "
          
          ";
                  echo $msg;
                  echo "</p>";
                  echo wmlfoot();
                  exit();
              }
              }
          }
          
          $res = mysql_query("UPDATE wiz_users SET browser=&#39;".$ubr."&#39;, ipadd=&#39;".$uip."&#39; WHERE id=&#39;".getuid_ses($ses)."&#39;");
          
          if($act=="")
          {
              if($mime== WEB)
              {
              echo xhtmlhead($pgtitle);
                  echo "<div class=\"center\">";
                  echo "<img src=\"images/logo.gif\" alt=\"$stitle\"/>";
          echo "
          ";
          echo "
          ";
          echo "Welcome to $pgtitle";
          echo "
          ";
          echo "The Best WAP Community";
          
                  echo "</div>";
                  echo "<form action=\"login.php\" method=\"get\">";
                  echo "Username:";
                  echo "
          ";
                  echo "<input type=\"text\" name=\"$unm\" maxlength=\"15\" />";
                  echo "
          ";
                  echo "Password:";
                  echo "
          ";
                  echo "<input type=\"password\" name=\"$pwd\" maxlength=\"15\" />";
                  echo "
          ";
                  echo "<input type=\"hidden\" name=\"svw\" value=\"$svw\"/>";
                  echo "<input type=\"submit\" value=\"login\" />";
                  echo "</form>";
                  echo "
          ";
                  echo "
          ";
                  echo "Not Yet a Member?";
                  echo "
          ";
                  echo "<a href=\"register.php?svw=$svw\">»Register</a>";
                  echo "<div class=\"center\">";
                  echo "<a href=\"index.php?svw=w\">WML Version</a>";
                  echo "
          ";
                  echo "
          ";
                  echo "© Wizard 2007";
                  echo "</div>";
              echo xhtmlfoot();
              }else{
              echo wmlhead($pgtitle);
                  echo "<p align=\"center\">";
                  echo "<img src=\"images/logo.gif\" alt=\"$stitle\"/>";
          echo "
          ";
          echo "
          ";
          echo "Welcome to $pgtitle";
          echo "
          ";
          echo "The Best WAP Community";
          
                  echo "</p>";
                  echo "
          
          ";
                  echo "Username:";
                  echo "
          ";
                  echo "<input type=\"text\" name=\"unm\" maxlength=\"15\" />";
                  echo "
          ";
                  echo "Password:";
                  echo "
          ";
                  echo "<input type=\"password\" name=\"pwd\" maxlength=\"15\" />";
                  echo "
          ";
                  echo "<anchor>login<go href=\"login.php\" method=\"get\">";
                  echo "<postfield name=\"unm\" value=\"$(unm)\"/>";
                  echo "<postfield name=\"pwd\" value=\"$(pwd)\"/>";
                  echo "<postfield name=\"svw\" value=\"$svw\"/>";
                  echo "</go>";
                  echo "</anchor>";
                  echo "
          ";
                  echo "
          ";
                  echo "Not Yet a Member?";
                  echo "
          ";
                  echo "<a href=\"register.php?svw=$svw\">»Register</a>";
                  echo "</p>";
                  echo "<p align=\"center\">";
                  echo "<a href=\"index.php?svw=x\">XHTML Version</a>";
                  echo "
          ";
                  echo "
          ";
                  echo "© Wizard 2007";
                  echo "</p>";
              echo wmlfoot();
              }
          }else if($act=="main")
          {
          
           addonline(getuid_ses($ses),"Portal Index","index.php?act=$act");
          
              if($mime== WEB)
              {
              echo xhtmlhead($pgtitle);
                  echo "<div class=\"center\">";
                  echo "<img src=\"images/logo.gif\" alt=\"$stitle\"/>";
                  echo "</div>";
          
                  echo "<div class=\"center\">";
                  echo "<a href=\"index.php?act=main&amp;ses=$ses&amp;svw=w\">WML Version</a>";
                  echo "
          ";
                  echo "
          ";
                  echo "© Wizard 2007";
                  echo "</div>";
              echo xhtmlfoot();
              }else{
              echo wmlhead($pgtitle);
                  echo "<p align=\"center\">";
                  echo "<img src=\"images/logo.gif\" alt=\"$stitle\"/>";
                  echo "</p>";
          
                  echo "<p align=\"center\">";
                  echo "<a href=\"index.php?act=main&amp;ses=$ses&amp;svw=x\">XHTML Version</a>";
                  echo "
          ";
                  echo "
          ";
                  echo "© Wizard 2007";
                  echo "</p>";
              echo wmlfoot();
              }
          
          }
          
          ?>

          Comment


            #6
            Yes you have now got the idea lol
            Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
            Visit: WapMasterz Coming Back Soon!
            _______
            SCRIPTS FOR SALE BY SUBZERO
            Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
            FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
            _______
            Info & Tips
            php.net
            w3schools.com

            Comment


              #7
              Yes you have now got the idea lol[/b]
              lol had to remove d script from my host cuz of hackin attempts lol

              Comment


                #8
                yes ppl will love to get there hand on that bro also as i say pmpl lazy fookers really bro
                Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                Visit: WapMasterz Coming Back Soon!
                _______
                SCRIPTS FOR SALE BY SUBZERO
                Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                _______
                Info & Tips
                php.net
                w3schools.com

                Comment


                  #9
                  i agree. lazy mofookers. ill encode with zend b4 i upload again

                  Comment


                    #10
                    make sure before put copyright by you and a url to main page echo ""; on all body heads so they see
                    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                    Visit: WapMasterz Coming Back Soon!
                    _______
                    SCRIPTS FOR SALE BY SUBZERO
                    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                    _______
                    Info & Tips
                    php.net
                    w3schools.com

                    Comment


                      #11
                      i&#39;ve encoded with zend lol. script is up but xhtml version is not complete

                      Comment


                        #12
                        what do i need to put in core? shall i make a new php page?

                        Comment


                          #13
                          here is an example

                          core.php
                          [code]
                          <?php
                          define (&#39;WAP&#39;,&#39;text/vnd.wap.wml&#39;);
                          define (&#39;WEB&#39;,&#39;application/xhtml+xml&#39;);
                          $view = $_GET["view"];


                          $force = "";
                          //$force = "text/vnd.wap.wml"; //used for debugging
                          if ($force=="")
                          {
                          $mime = ((stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) ? "application/xhtml+xml" : "text/vnd.wap.wml");
                          }else{
                          $mime = $force;
                          }

                          $charset = "utf-8";
                          header("content-type:$mime;charset=$charset");

                          function waphead($pgtitle)
                          {
                          $ret = "<wml><card id=\"main\" title=\"$pgtitle\">";
                          return $ret;
                          }
                          function wapfoot()
                          {
                          $ret = "</card></wml>";
                          return $ret;
                          }
                          function webhead($pgtitle)
                          {
                          $ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" >";
                          $ret .= "<head>";
                          $ret .= "<title>$pgtitle</title>";
                          $ret .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/theme.css\" />";
                          $ret .= "</head><body>";
                          return $ret;
                          }
                          function webfoot()
                          {
                          $ret = "</body></html>";
                          return $ret;
                          }

                          Comment


                            #14
                            here is an example

                            core.php
                            Code:
                            <?php
                            define (&#39;WAP&#39;,&#39;text/vnd.wap.wml&#39;);
                            define (&#39;WEB&#39;,&#39;application/xhtml+xml&#39;);
                            $view = $_GET["view"];
                            
                            
                            $force = "";
                            //$force = "text/vnd.wap.wml";  //used for debugging
                            if ($force=="")
                            {
                            $mime = ((stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) ? "application/xhtml+xml" : "text/vnd.wap.wml");
                            }else{
                                $mime = $force;
                            }
                            
                            $charset = "utf-8";
                            header("content-type:$mime;charset=$charset");
                            
                            function waphead($pgtitle)
                            {
                                $ret = "<wml><card id=\"main\" title=\"$pgtitle\">";
                                return $ret;
                            }
                            function wapfoot()
                            {
                                $ret = "</card></wml>";
                                return $ret;
                            }
                            function webhead($pgtitle)
                            {
                                $ret = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" >";
                                $ret .= "<head>";
                                $ret .= "<title>$pgtitle</title>";
                                $ret .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/theme.css\" />";
                                $ret .= "</head><body>";
                                return $ret;
                            }
                            function webfoot()
                            {
                                $ret = "</body></html>";
                                return $ret;
                            }

                            Comment


                              #15
                              shall i put this in core(wml) or core(xhtml)? what about the details in one page?

                              Comment

                              Working...
                              X