Html To Wml

Started on the old forum in July 2007 · view the original in the archive · old links redirect here

31 replies · 1,521 views · started 19 years ago · 1 min read

4 participants
learner Lead · 587 posts #1

hi someone who has knowledge about wml please could you be kind enough to convert this for me from xhtml to wml pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee External image (may be gone) ill be very greatful you people have soo much knowledge but i have nothing.

<?php include ("config.php"); include ("core.php"); header("Content-type: text/html; charset=ISO-8859-1"); 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><title>$site_name</title>"; echo "<link rel="StyleSheet" type="text/css" href="style/style.css" />"; echo "<meta http-equiv="Cache-Control" content="must-revalidate" /> <meta http-equiv="Cache-Control" content="no-cache"/> <meta name="description" content="Chatheaven External image (may be gone)"> <meta name="keywords" content="free, community, forums, chat, wap, communicate"></head>"; echo "<body>"; $bcon = connectdb(); if (!$bcon) { echo " "; echo "<img src="../images/exit.gif" alt="*"/> "; echo "ERROR! cannot connect to database

"; echo "This error happens usually when backing up the database, please be patient, The site will be up any minute

"; echo "you can temperoray be in this site <a href="http://chatheaven.wen.ru">$site_name</a> while $site_name is offline "; echo "THANK YOU VERY MUCH"; echo " "; echo "</body>"; echo "</html>"; exit(); } $brws = explode(" ",$_SERVER[HTTP_USER_AGENT] ); $ubr = $brws[0]; $uip = getip(); $action = $_GET["action"]; $sid = $_GET["sid"]; $page = $_GET["page"]; $who = $_GET["who"];

$uid = getuid_sid($sid);

cleardata();

if(isipbanned($uip,$ubr)) { if(!isshield(getuid_sid($sid))) { echo " "; echo "<img src="../images/notok.gif" alt="x"/> "; echo "This IP address is blocked "; echo " "; echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over

"; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 ")); //echo mysql_error(); $remain = $banto[0] - time(); $rmsg = gettimemsg($remain); echo " IP: $rmsg

";

  echo "

"; echo "

"; echo "<form align="left" action="login.php" method="post" ENCTYPE="multipart/form-data">"; echo "UserID: <input name="loguid" format="*x" maxlength="30"/> "; echo "Password: <input type="password" name="logpwd" maxlength="30"/> "; echo "<postfield name="loguid" value="$(loguid)"/>"; echo "<postfield name="logpwd" value="$(logpwd)"/>"; echo "<input type="submit" value="Login!"/> "; echo "</form>";

echo " "; echo "</body>"; echo "</html>"; exit(); } } if(($action != "") && ($action!="terms")) { $uid = getuid_sid($sid); if((islogged($sid)==false)||($uid==0)) { echo "<card id="main" title="$site_name">"; echo " "; echo "You are not logged in "; echo "Or Your session has been expired

"; echo "<a href="index.php">Login</a>

"; echo " "; echo "</body>"; echo "</html>"; exit(); }

} //echo isbanned($uid); if(isbanned($uid)) { echo " "; echo "<img src="../images/notok.gif" alt="x"/> "; echo "You are Banned "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));

  $remain = $banto[0]- time();
  $rmsg = gettimemsg($remain);
  echo "Time to finish your penalty: $rmsg

"; echo "Ban Reason: $banres[0]"; //echo "<a href="index.php">Login</a>"; echo " "; echo "</body>"; echo "</html>"; exit(); }

$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");

?>

<?php //////////////////////////////////gallery List if($action=="gallery") { $who = $_GET["who"]; addonline(getuid_sid($sid),"Viewing Gallery",""); $uid = getuid_sid($sid); //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; if($who!="") { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery WHERE uid='".$who."'")); }else{ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery")); } $num_items = $noi[0]; //changable $items_per_page= 5; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; if($who!="") { $sql = "SELECT id, uid, file FROM gallery WHERE uid='".$who."' ORDER BY id DESC LIMIT $limit_start, $items_per_page"; }else{ $sql = "SELECT id, uid, file FROM gallery ORDER BY id DESC LIMIT $limit_start, $items_per_page"; } $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $user = getnick_uid($item[1]); $ext = getext($item[2]); $ime = getextimg($ext); $lnk = "<img src=\"gallery.php?id=$item[0]\" alt=\"$user\"/> <a href=\"../gallery/$item[2]\">$user</a>"; if(candelvl($uid, $item[0])) { $delnk = "<a href=\"genproc.php?action=delpic&amp;sid=$sid&amp;vid=$item[0]\">[x]</a>"; }else{ $delnk = ""; } if($who!="") { $byusr=""; }else{ $unick = getnick_uid($item[3]); $ulnk = "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$item[1]\">$unick</a>"; $byusr = "- By $ulnk"; } echo "$lnk $delnk "; } } echo " "; echo " "; if($page>1) { $ppage = $page-1; echo "<a href=\"pics.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;who=$who\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"pics.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;who=$who\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "<form action=\"pics.php\" method=\"get\">"; $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>"; $rets .= "<input type=\"submit\" value=\"GO\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "</form>"; echo $rets; } echo " "; ////// UNTILL HERE >> echo " "; echo "<a href=\"upload.php?action=uploader&amp;sid=$sid\">"; echo "Upload Gallery Pictures</a> "; if($who!="") { echo "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">"; $whonick = getnick_uid($who); echo "$whonick's Profile</a> "; }else{ echo "<a href=\"index.php?action=stats&amp;sid=$sid\">"; echo "<img src=\"../images/stat.gif\" alt=\"*\"/>Site Stats</a> "; } echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo " "; echo "</body>"; } echo "</html>"; ?>

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

FlareX #2

convert it urself lol

Guest #5

no one is here to spoon u the next thing u gona hear is am a coder dis n dat when u do get help,so hear what change the xhtml headings and ending to wml headings and endings eg the deck etc and the relevant tags (forms etc) if u cnt do that go do a tutorial cause that simply means u dnt knw what you r doing

Guest #6

that should be spoon feed. @flarex why dnt u just say u cnt change it rather than to say code it yourself

learner Lead · 587 posts #7

im not someone who will say im a coder brother i know im not and im not shy and yes i m very interested in learning coding but getting no help but yes i really would be greatful if one of u great coders do me this little help by converting it to wml from html coz i badly need it. thank you

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

FlareX #9

generalx , i can do both wml n xhtml , im making my own script atm , what are u doing? lol making updates 4 a script?

Guest #10

lol edit a script and change the pages doesnt mean YOU ARE WRITING YOUR OWN roflol, wtf u knw about me 4u to saying am making updates lmao u think i use peoples script like u do? ha dude get this straight my browser wont even allow me to download script from around here so how tf am to edit dude i do my own unlike u

Guest #11

script coded by flarex lol blaze should teach u a lession also. Changing updates and taking ownership "coding my own" am sick u so call coders

amylee Principal · 1,092 posts #12

script coded by flarex lol blaze should teach u a lession also. Changing updates and taking ownership "coding my own" am sick u so call coders

join the club

Guest #13

leaner the browser am using cnt quote and thats pretty long to rewrite look a wml tutorial here or google and learn about wml decks,cards etc its best to start from scratch trust me its the best way, unlike wannabs

metulj Super moderator Principal · 1,726 posts #14

gee.. how bout you two stop arguing? let's all have a cold beer? External image (may be gone)

meanwhile some good soul so called mod could close this topic cos wml gallery is posted few times... so author of this topic can get already made wml version by simple search External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

FlareX #15

im not talking bout that script lmfao , i started a nu1 from scratch

learner Lead · 587 posts #18

here is somethin i tried but it don't work

<?php include("config.php"); include("core.php"); 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\">";

$bcon = connectdb(); if (!$bcon) { echo "<card id="main" title="© xxxx (ERROR!)">"; echo " "; echo "<img src="images/exit.gif" alt="*"/> "; echo "ERROR! cannot connect to database

"; echo "This error happens usually when backing up the database, please be patient, The site will be up any

minute

"; echo "Soon, we will offer services that doesn't depend on MySQL databse to let you enjoy our site, while the database is

not connected "; echo "THANK YOU VERY MUCH"; echo " "; 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);

cleardata(); if(isipbanned($uip,$ubr)) { if(!isshield(getuid_sid($sid))) { echo "<card id="main" title="© xxxx">"; echo " "; echo "<img src="images/notok.gif" alt="x"/> "; echo "This IP address is blocked "; echo " "; echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to

log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is

over

"; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE penalty='2' AND

ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 ")); //echo mysql_error(); $remain = $banto[0] - time(); $rmsg = gettimemsg($remain); echo "Time to unblock the IP: $rmsg

";

  echo "

"; echo "

"; echo "UserID: <input name="loguid" format="*x" maxlength="30"/> "; echo "Password: <input type="password" name="logpwd" maxlength="30"/> "; echo "<anchor>LOGIN<go href="login.php" method="get">"; echo "<postfield name="loguid" value="$(loguid)"/>"; echo "<postfield name="logpwd" value="$(logpwd)"/>"; echo "</go></anchor>"; echo " "; echo "</card>"; echo "</wml>"; exit(); } } if(($action != "") && ($action!="terms")) { $uid = getuid_sid($sid); if((islogged($sid)==false)||($uid==0)) { echo "<card id="main" title="© xxxx">"; echo " "; echo "You are not logged in "; echo "Or Your session has been expired

"; echo "<a href="index.php">Login</a>"; echo " "; echo "</card>"; echo "</wml>"; exit(); }

} //echo isbanned($uid); if(isbanned($uid)) { echo "<card id="main" title="© xxxx">"; echo " "; echo "<img src="images/notok.gif" alt="x"/> "; echo "You are Banned "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND

penalty='1'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));

  $remain = $banto[0]- time();
  $rmsg = gettimemsg($remain);
  echo "Time to finish your penalty: $rmsg

"; echo "Ban Reason: $banres[0]"; //echo "<a href="index.php">Login</a>"; echo " "; echo "</card>"; echo "</wml>"; exit(); } $res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");

?>

<wml> <?php //////////////////////////////////gallery List if($action=="gallery") { $who = $_GET["who"]; addonline(getuid_sid($sid),"Viewing Gallery",""); $uid = getuid_sid($sid); //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; if($who!="") { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery WHERE uid='".$who."'")); }else{ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM gallery")); } $num_items = $noi[0]; //changable $items_per_page= 5; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; if($who!="") { $sql = "SELECT id, uid, file FROM gallery WHERE uid='".$who."' ORDER BY id DESC LIMIT $limit_start, $items_per_page"; }else{ $sql = "SELECT id, uid, file FROM gallery ORDER BY id DESC LIMIT $limit_start, $items_per_page"; } $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $user = getnick_uid($item[1]); $ext = getext($item[2]); $ime = getextimg($ext); $lnk = "<img src=\"gallery.php?id=$item[0]\" alt=\"$user\"/> <a href=\"../gallery/$item[2]\">$user</a>"; if(candelvl($uid, $item[0])) { $delnk = "<a href=\"genproc.php?action=delpic&amp;sid=$sid&amp;vid=$item[0]\">[x]</a>"; }else{ $delnk = ""; } if($who!="") { $byusr=""; }else{ $unick = getnick_uid($item[3]); $ulnk = "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$item[1]\">$unick</a>"; $byusr = "- By $ulnk"; } echo "$lnk $delnk "; } } echo " "; echo " "; if($page>1) { $ppage = $page-1; echo "<a href=\"pics.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;who=$who\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"pics.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;who=$who\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "<form action=\"pics.php\" method=\"get\">"; $rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/>"; $rets .= "<input type=\"submit\" value=\"GO\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "</form>"; echo $rets; } echo " "; ////// UNTILL HERE >> echo " "; echo "<a href=\"upload.php?action=uploader&amp;sid=$sid\">"; echo "Upload Gallery Pictures</a> "; if($who!="") { echo "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">"; $whonick = getnick_uid($who); echo "$whonick's Profile</a> "; }else{ echo "<a href=\"index.php?action=stats&amp;sid=$sid\">"; echo "<img src=\"../images/stat.gif\" alt=\"*\"/>Site Stats</a> "; } echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo " "; echo "</card>"; } ?> </wml>

the error i get is

Warning: Cannot modify header information - headers already sent by (output started at /home/aaaa/domains/xxxx.com/public_html/re/try.php:1) in /home/aaaa/domains/xxxx.com/public_html/re/try.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /home/aaaa/domains/xxxx.com/public_html/re/try.php:1) in /home/aaaa/domains/xxxx.com/public_html/re/try.php on line 5

Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

BEST MOBILE ADVERTISER

External image (may be gone)

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close