it is fully working in html version but when i translate it to wml it will turn you the first page of the site.help me pls to translate it to wml lavalair base script..tnx in advance 4 the help...
ADD this code to index.php
///////////////////////////////////////C2P Converter
else if($action=="pinoygsm")
{ addonline(getuid_sid($sid),"Converting Chatpost","");
$chatpost = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$plusses = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<head>";
echo "<title>C2P Converter</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "You currently have $chatpost[0] ChatPosts and $plusses[0] Plusses<br/>";
echo "1 ChatPost = 1 Plusses<br/>";
echo "Select number of ChatPosts you want to convert</br><br/>";
echo "<form action=\"index.php?action=convert&sid=$sid\" method=\"post\">";
echo " <select name=\"cp\">";
echo "<option value=\"50\">50</option>";
echo "<option value=\"100\">100</option>";
echo "<option value=\"300\">300</option>";
echo "<option value=\"500\">500</option>";
echo "</select><br/>";
echo "<input type=\"submit\" value=\"convert\"/>";
echo "</form>";
echo "<br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home Web</a>";
echo "</p>";
echo "</body>";
echo "exit();
}
/////////////////////////////////////////C2P Converter
else if($action=="convert")
{ addonline(getuid_sid($sid),"Converting ChatPost","");
echo "<head>";
echo "<title>C2P Converter</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$chatpost = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$cp = $_POST["cp"];
if($chatpost[0] >= $cp)
{ if($cp=="50")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "50 plusses was added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'50' WHERE id='".$uid."'");
} else if($cp=="100")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "100 pusses was added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'100' WHERE id='".$uid."'");
} else if($cp=="300")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "300 plusses was added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'300' WHERE id='".$uid."'");
} else if($cp=="500")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "500 plusses added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'500' WHERE id='".$uid."'");
} }else{
echo "Stupid! Insufficient ChatPost,Dont cheat bastard!";
} echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=pinoygsm&sid=$sid\">Ba ck</a><br/>";
echo "<br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms</a><br/>";
echo "<a href=\"index.php?action=forumindx&sid=$sid\">F orums</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "exit();
}
Usage for this code is
echo "<a href=\"index.php?action=pinoygsm&sid=$sid\">Co nvert Chatpost</a>";
Place that code anywhere in your index.php file.I only modified this script and add this to my index.php file,help me to fix it in wml..
ADD this code to index.php
///////////////////////////////////////C2P Converter
else if($action=="pinoygsm")
{ addonline(getuid_sid($sid),"Converting Chatpost","");
$chatpost = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$plusses = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<head>";
echo "<title>C2P Converter</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "You currently have $chatpost[0] ChatPosts and $plusses[0] Plusses<br/>";
echo "1 ChatPost = 1 Plusses<br/>";
echo "Select number of ChatPosts you want to convert</br><br/>";
echo "<form action=\"index.php?action=convert&sid=$sid\" method=\"post\">";
echo " <select name=\"cp\">";
echo "<option value=\"50\">50</option>";
echo "<option value=\"100\">100</option>";
echo "<option value=\"300\">300</option>";
echo "<option value=\"500\">500</option>";
echo "</select><br/>";
echo "<input type=\"submit\" value=\"convert\"/>";
echo "</form>";
echo "<br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home Web</a>";
echo "</p>";
echo "</body>";
echo "exit();
}
/////////////////////////////////////////C2P Converter
else if($action=="convert")
{ addonline(getuid_sid($sid),"Converting ChatPost","");
echo "<head>";
echo "<title>C2P Converter</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$chatpost = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
$cp = $_POST["cp"];
if($chatpost[0] >= $cp)
{ if($cp=="50")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "50 plusses was added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'50' WHERE id='".$uid."'");
} else if($cp=="100")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "100 pusses was added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'100' WHERE id='".$uid."'");
} else if($cp=="300")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "300 plusses was added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'300' WHERE id='".$uid."'");
} else if($cp=="500")
{ echo "$cp was deducted to your chatpost and<br/>";
echo "500 plusses added to your account.<br/>";
echo "<br/><a href=\"index.php?action=prostats&who=$uid& sid=$sid\">View Stats</a>";
$res = mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$cp' WHERE id='".$uid."'"); mysql_query ("UPDATE ibwf_users SET plusses=plusses+'500' WHERE id='".$uid."'");
} }else{
echo "Stupid! Insufficient ChatPost,Dont cheat bastard!";
} echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=pinoygsm&sid=$sid\">Ba ck</a><br/>";
echo "<br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms</a><br/>";
echo "<a href=\"index.php?action=forumindx&sid=$sid\">F orums</a><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "</p>";
echo "</body>";
echo "exit();
}
Usage for this code is
echo "<a href=\"index.php?action=pinoygsm&sid=$sid\">Co nvert Chatpost</a>";
Place that code anywhere in your index.php file.I only modified this script and add this to my index.php file,help me to fix it in wml..
Comment