Pls. Check this code! Xhtml of Chatpost Converter

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

9 replies · 387 views · started 16 years ago · 1 min read

4 participants
arg0s12 Developer · 144 posts #1

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 ""; $tnick = getnick_uid($uid); echo "Convert your Chatpost to Plusses here. "; echo "Exchange rate: "; echo "10 Chatpost = 2Plusses

";

echo "You Currently Have: "; $nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'")); echo "$nopl[0] Chat Posts ";

$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'")); echo "$nopl[0] Plusses

";

echo "<form action="convert.php?action=conv&sid=$sid" method="post">"; //echo " Convertion Type: <select name="cur">"; //echo "<option value="1">Plusses-GP</option>"; //echo "<option value="2">BP-GP</option>"; //echo "</select> "; echo "Enter amount of chatpost to convert into plusses: <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> "; echo "<a href="index.php?action=chat&sid=$sid">Chatroom Menu</a>

"; echo "<a href="index.php?action=main&sid=$sid">Main menu</a>"; echo ""; foot(); echo "</body>"; }

arg0s12 Developer · 144 posts #2

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 ""; $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 🙂 ";

echo "You Now Have: "; $nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'")); echo "$nopl[0] Chat Posts ";

$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'")); echo "$nopl[0] Plusses ";

}else{ echo "Insufficient chatpost 😛 "; } }else{ echo "Minumum of 10 chatpost are allowed to convert! "; }

echo "<a href="index.php?action=chat&sid=$sid">Chatroom Menu</a>

"; echo "<a href="index.php?action=main&sid=$sid">Main menu</a>"; echo ""; foot(); echo "</body>"; }

else { addonline(getuid_sid($sid),"xhtml - Lost in $sitename lol","convert.php?action=$action");

echo ""; echo "I don't know how did you get into here, but there's nothing to show

"; echo "<a href="index.php?action=main&sid=$sid">Home</a> "; echo ""; foot(); echo "</body>"; }

?>

</html>

Pls. Help me to fixed, , thanks.

riderz Lead · 975 posts #3

change this

echo "<form action=\"convert.php?action=conv&sid=$sid\" method=\"post\">";

to

echo "<form action=\"genproc.php?action=conv&sid=$sid\" method=\"post\">";

and see if it works


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

arg0s12 Developer · 144 posts #4

ahh, i forgot, even i change the convert.php? To genproc, the page stil blank,

arg0s12 Developer · 144 posts #6

no sir... i try to erase but its same process

brand Senior · 391 posts #7

arg0s12 wrote: 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 ""; $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 🙂 ";

echo "You Now Have: "; $nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'")); echo "$nopl[0] Chat Posts ";

$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$uid."'")); echo "$nopl[0] Plusses ";

}else{ echo "Insufficient chatpost 😛 "; } }else{ echo "Minumum of 10 chatpost are allowed to convert! "; }

echo "<a href="index.php?action=chat&sid=$sid">Chatroom Menu</a>

"; echo "<a href="index.php?action=main&sid=$sid">Main menu</a>"; echo ""; foot(); echo "</body>"; }

else { addonline(getuid_sid($sid),"xhtml - Lost in $sitename lol","convert.php?action=$action");

echo ""; echo "I don't know how did you get into here, but there's nothing to show

"; echo "<a href="index.php?action=main&sid=$sid">Home</a> "; echo ""; foot(); echo "</body>"; }

?>

</html>

Pls. Help me to fixed, , thanks.

from what i see here it could be

foot()

and if u adding this code in genproc u wont need

  ?>

</html>   

on it hope this helps

HELP THEM WHO HELPS YOU

External image (may be gone)

i only work on wapdesire v_2 coding only

arg0s12 Developer · 144 posts #9

whats the code for foot?

arg0s12 Developer · 144 posts #10

ill try to erase the foot code in core and and in index..

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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