Auto Plusses System

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

    Auto Plusses System

    Hi, I am thinking a new system for lavalair script is that users get plusses automatically according to his/her online time. When he spends 1 hour online time he will get 20 plusses. Per hour online time = 20 plusses. When he completes another 1 hour, he will get 20 plusses. This will happen automatically.

    Hope my coder friends will think on it and share here.
    Thanks.
    Wait...
    sigpic

    #2
    its already in wapnetph site..

    this is from core.php file..
    u can get idea here how to do it

    Code:
    function addonline($uid,$place,$plclink)
    {
      $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)
        {
    $kano ="100";
    $msg = "".getnick_uid(getuid_sid($sid))."Congratulation! You are lucky, coz even if you did not reach 5 hours. Youve got 100plusses n 100bp."."[br/][small]Note: This is an automated PM[/small]";
                            autopm($msg, $uid);
    $res = mysql_query("UPDATE ibwf_users SET plusses=plusses+'$kano' WHERE id='".$uid."'");
    $res = mysql_query("UPDATE ibwf_users SET onlinedone='1' WHERE id='".$uid."'");
    $res = mysql_query("UPDATE ibwf_users SET battlep=battlep+'$kano' WHERE id='".$uid."'");
    }
    LDSWAPWORLD sigpic
    site closed.
    im busy with other things in life like facebook , send me PM so i can add you
    www.pinoySG.com

    don't ask for help if you're not even helping yourself!
    i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


    Comment


      #3
      Originally posted by capofret View Post
      its already in wapnetph site..

      this is from core.php file..
      u can get idea here how to do it

      Code:
      function addonline($uid,$place,$plclink)
      {
        $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)
          {
      $kano ="100";
      $msg = "".getnick_uid(getuid_sid($sid))."Congratulation! You are lucky, coz even if you did not reach 5 hours. Youve got 100plusses n 100bp."."[br/][small]Note: This is an automated PM[/small]";
                              autopm($msg, $uid);
      $res = mysql_query("UPDATE ibwf_users SET plusses=plusses+'$kano' WHERE id='".$uid."'");
      $res = mysql_query("UPDATE ibwf_users SET onlinedone='1' WHERE id='".$uid."'");
      $res = mysql_query("UPDATE ibwf_users SET battlep=battlep+'$kano' WHERE id='".$uid."'");
      }
      Thanks but hard to understand. undefined function onlinetime() . explain plz or anybody try this.
      Wait...
      sigpic

      Comment


        #4
        I am not successful. That is not working. I am failed. The PM cant be sent automatically. Plz anybody help me.
        Last edited by anderson; 21.05.09, 06:47. Reason: Failed
        Wait...
        sigpic

        Comment


          #5
          wap.net.ph is good but with lots of bgs like auto plusses updated, i make bank sql, also articles sql in my site

          Comment


            #6
            i got error while adding

            PHP Code:
            if(!onlinetime($uid))
                {
            if(
            $hours==5)
                {
            $kano ="100";
            $msg "".getnick_uid(getuid_sid($sid))."Congratulation! You are lucky, coz even if you did not reach 5 hours. Youve got 100plusses n 100bp."."[br/][small]Note: This is an automated PM[/small]";
                                    
            autopm($msg$uid);
            $res mysql_query("UPDATE ibwf_users SET plusses=plusses+'$kano' WHERE id='".$uid."'");
            $res mysql_query("UPDATE ibwf_users SET onlinedone='1' WHERE id='".$uid."'");
            $res mysql_query("UPDATE ibwf_users SET battlep=battlep+'$kano' WHERE id='".$uid."'");
            }} 


            Fatal error: Call to undefined function onlinetime() in /home/godzilla/public_html/youngzwap/core.php on line 1461



            anybody please help me in this error
            Last edited by godzilla; 27.06.09, 10:37.

            Comment


              #7
              Originally posted by godzilla View Post
              i got error while adding

              PHP Code:
              if(!onlinetime($uid))
                  {
              if(
              $hours==5)
                  {
              $kano ="100";
              $msg "".getnick_uid(getuid_sid($sid))."Congratulation! You are lucky, coz even if you did not reach 5 hours. Youve got 100plusses n 100bp."."[br/][small]Note: This is an automated PM[/small]";
                                      
              autopm($msg$uid);
              $res mysql_query("UPDATE ibwf_users SET plusses=plusses+'$kano' WHERE id='".$uid."'");
              $res mysql_query("UPDATE ibwf_users SET onlinedone='1' WHERE id='".$uid."'");
              $res mysql_query("UPDATE ibwf_users SET battlep=battlep+'$kano' WHERE id='".$uid."'");
              }} 
              Fatal error: Call to undefined function onlinetime() in /home/godzilla/public_html/youngzwap/core.php on line 1461



              anybody please help me in this error
              error says all...
              you haven't define
              PHP Code:
              function onlinetime($xxxxx)
              {
              what function does

              in core.php
              It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
              ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
              ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
              キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

              Comment


                #8
                yes i want its function

                so can u please give me its function to add in core.

                Comment


                  #9
                  Originally posted by godzilla View Post
                  yes i want its function

                  so can u please give me its function to add in core.
                  Just download the whole script in scripts forum. You can see the full codes of this.
                  LDSWAPWORLD sigpic
                  site closed.
                  im busy with other things in life like facebook , send me PM so i can add you
                  www.pinoySG.com

                  don't ask for help if you're not even helping yourself!
                  i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


                  Comment


                    #10
                    Originally posted by capofret View Post
                    Just download the whole script in scripts forum. You can see the full codes of this.
                    i cant download that script bcoz its 12mb and its so heavy that my internet not able to download that script. I just need that auto pluses system function.Can u give that please.

                    Comment


                      #11
                      anybody please give me itz core coding.


                      thanks

                      Comment


                        #12
                        Originally posted by godzilla View Post
                        anybody please give me itz core coding.


                        thanks

                        here it is core.php. its for xhtml.hope this helps.
                        Attached Files
                        LDSWAPWORLD sigpic
                        site closed.
                        im busy with other things in life like facebook , send me PM so i can add you
                        www.pinoySG.com

                        don't ask for help if you're not even helping yourself!
                        i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


                        Comment


                          #13
                          ok thanks bro

                          i got error

                          Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/godzilla/public_html/wapfone/core.php on line 1443


                          i think it need sql.

                          do have sql for this bro.


                          PHP Code:
                          if(!onlinetime($uid))
                              {
                          if(
                          $hours==5)
                              {
                          $kano ="100";
                          $msg "".getnick_uid(getuid_sid($sid))."Congratulation! You are lucky, coz even if you did not reach 5 hours. Youve got 100plusses n 100bp."."[br/][small]Note: This is an automated PM. [/small]";
                                    
                          autopm($msg$uid);
                          $res mysql_query("UPDATE ibwf_users SET plusses=plusses+'$kano' WHERE id='".$uid."'");
                          $res mysql_query("UPDATE ibwf_users SET onlinedone='1' WHERE id='".$uid."'");
                          $res mysql_query("UPDATE ibwf_users SET battlep=battlep+'$kano' WHERE id='".$uid."'");
                          }

                          thanks
                          Last edited by godzilla; 29.06.09, 16:55.

                          Comment


                            #14
                            dont call me bro coz i am n0t lol. dont have sql for this but i think u can make one..u just have to add rows in ibwf_users table.look at the script what it needs.
                            LDSWAPWORLD sigpic
                            site closed.
                            im busy with other things in life like facebook , send me PM so i can add you
                            www.pinoySG.com

                            don't ask for help if you're not even helping yourself!
                            i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


                            Comment


                              #15
                              it need new row onlinedone

                              is this correct i maked

                              PHP Code:
                              `onlinedoneint(100NOT NULL default '0'

                              and do i have to add anything in login.php like

                              PHP Code:
                              mysql_query("UPDATE ibwf_users SET lastact='".time()."' WHERE id='".$idn."'"); 

                              Comment

                              Working...
                              X