Can u help me friend

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

    Can u help me friend

    this code is if 5 hours online

    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;
    $hours = intval($num);
    if(!onlinetime($uid))
    {
    if($hours==5)
    {
    $kano ="100";

    $msg = "".getnick_uid(getuid_sid($sid))."Congratulati on! 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."'");
    }
    }


    $ttime = time();
    $res = mysql_query("UPDATE ibwf_users SET resetime='".$ttime."' WHERE id='".$uid."'");
    $res = mysql_query("UPDATE ibwf_users SET lastact='".time()."' 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");
    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")."'");
    }
    }






    can u code me for inactive for 1days menus or -5000 plusses

    Added after 2 minutes:

    can u code me for inactive for 1days menus or -5000 plusses
    Last edited by darwin055; 16.01.11, 01:03.

    #2
    i up this topic please help me..

    Comment


      #3
      Hello Darwin055, with all the respect, people are bored from lavalair and most of them will not even read the code you wrote. One question that bothers me is: why don't some guys learn some basic php instead of trying to own big community sites by using codes of others?
      mysterio.al - programming is a functional art

      Comment


        #4
        lol, this is right also not code box for coding makes me mad lol
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          They dont wanna learn lol.
          have connected with http://adexchat.com ?
          Fun up with
          http://forum.adexchat.com

          Comment


            #6
            they praw that they r such a big coder on their site and came ere fo help and they still dont wanna practice d very basic php. Huh

            Comment


              #7
              hahaha its a simple mysql update to do it, why they want help for it?

              Comment


                #8
                You are right Khan89, some guys here prayed me to be an admin in their site, to show their users that they are internationally known. Hahaha!
                mysterio.al - programming is a functional art

                Comment


                  #9
                  its not so easy m8. learn coding is not sooo easy. but not sooo hard. and those who dont know anything,its the best time to learn.play around ur code in anywhere and keep selfbeliefness that u can learn n have own coded script.

                  Comment


                    #10
                    LOL.. Bro darwin just pm me or in my site..

                    Comment

                    Working...
                    X