Pls. Check this code! Xhtml of Chatpost Converter

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

    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>";
    }

    #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 "<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.

    Comment


      #3
      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
      ________________
      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

      Comment


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

        Comment


          #5
          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?
          My Blog: http://jhommark.blogspot.com
          My Facebook: http://www.facebook.com/jhommark
          My Official Site: http://www.undergroundweb.tk
          My Community Site: http://undergroundwap.xtreemhost.com

          Comment


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

            Comment


              #7
              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
              HELP THEM WHO HELPS YOU



              i only work on wapdesire v_2 coding only

              Comment


                #8
                You can't call foot() as if it is not declared in core
                My Blog: http://jhommark.blogspot.com
                My Facebook: http://www.facebook.com/jhommark
                My Official Site: http://www.undergroundweb.tk
                My Community Site: http://undergroundwap.xtreemhost.com

                Comment


                  #9
                  whats the code for foot?

                  Comment


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

                    Comment

                    Working...
                    X