Pls! Check this recode! If correct,

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

    Pls! Check this recode! If correct,

    Hi, to all coder's, since all my posted bout converter not working, i'll try to convert the wml to xhtml, as a newbie in php, will anyone help me or tell me if have a wrong syntax in my edit code,
    here's the code:
    for wml came from kaboom,
    5 chatpost = 1 plusses
    ($hmany)userchatpost/5 = plusses
    here my first mod in lava mod before ahehhe convert in xhtml ahehhe


    echo "<a href=\"index.php?action=w3c&amp;sid=$sid\">c2p converter</a><br/>";


    add in index.php
    [code]
    else if($action=="w3c")
    {

    addonline(getuid_sid($sid),"wml - chatpost convert","");
    echo "<card id=\"main\" title=\"CONVERTING\">";

    echo "<p align=\"center\">";

    echo "Convert 5 Chatpost to 1 Plusses choose chatpost.<br/>";
    echo "choose:<br/><select name=\"hmany\">";
    echo "<option value=\"5\">5</option>";
    echo "<option value=\"20\">20</option>";
    echo "<option value=\"80\">80</option>";
    echo "<option value=\"100\">100</option>";
    echo "<option value=\"200\">200</option>";
    echo "<option value=\"300\">300</option>";

    #2
    echo "<option value=\"500\">500</option>";
    echo "<option value=\"1000\">1000</option>";
    echo "<option value=\"2000\">2000</option>";
    echo "<option value=\"5000\">5000</option>";
    echo "<option value=\"10000\">10000</option>";
    echo "</select>";
    echo "<br/><anchor>go";
    echo "<go href=\"index.php?action=cptop&amp;sid=$sid\" method=\"post\">";
    echo "<postfield name=\"hmany\" value=\"$(hmany)\"/>";
    echo "</go></anchor>";
    echo "<br/>- - -<br/>";
    echo "<br/><a href=\"index.php?action=main&amp;sid=$sid&amp;brow se?\">";
    echo "main menu</a><br/>";
    echo "<do type=\"chatroom\" label=\"chatroom\"><go href=\"index.php?action=chat&amp;sid=$sid\"/></do>";
    echo "<do type=\"whos online\" label=\"whos online\"><go href=\"index.php?action=online&amp;sid=$sid\"/></do>";
    echo "<do type=\"downloads\" label=\"downloads\"><go href=\"index.php?action=vault&amp;sid=$sid\"/></do>";
    echo "<do type=\"article\" label=\"article\"><go href=\"articles.php?action=articles&amp;sid=$sid\"/></do>";

    Comment


      #3
      echo "<do type=\"kawap rpg\" label=\"kawap rpg\"><go href=\"rpg.php?action=main&amp;sid=$sid\"/></do>";
      echo "<do type=\"forums\" label=\"forum Index\"><go href=\"forum.php?action=main&amp;sid=$sid\"/></do>";
      echo "<do type=\"my setting\" label=\"my setting\"><go href=\"index.php?action=cpanel&amp;sid=$sid\"/></do>";

      echo "</p>";
      echo "</card>";
      }



      else if($action=="cptop")
      {
      $hmany = $_POST["hmany"];
      addonline(getuid_sid($sid),"wml - chat post convert","");
      echo "<card id=\"main\" title=\"CONVERTING\">";

      echo "<p>";
      echo "<do type=\"chatroom\" label=\"chatroom\"><go href=\"index.php?action=chat&amp;sid=$sid\"/></do>";
      echo "<do type=\"whos online\" label=\"whos online\"><go href=\"index.php?action=online&amp;sid=$sid\"/></do>";
      echo "<do type=\"forums\" label=\"forum Index\"><go href=\"forum.php?action=main&amp;sid=$sid\"/></do><br/>- - -<br/>";
      $noi = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
      if($noi[0]>=$hmany)

      Comment


        #4
        {
        echo "Converted Succesfully ";
        $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."'");
        }else{
        echo "You have insufficient Chatpost go to chat and flood !";
        }
        echo "<br/><br/>- - - - -<br/><br/>";
        echo "<a href=\"index.php?action=main&amp;sid=$sid&amp;brow se?\">";
        echo "main menu</a>";

        echo "<br/>";
        echo "<do type=\"chatroom\" label=\"chatroom\"><go href=\"index.php?action=chat&amp;sid=$sid\"/></do>";
        echo "<do type=\"whos online\" label=\"whos online\"><go href=\"index.php?action=online&amp;sid=$sid\"/></do>";
        echo "<do type=\"downloads\" label=\"downloads\"><go href=\"index.php?action=vault&amp;sid=$sid\"/></do>";
        echo "<do type=\"article\" label=\"article\"><go href=\"articles.php?action=articles&amp;sid=$sid\"/></do>";
        echo "<do type=\"kawap rpg\" label=\"kawap rpg\"><go href=\"rpg.php?action=main&amp;sid=$sid\"/></do>";

        Comment


          #5
          echo "<do type=\"forums\" label=\"forum Index\"><go href=\"forum.php?action=main&amp;sid=$sid\"/></do>";
          echo "<do type=\"my setting\" label=\"my setting\"><go href=\"index.php?action=cpanel&amp;sid=$sid\"/></do>";
          echo "</p>";
          echo "</card>";
          }
          sorry for posting, my phone have limit char.
          This is wml, and i convert in xhtml, pls. Check if correct, heres the code:

          Comment


            #6
            //////////////////////////C2p Converter

            else if ($action=="w3c")
            {

            addonline(getuid_sid($sid)
            "xhtml - chatpost convert","");
            echo "<title>Plusses Converter</title>";
            echo "<p align="\center"\>
            echo "Convert 5 chatpost to 1 plusses!<br/>Choose Plusses!<br/>";
            echo "Choose: <form action=\"index.php?action=cptop&amp;sid=$sid\" method=\"post\">";
            echo "choose:<br/><select name=\"hmany\">";
            echo "<option value=\"5\">5</option>";
            echo "<option value=\"20\">20</option>";
            echo "<option value=\"80\">80</option>";
            echo "<option value=\"100\">100</option>";
            echo "<option value=\"200\">200</option>";
            echo "<option value=\"300\">300</option>";
            echo "<option value=\"500\">500</option>";
            echo "<option value=\"1000\">1000</option>";
            echo "<option value=\"2000\">2000</option>";
            echo "<option value=\"5000\">5000</option>";

            Comment


              #7
              echo "<option value=\"10000\">10000</option>";
              echo "</select>";
              echo "<input name=\"hmany\" size=\"5\" maxlength=\"5\" format=\"*N\"/>";
              echo "<input type=\"submit\" value=\"convert\"/>";
              echo "</form>";

              echo "<br/>";
              echo "<a href=\chat.php?action=chat&amp;sid=$sid\">Chatroom </a>";
              echo "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";

              }
              else if ($action=="cptop")
              {
              $hmany = $_POST["hmany"]
              addonline(getuid_sid($sid),
              "xhtml - converter","";
              echo "<title>Converter</title>

              $noi = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
              if($noi[0]>=$hmany)
              {
              echo "Converted Succesfully ";
              $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."'");
              }else{
              echo "You have insufficient Chatpost go to chat and flood !";
              }
              echo "<br/><br/>- - - - -<br/><br/>";

              Comment


                #8
                usage:
                Code:
                echo "<a href=\"c2p.php?action=c2p&amp;sid=$sid\">Link Name</a><br/>";
                Attached Files

                Comment


                  #9
                  echo "<a href=\"index.php?action=main&amp;sid=$sid&amp;brow se?\">";
                  echo "main menu</a>";


                  echo "</p>";
                  echo "</body>";
                  }

                  here's all the code,
                  thanks, huwad, i'll try this, by the way, have your code for online stat, i have a code in core, but in profile, nothing, ,

                  Comment


                    #10
                    Originally posted by arg0s12 View Post
                    echo "<a href=\"index.php?action=main&amp;sid=$sid&amp;brow se?\">";
                    echo "main menu</a>";


                    echo "</p>";
                    echo "</body>";
                    }

                    here's all the code,
                    thanks, huwad, i'll try this, by the way, have your code for online stat, i have a code in core, but in profile, nothing, ,
                    what do you mean?? please clarify??

                    Comment


                      #11
                      O.K bro, i have code for 5 hours online stat, like pwap later, but my problem is what code that i put in users profile, e.g 5 hrs stat: 2 hrs, 39 mins, 50 sec.

                      Comment


                        #12
                        Here's the code:

                        //////////////////////Function add user to online list :P

                        function addonline($uid,$place,$plclink)
                        {
                        if($hidden[0]==0)
                        {
                        /////delete inactive users
                        $tm = time();
                        $timeout = $tm - 420; //time out = 5 minutes
                        $deloff = mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'");
                        ///now try to add user to online list
                        $lastactive2 = mysql_fetch_array(mysql_query("SELECT resetime FROM ibwf_users WHERE id='".$uid."'"));
                        $tolsla2 = time() - $lastactive2[0];
                        $totaltimeonline2 = mysql_fetch_array(mysql_query("SELECT onlinetime FROM ibwf_users WHERE id='".$uid."'"));
                        $totaltimeonline2 = $totaltimeonline2[0] + $tolsla2;
                        $onlinetime = mysql_fetch_array(mysql_query("SELECT onlinetime FROM ibwf_users WHERE id='".$uid."'"));
                        $num = $onlinetime[0]/86400;
                        $days = intval($num);
                        $num2 = ($num - $days)*24;
                        $hours = intval($num2);
                        $num3 = ($num2 - $hours)*60;
                        $mins = intval($num3);
                        $num4 = ($num3 - $mins)*60;
                        $secs = intval($num4);
                        if(!onlinetime($uid))
                        {
                        if($hours==5)
                        {
                        $text =

                        Comment


                          #13
                          "Congratulations you have reach the 5 hours online. You received 100 Plusses. Note: This is an automatic pm";
                          mysql_query("INSERT INTO ibwf_private SET text='".$text."', byuid='332', touid='".$uid."', timesent='".time()."'");
                          $res = mysql_query("UPDATE ibwf_users SET plusses=plusses+100 WHERE id='".$uid."'");
                          $res = mysql_query("UPDATE ibwf_users SET onlinedone='1' WHERE id='".$uid."'");
                          $res = mysql_query("UPDATE ibwf_users SET onlinetime='0' WHERE id='".$uid."'");
                          $res = mysql_query("UPDATE ibwf_users SET onlinedone='0' WHERE id='".$uid."'");
                          }
                          }

                          $ttime = time();
                          $res = mysql_query("UPDATE ibwf_users SET resetime='".$ttime."' WHERE id='".$uid."'");

                          $lastactive = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$uid."'"));
                          $tolsla = time() - $lastactive[0];
                          $totaltimeonline = mysql_fetch_array(mysql_query("SELECT onlinetime FROM ibwf_users WHERE id='".$uid."'"));
                          $totaltimeonline = $totaltimeonline[0] + $tolsla;

                          Comment


                            #14
                            $res = mysql_query("UPDATE ibwf_users SET onlinetime='".$totaltimeonline."' WHERE id='".$uid."'");

                            $res = mysql_query("UPDATE ibwf_users SET lastact='".time()."' WHERE id='".$uid."'");
                            $res = mysql_query("UPDATE ibwf_users SET lastseen='".$place."' WHERE id='".$uid."'");
                            $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");
                            if(!$res)
                            {
                            //most probably userid already in the online list
                            //so just update the place and time
                            $res = mysql_query("UPDATE ibwf_online SET actvtime='".$tm."', place='".$place."', placedet='".$plclink."' WHERE userid='".$uid."'");


                            }
                            }
                            $maxmem=mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE id='2'"));

                            $result = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online"));

                            if($result[0]>=$maxmem[0])
                            {
                            $tnow = date("D d M Y - H:i");

                            Comment


                              #15
                              mysql_query("UPDATE ibwf_settings set name='".$tnow."', value='".$result[0]."' WHERE id='2'");
                              }
                              $maxtoday = mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
                              if($maxtoday[0]==0||$maxtoday=="")
                              {
                              mysql_query("INSERT INTO ibwf_mpot SET ddt='".date("d m y")."', ppl='1', dtm='".date("H:i:s")."'");
                              $maxtoday[0]=1;
                              }
                              if($result[0]>=$maxtoday[0])
                              {
                              mysql_query("UPDATE ibwf_mpot SET ppl='".$result[0]."', dtm='".date("H:i:s")."' WHERE ddt='".date("d m y")."'");
                              }
                              }
                              what code that i put in profile? Thanks bro!

                              Comment

                              Working...
                              X