this is like on lavalair.net, who knows how to do that coding?
Wml And Xhtml In One Page
Started on the old forum in April 2007 · view the original in the archive · old links redirect here
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&sid=$sid&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... _______…
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... _______…
<?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='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_ses($ses)."'");
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&ses=$ses&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&ses=$ses&svw=x\">XHTML Version</a>";
echo "
";
echo "
";
echo "© Wizard 2007";
echo "</p>";
echo wmlfoot();
}
}
?>
Yes you have now got the idea External image (may be gone) 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... _______…
Yes you have now got the idea External image (may be gone) lol
lol had to remove d script from my host cuz of hackin attempts lol
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... _______…
i agree. lazy mofookers. ill encode with zend b4 i upload again External image (may be gone)
make sure before put copyright by you and a url to main page echo ""; on all body heads so they see External image (may be gone)
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... _______…
i've encoded with zend lol. script is up but xhtml version is not complete
here is an example
core.php
<?php define ('WAP','text/vnd.wap.wml'); define ('WEB','application/xhtml+xml'); $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; }here is an example
core.php
<?php
define ('WAP','text/vnd.wap.wml');
define ('WEB','application/xhtml+xml');
$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;
}
index.php
<?php
include("core.php");
if($mime== WEB)
{
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($mime== WEB) {
echo webhead($pgtitle);
echo "
";
echo "<a href=\"index.php?view=w\">WML</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($pgtitle);
echo "
";
echo "<a href=\"index.php?view=x\">XHTML VIEW</a>";
echo "</p>";
echo wapfoot();
}
?>
core.php
<?php
define ('WAP','text/vnd.wap.wml');
define ('WEB','application/xhtml+xml');
$view = $_GET["view"];
if($view=="w")
{
$mime = "text/vnd.wap.wml";
}else if($view=="x")
{
$mime = "application/xhtml+xml";
}else if($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;
}
do not put that in ur script just upload those two pages
this is how i did my wml ans xhtml together for my gallery
else if($action=="gallery") { $script = $_GET["script"]; addonline(getuid_sid($sid),"Viewing Gallery",""); if($script=="wml"){ echo "<card id="main" title="Gallery Pics">"; echo " "; echo "<img src="../images/logo.gif" alt=""/> "; echo "Gallery Pics "; }else{ echo "<head>"; echo "<title>Gallery Pics</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>"; echo ""; echo "<img src="../images/logo.gif" alt=""/> "; echo "Gallery Pics"; } echo "<img src="../images/point.gif" alt="!"/>If ur browser cannot use the uploader email ur pics to afta_drk@hotmail.com dnt 4get 2 include ur username"; echo " <img src="../images/banner.gif" alt=""/> "; if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); echo "<a href="index.php?action=pics&sid=$sid&script=$script">Gallery Pics</a>($file_count) "; if(!($dp = opendir("../pics_adult"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); echo "<a href="../pics_adult/index.php?action=pics&type=adult&sid=$sid&script=$script">Adult Pics</a>($file_count) ";
echo "<img src="../images/banner.gif" alt=""/> "; echo " "; if($script=="wml"){ echo "<a href="../wap/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</card>"; }else{ echo "0<a accesskey="0" href="../web/index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo ""; echo "</body>"; } }