Online Total

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

    Online Total

    Put this code in index.php action=viewuser


    ////////////TOTAL TIME
    $totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$who."'"));
    $num = $totaltimeonline[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);

    echo "Ukupno Online:
    ";
    if(($days==0) and ($hours==0) and ($mins==0)){
    echo "$secs sekundi
    ";
    }else
    if(($days==0) and ($hours==0)){
    echo "$mins minuta, ";
    echo "$secs sekundi
    ";
    }else
    if(($days==0)){
    echo "$hours sati, ";
    echo "$mins minuta, ";
    echo "$secs sekundi
    ";
    }else{
    echo "$days dana, ";
    echo "$hours sati, ";
    echo "$mins minuta, ";
    echo "$secs sekundi
    ";
    }

    #2
    Insert to the ibwf_users table....
    `tottimeonl` int(100) NOT NULL default '0',

    Comment


      #3
      i cant seem to understand some of those words

      R.M.C
      ----------
      PHP Adovocate B)

      Comment


        #4
        i cant seem to understand some of those words [/b]
        post words you dont understand.. i'll translate them for you
        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


          #5
          Ok mate but i write this in my language because old people write in yours...

          Comment


            #6
            Variables are translating here the foreign words like $minutes =minuta, $hours = sati

            Comment


              #7
              The sql doesnt work for me.... Is it correct?

              Comment


                #8
                Put this code in index.php action=viewuser
                ////////////TOTAL TIME
                $totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$who."'"));
                $num = $totaltimeonline[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);

                echo "Ukupno Online:
                ";
                if(($days==0) and ($hours==0) and ($mins==0)){
                echo "$secs sekundi
                ";
                }else
                if(($days==0) and ($hours==0)){
                echo "$mins minuta, ";
                echo "$secs sekundi
                ";
                }else
                if(($days==0)){
                echo "$hours sati, ";
                echo "$mins minuta, ";
                echo "$secs sekundi
                ";
                }else{
                echo "$days dana, ";
                echo "$hours sati, ";
                echo "$mins minuta, ";
                echo "$secs sekundi
                ";
                }[/b]
                oh my...
                old news...
                and tht excatly the same code was posted here ages ago....
                ur lil late 2 reposting other dudes codes dude.....
                and oh btw u didnt even copy entire code... lmao
                sigpiceeeeerrr....

                Comment


                  #9
                  Thank you bro.....

                  Comment

                  Working...
                  X