Pls. Check this code! Xhtml of Chatpost Converter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Leave a comment:


  • arg0s12
    replied
    whats the code for foot?

    Leave a comment:


  • kiLLeR-eyEd_14
    replied
    You can't call foot() as if it is not declared in core

    Leave a comment:


  • brand
    replied
    Originally posted by arg0s12 View Post
    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&amp;sid=$sid\">Chatro om Menu</a><br/>----<br/>";
    echo "<a href=\"index.php?action=main&amp;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&amp;sid=$sid\">Home</a><br/>";
    echo "</div>";
    foot();
    echo "</body>";
    }

    ?>

    </html>

    Pls. Help me to fixed, , thanks.
    from what i see here it could be
    Code:
    foot()
    and if u adding this code in genproc u wont need

    Code:
      ?>
    
    </html>
    on it hope this helps

    Leave a comment:


  • arg0s12
    replied
    no sir... i try to erase but its same process

    Leave a comment:


  • kiLLeR-eyEd_14
    replied
    Originally posted by arg0s12 View Post
    ahh, i forgot, even i change the convert.php? To genproc, the page stil blank,
    are u sure foot() function exists in ur core.php?

    Leave a comment:


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

    Leave a comment:


  • riderz
    replied
    change this
    Code:
    echo "<form action=\"convert.php?action=conv&amp;sid=$sid\" method=\"post\">";
    to
    Code:
    echo "<form action=\"genproc.php?action=conv&amp;sid=$sid\" method=\"post\">";
    and see if it works

    Leave a comment:


  • arg0s12
    replied
    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&amp;sid=$sid\">Chatro om Menu</a><br/>----<br/>";
    echo "<a href=\"index.php?action=main&amp;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&amp;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&amp;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&amp;sid=$sid\">RPG ChatRoom</a><br/>";
    echo "<a href=\"index.php?action=chat&amp;sid=$sid\">Chatro om Menu</a><br/>----<br/>";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\">Main menu</a>";
    echo "</div>";
    foot();
    echo "</body>";
    }
Working...
X