Pls. Check this code! Xhtml of Chatpost Converter
Collapse
X
-
from what i see here it could beOriginally posted by arg0s12 View Postthen the second, i'll try to put in genproc.php but when i try to test, the blank page appear, here's the code:
else if($action=="conv")
{
$cur = $_POST["cur"];
$hmany = $_POST["hmany"];
addonline(getuid_sid($sid),"xhtml - Converting Chatpost to Plusses","convert.php?action=convert");
echo "<head>";
echo "<title>$sitename Convert Chat Post to Plusses</title>";
echo "<div align=\"center\">";
$gpst = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
//$gpsf = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$uid."'"));
if($hmany>='10')
{
if($gpst[0]>=$hmany)
{
$convert = $hmany/5;
mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$hmany' WHERE id='".$uid."'");
mysql_query("UPDATE ibwf_users SET plusses=plusses+'$convert' WHERE id='".$uid."'");
echo "Converted Succesfully
<br/>";
echo "You Now Have:<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Chat Posts</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Plusses</b><br/>";
}else{
echo "Insufficient chatpost :p<br/>";
}
}else{
echo "Minumum of 10 chatpost are allowed to convert!<br/>";
}
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro om Menu</a><br/>----<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main menu</a>";
echo "</div>";
foot();
echo "</body>";
}
else
{
addonline(getuid_sid($sid),"xhtml - Lost in $sitename lol","convert.php?action=$action");
echo "<div align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a><br/>";
echo "</div>";
foot();
echo "</body>";
}
?>
</html>
Pls. Help me to fixed, , thanks.and if u adding this code in genproc u wont needCode:foot()
on it hope this helpsCode:?> </html>
Leave a comment:
-
are u sure foot() function exists in ur core.php?Originally posted by arg0s12 View Postahh, i forgot, even i change the convert.php? To genproc, the page stil blank,
Leave a comment:
-
ahh, i forgot, even i change the convert.php? To genproc, the page stil blank,
Leave a comment:
-
change this
toCode:echo "<form action=\"convert.php?action=conv&sid=$sid\" method=\"post\">";
and see if it worksCode:echo "<form action=\"genproc.php?action=conv&sid=$sid\" method=\"post\">";
Leave a comment:
-
then the second, i'll try to put in genproc.php but when i try to test, the blank page appear, here's the code:
else if($action=="conv")
{
$cur = $_POST["cur"];
$hmany = $_POST["hmany"];
addonline(getuid_sid($sid),"xhtml - Converting Chatpost to Plusses","convert.php?action=convert");
echo "<head>";
echo "<title>$sitename Convert Chat Post to Plusses</title>";
echo "<div align=\"center\">";
$gpst = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
//$gpsf = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$uid."'"));
if($hmany>='10')
{
if($gpst[0]>=$hmany)
{
$convert = $hmany/5;
mysql_query("UPDATE ibwf_users SET chmsgs=chmsgs-'$hmany' WHERE id='".$uid."'");
mysql_query("UPDATE ibwf_users SET plusses=plusses+'$convert' WHERE id='".$uid."'");
echo "Converted Succesfully
<br/>";
echo "You Now Have:<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Chat Posts</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Plusses</b><br/>";
}else{
echo "Insufficient chatpost :p<br/>";
}
}else{
echo "Minumum of 10 chatpost are allowed to convert!<br/>";
}
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro om Menu</a><br/>----<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main menu</a>";
echo "</div>";
foot();
echo "</body>";
}
else
{
addonline(getuid_sid($sid),"xhtml - Lost in $sitename lol","convert.php?action=$action");
echo "<div align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a><br/>";
echo "</div>";
foot();
echo "</body>";
}
?>
</html>
Pls. Help me to fixed, , thanks.
Leave a comment:
-
Pls. Check this code! Xhtml of Chatpost Converter
Hi to all coders, i have problem to this script, pls. Tell me what's wrong? I try to put this code at index.Php and it works,
if($action=="convert")
{
addonline(getuid_sid($sid),"xhtml - Converting Chatpost to Plusses","convert.php?action=$action");
echo "<title>C2P Converter</title>";
echo "<div align=\"center\">";
$tnick = getnick_uid($uid);
echo "Convert your Chatpost to Plusses here.<br/>";
echo "Exchange rate:<br/>";
echo "10 Chatpost = 2Plusses<br/><br/>";
echo "You Currently Have:<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Chat Posts</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'"));
echo "<b>$nopl[0] Plusses</b><br/><br/>";
echo "<form action=\"convert.php?action=conv&sid=$sid\" method=\"post\">";
//echo "<br/>Convertion Type:<br/><select name=\"cur\">";
//echo "<option value=\"1\">Plusses-GP</option>";
//echo "<option value=\"2\">BP-GP</option>";
//echo "</select><br/>";
echo "Enter amount of chatpost to convert into plusses:<br/><input name=\"hmany\" size=\"5\" maxlength=\"4\" format=\"*N\"/>";
echo "<input type=\"submit\" value=\"Convert\"/>";
echo "</form>";
//echo "<a href=\"chat.php?rid=23&sid=$sid\">RPG ChatRoom</a><br/>";
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro om Menu</a><br/>----<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main menu</a>";
echo "</div>";
foot();
echo "</body>";
}Tags: None
Leave a comment: