Wml To Xhtml

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

    Wml To Xhtml

    plz could me help to convert dis to xhml..
    thnkz in advance.....

    Code:
    <?php
    include("config.php");
    include("core.php");
    //session_start();
    header("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    echo("<?xml version=\"1.0\"?>");
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    
    ?>
    
    <wml>
    <?php
    $bcon = connectdb();
    if (!$bcon)
    {
    echo "<card id=\"main\" title=\"(ERROR!)\">";
    echo "<p align=\"center\">";
    echo "[b]Error!
    Connection Lost.... Please Try Again[/b]";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    exit();
    }
    $brws = explode(" ",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    $uip = getip();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $who = $_GET["who"];
    $uid = getuid_sid($sid);
    $sitename = "WapTuga";
    $sitename = $sitename[0];
    cleardata();
    
    if(isipbanned($uip,$brw))
    {
    if(!isshield(getuid_sid($sid)))
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    echo "<p align=\"center\">";
    echo "This IP Address Is Blocked!
    ";
    $banto = mysql_fetch_array(mysql_query("SELECT  timeto FROM penalties WHERE  penalty=&#39;2&#39; AND ipadd=&#39;".$uip."&#39; AND browserm=&#39;".$ubr."&#39; LIMIT 1 "));
    $remain =  $banto[0] - time();
    $rmsg = gettimemsg($remain);
    echo "[b]Time Left: [/b]$rmsg
    ";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    exit();
    }
    }
    
    if(($action != "") && ($action!="terms"))
    {
    $uid = getuid_sid($sid);
    if((islogged($sid)==false)||($uid==0))
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    echo "<p align=\"center\">";
    echo "[b]Session Expired...[/b]";
    echo "
    ";
    echo "<a href=\"index.php\">Click Here</a>";
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    exit();
    }   
    }
    if(isbanned($uid))
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    echo "<p align=\"center\">";
    echo "[b]!BANNED![/b]
    ";
    $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39; OR uid=&#39;".$uid."&#39; AND penalty=&#39;2&#39;"));
    $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM users WHERE id=&#39;".$uid."&#39;"));
    $remain = $banto[0]- time();
    $rmsg = gettimemsg($remain);
    echo "[b]Time Left:[/b]$rmsg
    ";
    echo "[b]Reason:[/b]$banto[1]
    ";
    echo "</p>";
    echo mobads();
    echo "</card>";
    echo "</wml>";
    exit();
    }
      /////////////////////////////////////////////////main page
    else if($action=="main")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"Chapel","");
    echo "<p align=\"center\">";
    echo "<img src=\"images/chapel.jpg\" alt=\"Chapel\"/>
    ";
    echo "Welcome to the chapel of WapTuga!
    ";
    echo "Here you could marry with special people from Wap!
    ----
    ";
    echo "<a href=\"chapel.php?action=wnumpty&amp;sid=$sid\">What is marriege?</a>
    ";
    $uid = getuid_sid($sid);
    $isreq = mysql_fetch_array(mysql_query("SELECT rpen, uid FROM chapel WHERE mid=&#39;".$uid."&#39;"));
    if ($isreq[0]==1)
    {
    $wid = $isreq[1];
    $wnick = getnick_uid($wid);
    echo "$wnick Asked you to marry im $wnick. Do you promesse to give love andafection? [ele/ela]
    In the sickness and in the health?&#39;;
    ";
    echo "Do you accept?:
    ";
    echo "<anchor>Yes!";
    echo "<go href=\"chapel.php?action=conm&amp;sid=$sid\" method=\"post\">"; 
    echo "<postfield name=\"wid\" value=\"$wid\"/>";
    echo "</go></anchor>
    ";
    echo "<anchor>No!";
    echo "<go href=\"chapel.php?action=rejm&amp;sid=$sid\" method=\"post\">";  
    echo "<postfield name=\"wid\" value=\"$wid\"/>";
    echo "</go></anchor>
    ";
    }else{
    $mstat = mysql_fetch_array(mysql_query("SELECT ismd FROM chapel WHERE id=&#39;".$uid."&#39;"));
    if ($mstat[0]==0)
    {
    echo "<a href=\"chapel.php?action=rgetm&amp;sid=$sid\">Marry!</a>
    ";
    }else{
    echo "<a href=\"chapel.php?action=getd&amp;sid=$sid\">Divorce</a>
    ";
    }
    }
    echo "<a href=\"chapel.php?action=getd&amp;sid=$sid\">Divorce</a>
    ";
    echo "<img src=\"images/line.gif\" alt=\"line\"/>";
    echo "
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo "</p>";
    echo "</card>";
    }
    /////////////////////////////////////////////////// blady numpties! lol
    else if($action=="wnumpty")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"What is marrige..","");
    echo "<p align=\"center\">";
    echo "What is marrige?
    ";
    echo "Well [b]marry[/b] means [b]wap marriege[/b]
     its an way to express something you feal from someone!
    ";
    echo "Its completely free and fun! ... oh yes and it is reversable
     So enjoy and keep having fun!
    ";
    echo "<img src=\"images/line.gif\" alt=\"line\"/>";
    echo "
    <a href=\"chapel.php?action=main&amp;sid=$sid\">Back</a>
    ";
    echo "</p>";
    echo "</card>";
    }
    //////////////////////////////////////////////////// Request to get married, who?
    
    else if($action=="rgetm")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"Pedindo em casamento","");
    echo "<p align=\"center\">";
    echo "You want to marry with:
    ";
    echo "<input type=\"text\" name=\"who\" format=\"*x\" maxlength=\"20\"/>
    ";
    echo "<anchor>Ir";
    echo "<go href=\"chapel.php?action=getm&amp;sid=$sid\" method=\"post\">";
    echo "<postfield name=\"who\" value=\"$(who)\"/>";
    echo "</go></anchor>
    ";
    echo "NOTA: Please Note That This Is Just For Entertainment Purposes And Does NOT Constitute A Valid Mariage. lol
    
    Thank You And I Truelly Hope You Enjoy This Service
    ";
    echo "<img src=\"images/line.gif\" alt=\"line\"/>";
    echo "
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>
    ";
    echo "</p>";
    echo "</card>";
    }
    ///////////////////////////////////////////////////// Request to get married, final.
    
    else if($action=="getm")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"Asking Marrige","");
    echo "<p align=\"center\">";
    $who = $_POST["who"];
    $wid = getuid_nick($who);
    $uid = getuid_sid($sid);
    if($wid==0 OR $wid=="")
    {
    echo "Nickname doesnt exist!
    Please see if its right!
    ----
    ";
    echo "<a href=\"chapel.php?action=rgetm&amp;sid=$sid\">Back</a>
    ";
    }else{
    $iswhom = mysql_fetch_array(mysql_query("SELECT ismd FROM chapel WHERE mid=&#39;".$wid."&#39;"));
    if (!$iswhom)
    {
    $iswhom = mysql_fetch_array(mysql_query("SELECT ismd FROM chapel WHERE uid=&#39;".$wid."&#39;"));
    }
    if($iswhom[0]==&#39;1&#39;)
    {
    echo "Em que estas a pensar?.. Esta pessoa já está casada... Tem vergonha!
    ";
    }else{
    $iswhor = mysql_fetch_array(mysql_query("SELECT rpen FROM chapel WHERE mid=&#39;".$wid."&#39;"));
    if (!$iswhor)
    {
    $iswhor = mysql_fetch_array(mysql_query("SELECT rpen FROM chapel WHERE uid=&#39;".$wid."&#39;"));
    }
    if($iswhor[0]==&#39;1&#39;)
    {
    echo "$who as an reaquest!<br/If this is an problem tell to $who to reject the request
    ";
    }else{
    echo "Request sent to $who";
    mysql_query("INSERT INTO chapel SET rpen=&#39;1&#39;, mid=&#39;".$wid."&#39;, uid=&#39;".$uid."&#39;");
    }
    }
    }
    echo "
    <img src=\"images/line.gif\" alt=\"line\"/>";
    echo "
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>
    ";
    echo "</p>";
    echo "</card>";
    }
    ///////////////////////////////////////////////////// request devorce verify
    else if($action=="getd")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"Divorce","");
    echo "<p align=\"center\">";
    $uid = getuid_sid($sid);
    $wida = mysql_fetch_array(mysql_query("SELECT mid FROM chapel WHERE uid=&#39;".$uid."&#39;"));
    if (!$wida)
    {
    $wida = mysql_fetch_array(mysql_query("SELECT uid FROM chapel WHERE mid=&#39;".$uid."&#39;"));
    }
    $wid = $wida[0];
        echo "Do you have sure?
     Pelase confirm:
    ";
    echo "<anchor>Yes";
    echo "<go href=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";  
    echo "<postfield name=\"wid\" value=\"$(wid)\"/>";
    echo "</go></anchor>
    ";
    echo "<a href=\"chapel.php?action=main&amp;sid=$sid\">No!</a>
    ----
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>
    ";
    echo "</p>";
    echo "</card>";
    }
    /////////////////////////////////////////////////// get devorce final
    else if($action=="getdf")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"This wont be prety...","");
    echo "<p align=\"center\">";
    $wid = $_POST["wid"];
    $uid = getuid_sid($sid);
    echo "Done! Remember there are better people
    ----
    ";
    mysql_query("DELETE FROM chapel WHERE uid=&#39;".$uid."&#39; OR mid=&#39;".$uid."&#39;");
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo "</p>";
    echo "</card>";
    }
    ///////////////////////////////////////////////////  complete marrage
    else if($action=="conm")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"Their married!!","");
    echo "<p align=\"center\">";
    $wid = $_POST["wid"];
    $uid = getuid_sid($sid);
    $unick = getnick_uid($uid);
    $wnick = getnick_uid($wid);
    echo "You and $wnick are now married!!
    Congrats!!";
    mysql_query("UPDATE chapel SET ismd=&#39;1&#39;, mdy=&#39;".time()."&#39;, rpen=&#39;0&#39; WHERE mid=&#39;".$uid."&#39; AND uid=&#39;".$wid."&#39;");
    $jmtxt = "Chapel: $wnick and $unick just get married!";
    $jmtm = time();
    echo "
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo "</p>";
    echo "</card>";
    }
    ////////////////////////////////////////////////  reject marrage... ow! lol
    else if($action=="rejm")
    {
    echo "<card id=\"main\" title=\"$sitename\">";
    addonline(getuid_sid($sid),"This wont be pretty...","");
    echo "<p align=\"center\">";
    $wid = $_POST["wid"];
    $uid = getuid_sid($sid);
    $unick = getnick_uid($uid);
    $wnick = getnick_uid($wid);
    echo "You reject the request from $wnick.";
    mysql_query("DELETE FROM chapel WHERE uid=&#39;".$wid."&#39;");
    echo "
    <img src=\"images/line.gif\" alt=\"line\"/>";
    echo "
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo "</p>";
    echo "</card>";
    }
    ///////////////////////////////////////////////// the end lol
    else{
    addonline(getuid_sid($sid),"Lost in Chapel","");
    echo "<card id=\"main\" title=\"$sitename\">";
    echo "<p align=\"center\">";
    echo "I don&#39;t know how you got into here, but there&#39;s nothing to show
    
    ";
    echo "<img src=\"images/line.gif\" alt=\"line\"/>";
    echo "
    <a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
    echo "</p></card>";
    }
    ?>
    </wml>
    <div align="center">My Web Community ......... http://pahasara.net



    </div>

    #2
    post the sql too only then ill
    Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

    <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

    Comment


      #3
      post the sql too only then ill [/b]
      CREATE TABLE `chapel` (
      `uid` varchar(100) collate latin1_general_ci NOT NULL,
      `rpen` varchar(100) collate latin1_general_ci NOT NULL,
      `id` int(11) NOT NULL,
      `mid` int(11) NOT NULL,
      `ismd` varchar(100) collate latin1_general_ci NOT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;[/b]

      i want only convert these .....

      Code:
      echo "Do you accept?:
      ";
      echo "<anchor>Yes!";
      echo "<go href=\"chapel.php?action=conm&amp;sid=$sid\" method=\"post\">"; 
      echo "<postfield name=\"wid\" value=\"$wid\"/>";
      echo "</go></anchor>
      ";
      
      echo "<anchor>No!";
      echo "<go href=\"chapel.php?action=rejm&amp;sid=$sid\" method=\"post\">";  
      echo "<postfield name=\"wid\" value=\"$wid\"/>";
      echo "</go></anchor>
      ";
      Code:
      echo "<anchor>Yes";
      echo "<go href=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";  
      echo "<postfield name=\"wid\" value=\"$(wid)\"/>";
      echo "</go></anchor>
      ";
      thnkz
      <div align="center">My Web Community ......... http://pahasara.net



      </div>

      Comment


        #4
        here u go brother
        Code:
        echo "Do you accept?:
        ";
        echo "<form action=\"chapel.php?action=conm&amp;sid=$sid\" method=\"post\">"; 
        echo "<postfield name=\"wid\" value=\"$wid\"/>";
        echo "<input type=\"submit\" value=\"Yes\"/>";
        echo "</form>
        ";
        
        echo "<form action=\"chapel.php?action=rejm&amp;sid=$sid\" method=\"post\">";  
        echo "<postfield name=\"wid\" value=\"$wid\"/>";
        echo "<input type=\"submit\" value=\"No\"/>";
        echo "</form>
        ";
        
        
        
        
        echo "<form action=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";  
        echo "<postfield name=\"wid\" value=\"$(wid)\"/>";
        echo "<input type=\"submit\" value=\"Yes\"/>";
        echo "</form>
        ";
        Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

        <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

        Comment


          #5
          here u go brother
          Code:
          echo "Do you accept?:
          ";
          echo "<form action=\"chapel.php?action=conm&amp;sid=$sid\" method=\"post\">"; 
          echo "<postfield name=\"wid\" value=\"$wid\"/>";
          echo "<input type=\"submit\" value=\"Yes\"/>";
          echo "</form>
          ";
          
          echo "<form action=\"chapel.php?action=rejm&amp;sid=$sid\" method=\"post\">";  
          echo "<postfield name=\"wid\" value=\"$wid\"/>";
          echo "<input type=\"submit\" value=\"No\"/>";
          echo "</form>
          ";
          echo "<form action=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";  
          echo "<postfield name=\"wid\" value=\"$(wid)\"/>";
          echo "<input type=\"submit\" value=\"Yes\"/>";
          echo "</form>
          ";
          [/b]
          thnkz a lot bro........
          <div align="center">My Web Community ......... http://pahasara.net



          </div>

          Comment


            #6
            always welcome bro i asked u to put the sql because someone else here was also looking for it and its always nice to help and share is not it bro?
            Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

            <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

            Comment


              #7
              here u go brother
              Code:
              echo "Do you accept?:
              ";
              echo "<form action=\"chapel.php?action=conm&amp;sid=$sid\" method=\"post\">"; 
              echo "<postfield name=\"wid\" value=\"$wid\"/>";
              echo "<input type=\"submit\" value=\"Yes\"/>";
              echo "</form>
              ";
              
              echo "<form action=\"chapel.php?action=rejm&amp;sid=$sid\" method=\"post\">";  
              echo "<postfield name=\"wid\" value=\"$wid\"/>";
              echo "<input type=\"submit\" value=\"No\"/>";
              echo "</form>
              ";
              echo "<form action=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";  
              echo "<postfield name=\"wid\" value=\"$(wid)\"/>";
              echo "<input type=\"submit\" value=\"Yes\"/>";
              echo "</form>
              ";
              [/b]
              postfeild is a wml tag so this code is a mixture of wml and xhtml as a result it wont work
              this is the correct convertion
              Code:
              echo "Do you accept?:
              ";
              echo "<form action=\"chapel.php?action=conm&amp;sid=$sid\" method=\"post\">";
              echo "<input type=\"hidden\" name=\"wid\" value=\"$wid\"/>";
              echo "<input type=\"Submit\" name=\"Yes!\" value=\"yes\"></form>
              ";
              
              
              echo "<form action=\"chapel.php?action=rejm&amp;sid=$sid\" method=\"post\">";
              echo "<input type=\"hidden\" name=\"wid\" value=\"$wid\"/>";  
              echo "<input type=\"Submit\" name=\"No!\" value=\"no\"></form>
              ";
              
              
              echo "<form action=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";  
              echo "<input type=\"hidden\" name=\"wid\" value=\"$(wid)\"/>";
              echo "<input type=\"Submit\" name=\"Yes\" value=\"yes\"></form>
              ";

              Comment


                #8
                postfeild is a wml tag so this code is a mixture of wml and xhtml as a result it wont work
                this is the correct convertion
                Code:
                echo "Do you accept?:
                ";
                echo "<form action=\"chapel.php?action=conm&amp;sid=$sid\" method=\"post\">";
                echo "<input type=\"hidden\" name=\"wid\" value=\"$wid\"/>";
                echo "<input type=\"Submit\" name=\"Yes!\" value=\"yes\"></form>
                ";
                echo "<form action=\"chapel.php?action=rejm&amp;sid=$sid\" method=\"post\">";
                echo "<input type=\"hidden\" name=\"wid\" value=\"$wid\"/>";  
                echo "<input type=\"Submit\" name=\"No!\" value=\"no\"></form>
                ";
                echo "<form action=\"chapel.php?action=getdf&amp;sid=$sid\" method=\"post\">";  
                echo "<input type=\"hidden\" name=\"wid\" value=\"$(wid)\"/>";
                echo "<input type=\"Submit\" name=\"Yes\" value=\"yes\"></form>
                ";
                [/b]


                thnkz a lot bro..............
                <div align="center">My Web Community ......... http://pahasara.net



                </div>

                Comment


                  #9
                  oops yes rukiya bro is right i forgot that
                  Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                  <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                  Comment


                    #10
                    learn it to php.net ..

                    easy to learn PHP WML + xHTML scripts .

                    Comment


                      #11
                      why do u need two forms for this?

                      just use a select field or radio buttons with one form

                      Comment


                        #12
                        great idea wiz bru-up-
                        Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                        <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                        Comment

                        Working...
                        X