Need a little help please converting wml file to html

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

    Need a little help please converting wml file to html

    I have a question about converting wml file to html...wml version of the script works but the html will not work. why?
    wml file
    Code:
    <?php
    
    header("Content-type: text/vnd.wap.wml;charset=UTF-8");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    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\">";
    ?>
    <wml>
    <?php
    include("../config.php");
    include("../core.php");
    
    connectdb();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $who = $_GET["who"];
    $uid = getuid_sid($sid);
    $page = $_GET["page"];
    
        if((islogged($sid)==false)||($uid==0))
    {
            echo "<card id=\"main\" title=\"$nazivsajta\">";
          echo "<p align=\"center\">";
          echo "Niste ulogovani<br/>";
          echo "ili vam je vreme isteklo!<br/><br/>";
          echo "<a href=\"index.php\"><img src=\"images/login.gif\" alt=\"LOGIN\"/>Uloguj Se!</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
    	  }
    $uid = getuid_sid($sid);
    if(isbanned($uid))
        {
            echo "<card id=\"main\" title=\"$nazivsajta\">";
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
          echo "Vi ste <b>banovani</b><br/>";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM batica_penalties WHERE uid='".$uid."' AND penalty='1'"));
        $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM batica_ppl WHERE id='".$uid."'"));
    
          $remain = $banto[0]- time(28800);
          $rmsg = gettimemsg($remain);
          echo "Vreme do isteka bana: $rmsg<br/><br/>";
        echo "Razlog Banovanja: $banres[0]";
    
          //echo "<a href=\"index.php\">Login</a>";
          echo "</p>";
          echo "</card>";
          echo "</wml>";
          exit();
        }
    addonline(getuid_sid($sid),"Rat Klanova","");
      echo "<card id=\"main\" title=\"Rat Klanova\">";
    
    include("on.php");
    function first()
    {
    echo "<p align=\"center\"><small>";
    echo "<a href=\"akmens.php?usr=$_GET[usr] &amp;sid=$_GET[sid]&amp;id=akmuo\">[Kamenolom]</a><br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=keisti_akmen\">[Promena radnika u kamenolomce]</a><br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=info\">[Informacije]</a><br/>";
    echo "----------<br/>";
    echo "<a href=\"zaidas.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[Meni Igre]</a></small></p>";
    }
    
    function akmens_skaldykla_first()
    {
    $kk = mysql_fetch_array(mysql_query("SELECT akmuo, akmenskaldziai, data_skald FROM war WHERE usr = '$_GET[usr]' "));
    $akmuo = strip_tags($kk['akmuo']);
    $akmenskaldziai = strip_tags($kk['akmenskaldziai']);
    $data_skald = strip_tags($kk['data_skald']);
    
    $data = date("ymdHis", strtotime("-20 minutes"));
    $skaldymas = $akmenskaldziai*2;
    if($data < $data_skald)
    {$veikla = "Odmor";}
    elseif($data >= $data_skald)
    {$veikla = "Spremni da rade";}
    
    echo "<p align=\"center\"><small>";
    echo "Ti imas: <b>$akmenskaldziai</b> kamenolomaca<br/>";
    echo "Oni mogu napraviti: <b>$skaldymas</b> kamena<br/>";
    echo "Kamenolomci: <b>$veikla</b><br/>";
    echo "---------<br/>";
    echo "<anchor>[Posalji u kamenolom]<go method=\"post\" href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=skaldyti\"><postfield name=\"akmenskaldziai\" value=\"$akmenskaldziai\"/></go></anchor><br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    
    function skaldo_akmeni()
    {
    $ll = mysql_fetch_array(mysql_query("SELECT akmuo, akmenskaldziai, data_skald FROM war WHERE usr = '$_GET[usr]' "));
    $akmuo = strip_tags($ll['akmuo']);
    $akmenskaldziai = strip_tags($ll['akmenskaldziai']);
    $data_skald = strip_tags($ll['data_skald']);
    
    $max_akm = $_POST[akmenskaldziai]*2;
    $priskaldyta = mt_rand(1, $max_akm);
    
    $dataa = date("ymdHis");
    
    $dabar = date("ymdHis", strtotime("-20 minutes"));
    
    if (($_POST[akmenskaldziai] != "") && ($_POST[akmenskaldziai] != "0") && ($dabar >= $data_skald) && ($_POST[akmenskaldziai] == $akmenskaldziai))
    {
    $new_akmuo = $akmuo + $priskaldyta;
    mysql_query("UPDATE war SET akmuo = '$new_akmuo', data_skald = '$dataa' WHERE usr = '$_GET[usr]' ");
    echo "<p align=\"center\"><small>";
    echo "Kamenolomci: <b>$priskaldyta</b><br/>";
    echo "Rezerve kamena: <b>+$priskaldyta</b><br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif(($_POST[akmenskaldziai] == "") || ($_POST[akmenskaldziai] == "0"))
    {
    echo "<p align=\"center\"><small>";
    echo "Nemas  kamenolomaca.<br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($dabar < $data_skald)
    {
    echo "<p align=\"center\"><small>";
    echo "Tvoji radnici  su umorni.<br/>Moras ih odmoriti <b>20</b> minuta.<br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($_POST[akmenskaldziai] != $akmenskaldziai)
    {
    echo "<p align=\"center\"><small>";
    echo "Ponasanje!!!<br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    }
    
    function keisti_first()
    {
    $ll = mysql_fetch_array(mysql_query("SELECT darbininkai FROM war WHERE usr = '$_GET[usr]' "));
    $darbininkai = strip_tags($ll['darbininkai']);
    echo "<p align=\"center\"><small>";
    echo "Ovde mozes da promenis  radnike u kamenolomce.<br/>Tvoji radnici: <b>$darbininkai</b><br/>Upisi koliko radnika menjas:<br/></small>";
    echo "<input type=\"text\" format=\"5N\" name=\"darbin\"/><br/>";
    echo "<small><anchor>[Promeni]<go method=\"post\" href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=keisti_akm\"><postfield name=\"darbin\" value=\"$(darbin)\"/></go></anchor><br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    
    function change()
    {
    $_POST[darbin] = str_replace("-", "", $_POST[darbin]);
    $z = mysql_fetch_array(mysql_query("SELECT darbininkai, akmenskaldziai FROM war WHERE usr = '$_GET[usr]' "));
    $akmenskaldziai = strip_tags($z['akmenskaldziai']);
    $darbinink = strip_tags($z['darbininkai']);
    
    $new_darbin = $darbinink - $_POST[darbin];
    $new_akmenskaldziai = $akmenskaldziai + $_POST[darbin];
    if(is_numeric($_POST[darbin]))
    {
    if (($_POST[darbin] != "") && ($darbinink >= $_POST[darbin]) && ($_POST[darbin] > 0))
    {
    mysql_query("UPDATE war SET darbininkai = '$new_darbin', akmenskaldziai = '$new_akmenskaldziai' WHERE usr = '$_GET[usr]' ");
    echo "<p align=\"center\"><small>";
    echo "Promenjeno $_POST[darbin] radnika u   $_POST[darbin] kamenolomce.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif ($_POST[darbin] == "")
    {
    echo "<p align=\"center\"><small>";
    echo "Nisu popunjena polja<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($_POST[darbin] > $darbinink)
    {
    echo "<p align=\"center\"><small>";
    echo "Nemas toliko radnika.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($_POST[darbin] <= 0)
    {
    echo "<p align=\"center\"><small>";
    echo "Nemas radnika.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    }
    else
    {
    echo "<p align=\"center\"><small>";
    echo "Mozes upisati samo brojeve!!!<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    }
    
    function info()
    {
    echo "<p align=\"center\"><small>";
    echo "<b>Kamenolom</b><br/>";
    echo "U kamenolomu tvoji radnici prave zalihe kamena. Jedan radnik napravi dva kamena.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    
    $db_connection = mysql_connect($db_host, $db_user, $db_pass);
    mysql_select_db($db_table, $db_connection);
    $tikr = mysql_num_rows(mysql_query("SELECT usr, pwd FROM war WHERE usr = '$_GET[usr]' "));
    
    if($tikr == 1)
    {
    if($_GET[id] == "")
    {first();}
    elseif($_GET[id] == "akmuo")
    {akmens_skaldykla_first();}
    elseif($_GET[id] == "skaldyti")
    {skaldo_akmeni();}
    elseif($_GET[id] == "keisti_akmen")
    {keisti_first();}
    elseif($_GET[id] == "keisti_akm")
    {change();}
    elseif($_GET[id] == "info")
    {info();}
    }
    else
    {
    echo "<p align=\"center\">";
    echo "<small>Nisi deo igre!!!<br/>";
    echo "</small></p>";
    }
    mysql_close($db_connection);
    
    echo "</card></wml>";
    ?>
    html file
    Code:
    <?php
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Content-type: text/html; charset=UTF-8");
    
    
    
    
    include("../core.php");
    
    include("../config.php");
    
    
    echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
    
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    
    echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
    
    
    
    	echo "<head>";
    
    
    
    	echo "<title>$ime</title>";
    
    	echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
    
    	echo "</head>";
    
    
    
    	echo "<body>";
    
    
    
    connectdb();
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $who = $_GET["who"];
    $rid=$_GET["rid"];
    $uid = getuid_sid($sid);
    $usr=$_GET["usr"];
    if((islogged($sid)==false)||($uid==0))
        {
          echo "<p align=\"center\">";
          echo "Niste Ulogovani!<br/>";
          echo "Ili je vas pristupni period istekao!<br/><br/>";
          echo "<a href=\"index.php\">Uloguj se!</a>";
          echo "</p>";
          exit();
        }
    
    if(isbanned($uid))
        {
          echo "<p align=\"center\">";
          echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
          echo "Vi ste <b>Banovani!</b><br/>";
          $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM batica_penalties WHERE uid='".$uid."' AND penalty='1'"));
          $remain = $banto[0]- time();
          $rmsg = gettimemsg($remain);
          echo "Vreme isteka Bana: $rmsg<br/><br/>";
          //echo "<a href=\"index.php\">Ulogujte se!</a>";
          echo "</p>";
          exit();
        }
    
    addonline(getuid_sid($sid),"Rat Klanova","");
    
    include("on.php");
    
    function first()
    {
    echo "<p align=\"center\"><small>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=akmuo\">[Kamenolom]</a><br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=keisti_akmen\">[Promena radnika u kamenolomce]</a><br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=info\">[Informacije]</a><br/>";
    echo "----------<br/>";
    echo "<a href=\"zaidas.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[Meni Igre]</a></small></p>";
    }
    
    function akmens_skaldykla_first()
    {
    $kk = mysql_fetch_array(mysql_query("SELECT akmuo, akmenskaldziai, data_skald FROM war WHERE usr = '$_GET[usr]' "));
    //$akmuo = strip_tags($kk['akmuo']);
    //$akmenskaldziai = strip_tags($kk['akmenskaldziai']);
    //$data_skald = strip_tags($kk['data_skald']);
    
    $akmuo = $kk[0];
      $akmenskaldziai=$kk[1]; 
    $data_skald =$kk[2];
    
    $data = date("ymdHis", strtotime("-20 minutes"));
    $skaldymas = $akmenskaldziai*2;
    if($data < $data_skald)
    {$veikla = "Odmor";}
    elseif($data >= $data_skald)
    {$veikla = "Spremni da rade";}
    
    
    
    echo "<p align=\"center\"><small>";
    echo "<form action=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=skaldyti\" method=\"post\">";
    echo "Ti imas: <b>$akmenskaldziai</b> kamenolomaca<br/>";
    echo "Oni mogu napraviti: <b>$skaldymas</b> kamena<br/>";
    echo "Kamenolomci: <b>$veikla</b><br/>";
    echo "---------<br/>";
    echo "<postfield name=\"akmenskaldziai\" value=\"$akmenskaldziai\"/>";
    
     
      echo "<br/><input type=\"Submit\" Name=\"Submit\" Value=\"Posalji u kamenolom\"></form>";
    
    
    //echo "<anchor>[Posalji u kamenolom]<go method=\"post\" href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=skaldyti\"> <postfield name=\"akmenskaldziai\" value=\"$akmenskaldziai\"/></go></anchor><br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    
    function skaldo_akmeni()
    {
    $ll = mysql_fetch_array(mysql_query("SELECT akmuo, akmenskaldziai, data_skald FROM war WHERE usr = '$_GET[usr]' "));
    //$akmuo = strip_tags($ll['akmuo']);
    //$akmenskaldziai = strip_tags($ll['akmenskaldziai']);
    //$data_skald = strip_tags($ll['data_skald']);
      $akmuo = $ll[0];
      $akmenskaldziai=$ll[1]; 
    $data_skald =$ll[2];
    
    $max_akm = $_POST[akmenskaldziai]*2;
    $priskaldyta = mt_rand(1, $max_akm);
    
    $dataa = date("ymdHis");
    
    $dabar = date("ymdHis", strtotime("-20 minutes"));
    
    if ( ($dabar >= $data_skald) && ($_POST[akmenskaldziai] == $akmenskaldziai))
    {
    $new_akmuo = $akmuo + $priskaldyta;
    mysql_query("UPDATE war SET akmuo = '$new_akmuo', data_skald = '$dataa' WHERE usr = '$_GET[usr]' ");
    echo "<p align=\"center\"><small>";
    echo "Kamenolomci: <b>$priskaldyta</b><br/>";
    echo "Rezerve kamena: <b>+$priskaldyta</b><br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif(($_POST[akmenskaldziai] == "") || ($_POST[akmenskaldziai] == "0"))
    {
    echo "<p align=\"center\"><small>";
    echo "Nemas  kamenolomaca.<br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($dabar < $data_skald)
    {
    echo "<p align=\"center\"><small>";
    echo "Tvoji radnici  su umorni.<br/>Moras ih odmoriti <b>20</b> minuta.<br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($_POST[akmenskaldziai] != $akmenskaldziai)
    {
    echo "<p align=\"center\"><small>";
    echo "Ponasanje!!!<br/>";
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    }
    
    function keisti_first()
    {
    $ll = mysql_fetch_array(mysql_query("SELECT darbininkai FROM war WHERE usr = '$_GET[usr]' "));
    $darbininkai = strip_tags($ll['darbininkai']);
    echo "<p align=\"center\"><small>";
    echo "<form action=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=keisti_akm\" method=\"post\">";
    
    echo "Ovde mozes da promenis  radnike u kamenolomce.<br/>Tvoji radnici: <b>$darbininkai</b><br/>Upisi koliko radnika menjas:<br/></small>";
    echo "<input type=\"text\" format=\"5N\" name=\"darbin\"/><br/>";
    echo "<postfield name=\"darbin\" value=\"$(darbin)\"/>";
    echo "<br/><input type=\"Submit\" Name=\"Submit\" Value=\"Zameni\"></form>";
    
    
    echo "---------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></p>";
    }
    
    function change()
    {
    $_POST[darbin] = str_replace("-", "", $_POST[darbin]);
    $z = mysql_fetch_array(mysql_query("SELECT darbininkai, akmenskaldziai FROM war WHERE usr = '$_GET[usr]' "));
    $akmenskaldziai = strip_tags($z['akmenskaldziai']);
    $darbinink = strip_tags($z['darbininkai']);
    
    $new_darbin = $darbinink - $_POST[darbin];
    $new_akmenskaldziai = $akmenskaldziai + $_POST[darbin];
    if(is_numeric($_POST[darbin]))
    {
    if (($_POST[darbin] != "") && ($darbinink >= $_POST[darbin]) && ($_POST[darbin] > 0))
    {
    mysql_query("UPDATE war SET darbininkai = '$new_darbin', akmenskaldziai = '$new_akmenskaldziai' WHERE usr = '$_GET[usr]' ");
    echo "<p align=\"center\"><small>";
    echo "Promenjeno $_POST[darbin] radnika u   $_POST[darbin] kamenolomce.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif ($_POST[darbin] == "")
    {
    echo "<p align=\"center\"><small>";
    echo "Nisu popunjena polja<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($_POST[darbin] > $darbinink)
    {
    echo "<p align=\"center\"><small>";
    echo "Nemas toliko radnika.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    elseif($_POST[darbin] <= 0)
    {
    echo "<p align=\"center\"><small>";
    echo "Nemas radnika.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    }
    else
    {
    echo "<p align=\"center\"><small>";
    echo "Mozes upisati samo brojeve!!!<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    }
    
    function info()
    {
    echo "<p align=\"center\"><small>";
    echo "<b>Kamenolom</b><br/>";
    echo "U kamenolomu tvoji radnici prave zalihe kamena. Jedan radnik napravi dva kamena.<br/>";
    echo "--------<br/>";
    echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
    }
    
    $db_connection = mysql_connect($db_host, $db_user, $db_pass);
    mysql_select_db($db_table, $db_connection);
    $tikr = mysql_num_rows(mysql_query("SELECT usr, pwd FROM war WHERE usr = '$_GET[usr]' "));
    
    if($tikr == 1)
    {
    if($_GET[id] == "")
    {first();}
    elseif($_GET[id] == "akmuo")
    {akmens_skaldykla_first();}
    elseif($_GET[id] == "skaldyti")
    {skaldo_akmeni();}
    elseif($_GET[id] == "keisti_akmen")
    {keisti_first();}
    elseif($_GET[id] == "keisti_akm")
    {change();}
    elseif($_GET[id] == "info")
    {info();}
    }
    else
    {
    echo "<p align=\"center\">";
    echo "<small>Nisi deo igre!!!<br/>";
    echo "</small></p>";
    }
    mysql_close($db_connection);
    
    echo "</body>";
    
    	echo "</html>";
    
    
    ?>
    pease help
    sigpichttp://happy.srecnica.com/web

    #2
    this is because alot of the html is still actually wml.

    changing the headers/doc type is not enough to say hey your now a html file act like it.

    for instance in your forms. your still using wml which does not exist in html.

    examples:

    format=\"5N\" doesnt exist in html.
    postfield also doesnt exist in html

    also wml align does not work in html although it may look like it does. its not valid in any way.

    align="center" - use css for this using a <p class="location/to/css/function" (example: <p class="align">)

    not using meta tags in the head section is not good practice.


    heres a basic form for you to look at.
    PHP Code:
    echo '<form action="sendpm.php" method="post">';
     echo 
    '<input type="text" name="post" value="" maxlength="500"/>';
      echo 
    '<input type="hidden" name="user" value="'.$User.'"/><br/>';
     echo 
    '<input name="submit" value="Send" type="submit"/>';
    echo 
    '</form><br/>';
    //
    //
    //
    //
    // 
    then to check if the form was submitted you do
    PHP Code:
    if (isset($_POST['submit'])) {
    // do the execution stuff here etc.
    }
    //
    //
    //
    //
    // 
    heres a alignment in action.

    Css file
    PHP Code:
     /* Alignment */
    p.align_left
    {
        
    text-alignleft;
    }
    //
    //
    //
    //
    // 
    file calling it.
    PHP Code:
    echo '<p class="align_left">';
    //code to be aligned here.
    echo '</p>';
    //
    //
    //
    // 
    obviously first you also call the stylesheet in question in the head

    this is just the basic stuff. im no good with mysql so dont ask me about that stuff.
    im a flat filer. pure php

    ignore all the // // // // in code boxes. its just to make the boxes bigger.
    <?php
    include ('Ghost');
    if ($Post == true) {
    echo '

    sigpic
    alt='coding-talk.com!!' />';
    echo 'Sharing Is Caring!';
    } else {
    echo '

    alt='the username GHOST has been comprimised!' />';
    echo 'OMG SOMEBODY HELP ME!!';
    }
    ?>

    Comment


      #3
      these examples that you said, in these files work normally, problem with this part of the script
      Code:
      function akmens_skaldykla_first()
      {
      $kk = mysql_fetch_array(mysql_query("SELECT akmuo, akmenskaldziai, data_skald FROM war WHERE usr = '$_GET[usr]' "));
      //$akmuo = strip_tags($kk['akmuo']);
      //$akmenskaldziai = strip_tags($kk['akmenskaldziai']);
      //$data_skald = strip_tags($kk['data_skald']);
      
      $akmuo = $kk[0];
        $akmenskaldziai=$kk[1]; 
      $data_skald =$kk[2];
      
      $data = date("ymdHis", strtotime("-20 minutes"));
      $skaldymas = $akmenskaldziai*2;
      if($data < $data_skald)
      {$veikla = "Odmor";}
      elseif($data >= $data_skald)
      {$veikla = "Spremni da rade";}
      
      
      
      echo "<p align=\"center\"><small>";
      echo "<form action=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=skaldyti\" method=\"post\">";
      echo "Ti imas: <b>$akmenskaldziai</b> kamenolomaca<br/>";
      echo "Oni mogu napraviti: <b>$skaldymas</b> kamena<br/>";
      echo "Kamenolomci: <b>$veikla</b><br/>";
      echo "---------<br/>";
      echo "<postfield name=\"akmenskaldziai\" value=\"$akmenskaldziai\"/>";
      
       
        echo "<br/><input type=\"Submit\" Name=\"Submit\" Value=\"Posalji u kamenolom\"></form>";
      
      
      //echo "<anchor>[Posalji u kamenolom]<go method=\"post\" href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=skaldyti\"> <postfield name=\"akmenskaldziai\" value=\"$akmenskaldziai\"/></go></anchor><br/>";
      echo "---------<br/>";
      echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
      }
      
      function skaldo_akmeni()
      {
      $ll = mysql_fetch_array(mysql_query("SELECT akmuo, akmenskaldziai, data_skald FROM war WHERE usr = '$_GET[usr]' "));
      //$akmuo = strip_tags($ll['akmuo']);
      //$akmenskaldziai = strip_tags($ll['akmenskaldziai']);
      //$data_skald = strip_tags($ll['data_skald']);
        $akmuo = $ll[0];
        $akmenskaldziai=$ll[1]; 
      $data_skald =$ll[2];
      
      $max_akm = $_POST[akmenskaldziai]*2;
      $priskaldyta = mt_rand(1, $max_akm);
      
      $dataa = date("ymdHis");
      
      $dabar = date("ymdHis", strtotime("-20 minutes"));
      
      if ( ($dabar >= $data_skald) && ($_POST[akmenskaldziai] == $akmenskaldziai))
      {
      $new_akmuo = $akmuo + $priskaldyta;
      mysql_query("UPDATE war SET akmuo = '$new_akmuo', data_skald = '$dataa' WHERE usr = '$_GET[usr]' ");
      echo "<p align=\"center\"><small>";
      echo "Kamenolomci: <b>$priskaldyta</b><br/>";
      echo "Rezerve kamena: <b>+$priskaldyta</b><br/>";
      echo "---------<br/>";
      echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
      }
      elseif(($_POST[akmenskaldziai] == "") || ($_POST[akmenskaldziai] == "0"))
      {
      echo "<p align=\"center\"><small>";
      echo "Nemas  kamenolomaca.<br/>";
      echo "---------<br/>";
      echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
      }
      elseif($dabar < $data_skald)
      {
      echo "<p align=\"center\"><small>";
      echo "Tvoji radnici  su umorni.<br/>Moras ih odmoriti <b>20</b> minuta.<br/>";
      echo "---------<br/>";
      echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
      }
      elseif($_POST[akmenskaldziai] != $akmenskaldziai)
      {
      echo "<p align=\"center\"><small>";
      echo "Ponasanje!!!<br/>";
      echo "---------<br/>";
      echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>";
      }
      }
      This part of the script does not work in html version. in WML works normal..
      sigpichttp://happy.srecnica.com/web

      Comment


        #4
        This
        PHP Code:
        echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>"
        ... write like

        PHP Code:
        echo '<a href="akmens.php?usr='.$_GET['usr'].'&amp;sid='.$_GET['sid'].'&amp;id=">[-Nazad-]</a></small></p>'
        ... all the way, this is all invalid: $_POST[akmenskaldziai] , it must be $_POST['akmenskaldziai'] or $_POST["akmenskaldziai"] ... $_GET[usr] same $_GET['usr'] ...
        And where is id=?

        <input type=\"Submit\" Name=\"Submit\" Value=\"Posalji u kamenolom\"> <<< This lowercase, name, value.

        Try it.
        Last edited by arnage; 26.06.12, 15:14.
        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

        Comment


          #5
          Originally posted by srecnica View Post
          these examples that you said, in these files work normally,
          they may seem to work normally for you now. but they are in "no" way valid with xhtml,
          sooner or later you will find a problem with them. may it be when you change your hosts that has stricter rules to
          abide by, or when its one of your members with a older version phone/browser not rendering html/wml together properly.
          either way somewhere down the line you will have issues with them.

          i only showed you the correct way "for" xhtml, you wanted help to convert "wml" to html/xhtml,
          its up to you whether you want valid pages or not. personally, id take VALID pages over sloppy work anyday.
          <?php
          include ('Ghost');
          if ($Post == true) {
          echo '

          sigpic
          alt='coding-talk.com!!' />';
          echo 'Sharing Is Caring!';
          } else {
          echo '

          alt='the username GHOST has been comprimised!' />';
          echo 'OMG SOMEBODY HELP ME!!';
          }
          ?>

          Comment


            #6
            Originally posted by arnage View Post
            This
            PHP Code:
            echo "<a href=\"akmens.php?usr=$_GET[usr]&amp;sid=$_GET[sid]&amp;id=\">[-Nazad-]</a></small></p>"
            ... write like

            PHP Code:
            echo '<a href="akmens.php?usr='.$_GET['usr'].'&amp;sid='.$_GET['sid'].'&amp;id=">[-Nazad-]</a></small></p>'
            ... all the way, this is all invalid: $_POST[akmenskaldziai] , it must be $_POST['akmenskaldziai'] or $_POST["akmenskaldziai"] ... $_GET[usr] same $_GET['usr'] ...
            And where is id=?

            <input type=\"Submit\" Name=\"Submit\" Value=\"Posalji u kamenolom\"> <<< This lowercase, name, value.

            Try it.

            Thank you so much in large letters was the problem
            <input type=\"Submit\" Name=\"Submit\" Value=\"Posalji u kamenolom\"> <<< This lowercase, name, value.
            problem solved tnx
            sigpichttp://happy.srecnica.com/web

            Comment


              #7
              Always welcome.
              <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

              Comment

              Working...
              X