Convertion Problem

Started on the old forum in March 2008 · view the original in the archive · old links redirect here

2 replies · 535 views · started 18 years ago · 1 min read

2 participants
SpiderWap Lead · 622 posts #1
<?php

include("config.php");
@$name=$_GET['name'];
@$pass=$_GET['pass'];
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
print'<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="edit" title="Edit Details">

';
include("config.php");
$name= strtolower($name);
$query = "SELECT * FROM `landofwap_toplist` WHERE `name` = '".$name."' AND `pass` LIKE '".$pass."' ";
$result = mysql_query($query);
$otvet = mysql_fetch_array($result);
if($otvet['name']){
print "
Site URL:
[size="1"]".$otvet['link']."[/size]
<a href=\"update.php?action=1&name=".$name."&pass=".$pass."\">Change</a>

Description:
[size="1"] ".$otvet['description']."[/size]
<a href=\"update.php?action=2&name=".$name."&pass=".$pass."\">Change</a>

";
if($otvet['logo']){
print "logo:
<img src=\"".$otvet['logo']."\" alt=\"logo\"/>
<a href=\"update.php?action=3&name=".$name."&pass=".$pass."\">Change</a>

";
}else{
print "Logo :
None
<a href=\"update.php?action=3&name=".$name."&pass=".$pass."\">Change</a>

";
}
print "
Your Link:
[size="1"]$yoursite/in.php?id=".$otvet['id']."
to increase your rating.[/size]

<a href=\"index.php\">Main Menu</a>

";
}else{
echo '
Site Name:*
<input type="text" name="name"/>

Password:*
<input type="password" name="pass"/>

[url="'.$_SERVER["][Login][/url]

';
}
print"[size="1"][b](c) top.spiderwap[/b][/size]
</p>
</card>
</wml>";
?>

I want shis page to xhtml but strugling, the form action isn't my problem, my problem is cant login after changing this page...

Please some1 help and thanx in advance.

busterkeaton10 Developer · 68 posts #3

converting problem to WML...

<?php

############################################################################
############################################################################
##                                                                        ##
## This script is copyright Rupe Parnell (Starsol.co.uk) 2003.            ##
##                                                                        ##
## Distribution of this file, and/or any other files in this package, via ##
## any means, withour prior written consent of the author is prohibited.  ##
##                                                                        ##
## Starsol.co.uk takes no responsibility for any damages caused by the    ##
## usage of this script, and does not guarantee compability with all      ##
## servers.                                                               ##
##                                                                        ##
## Please use the contact form at                                         ##
## [url]http://www.starsol.co.uk/scripts/contact.php[/url] if you need any help or   ##
## have any questions about this script.                                  ##
##                                                                        ##
############################################################################
############################################################################

require('pss_variables.php');
$version = "v1.03";
$pscore = $_GET['pscore'];
$cscore = $_GET['cscore'];
$guess = $_GET['guess'];
?>

<?php // Enter all HTML you want to appear ABOVE the Paper, Scissors Stone script output between this line ?>

<html>
<head>
<title>Paper, Scissors, Stone</title>
</head>

<body>

<hr>

<?php // and this line ?>

<?php

echo"
<p align='center'>
<font face='$fontface' size='4'>[b][u]
Paper, Scissors, Stone
[/u][/b]</font>
</p>

<p align='center'>
";

if (!$pscore){
    $pscore='0';
}
if (!$cscore){
    $cscore='0';
}
$pscore = HTMLSpecialChars($pscore);
$cscore = HTMLSpecialChars($cscore);
$guess = HTMLSpecialChars($guess);
$number = rand(1,3);
if ($guess == 1) {
    $pchoice = "Paper";
        if ($number == 1) {
            $cchoice = "Paper";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,drew);
        }
        if ($number == 2) {
            $cscore = $cscore + 1;
            $cchoice = "Scissors";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,lost);
        }
        if ($number == 3) {
            $pscore = $pscore + 1;
            $cchoice = "Stone";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,won);
        }
}
if ($guess == 2) {
    $pchoice = "Scissors";
        if ($number == 1) {
            $pscore = $pscore + 1;
            $cchoice = "Paper";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,won);
        }
        if ($number == 2) {
            $cchoice = "Scissors";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,drew);
        }
        if ($number == 3) {
            $cscore = $cscore + 1;
            $cchoice = "Stone";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,lost);
        }
}
if ($guess == 3) {
    $pchoice = "Stone";
        if ($number == 1) {
            $cscore = $cscore + 1;
            $cchoice = "Paper";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,lost);
        }
        if ($number == 2) {
            $pscore = $pscore + 1;
            $cchoice = "Scissors";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,won);
        }
        if ($number == 3) {
            $cchoice = "Stone";
            echo_scores($pscore,$cscore,$pchoice,$cchoice,drew);
        }
}

echo "</p>
<p align='center'>
<font face='$fontface' size='3'>
Play: [url="'pss.php?guess=1&pscore=$pscore&cscore=$cscore'>Paper</a>,"]Scissors[/url] or <a href='pss.php?guess=3&pscore=$pscore&cscore=$cscore'>Stone</a>?
</font>

</p>

<p align='center'>
<font face='$fontface' size='1' color='#888888'>
Powered by: [url="'http://www.starsol.co.uk/scripts/'"]Starsol[/url] [i]Paper, Scissors, Stone game[/i] $version.
</font>

</p>";
?>

<?php // Enter all HTML you want to appear BELOW the Paper, Scissors Stone script output between this line ?>

<hr>

</body>
</html>

<?php // and this line ?>

<?php // Nothing needs to be edited below this line unless you know what you are doing.

function echo_scores($pscore,$cscore,$pchoice,$cchoice,$wld){

    global $player,$player_width,$player_height,$comp,$comp_width,$comp_height,$fontface;

    if ($wld == "won"){
        $text = "You chose $pchoice. The computer chose $cchoice. You won.";
    }
    if ($wld == "lost"){
        $text = "You chose $pchoice. The computer chose $cchoice. You lost.";
    }
    if ($wld == "drew"){
        $text = "You chose $pchoice. So did the computer. You drew.";
    }

    echo "<table width='100%' border='0' cellpadding='1' cellspacing='1'><tr><td width='50%' align='center'><img src='$player' width='$player_width' height='$player_height'><font face='$fontface' size='6'>[b]$pscore[/b]</font></td><td width='50%' align='center'><font face='$fontface' size='6'>[b]$cscore[/b]</font><img src='$comp' width='$comp_width' height='$comp_height'></td></tr><tr><td align='center' colspan='2'><font face='$fontface' size='3'>$text</td></tr></table>";

    return;
}

?>

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