Active User Today

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

    Active User Today

    On my forum I have online list with male and female....but me need code for active user today!
    That code go in List.php


    here the code of my online list:




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

    addonline(getuid_sid($sid),"Online List","");
    echo "<card id=\"main\" title=\"[".getnumonline()."] Online\">";


    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $num_items = getnumonline(); //changable
    $items_per_page= 5;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    //changable sql
    $sql = "SELECT
    a.name, b.place, b.userid FROM ibwf_users a
    INNER JOIN ibwf_online b ON a.id = b.userid
    GROUP BY 1,2
    LIMIT $limit_start, $items_per_page
    ";


    "<img src=\"images/online.gif\" alt=\"*\"/>
    ";
    echo "<p align=\"center\">";
    include (&#39;lastpost_wappyMOD2.php&#39;);
    echo "
    ";

    $timeout = 180;
    $timeon = time()-$timeout;
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>&#39;0&#39; AND lastact>&#39;".$timeon."&#39;"));
    echo "<a href=\"index.php?action=stfol&amp;sid=$sid\">Tim Online: ".$noi[0]."</a>
    ";
    echo "<a href=\"index.php?action=online&amp;sid=$sid\">*Osw ezi*</a>
    ";

    $tmsg = getpmcount(getuid_sid($sid));
    $umsg = getunreadpm(getuid_sid($sid));

    echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">*Inbox[$umsg-$tmsg]*</a>
    ";
    echo "</p>";
    echo "<p align=\"left\">";
    echo "";
    $items = mysql_query($sql);
    echo mysql_error();
    while ($item = mysql_fetch_array($items))
    {

    $gender = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$item[2]."&#39;"));
    if($gender[0]=="M") {
    $seximg = "<img src=\"images/male.gif\" alt=\"M\"/>";
    }else if($gender[0]=="F") {
    $seximg = "<img src=\"images/female.gif\" alt=\"F\"/>";
    }else{
    $seximg = "???";
    }


    $pr = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id=&#39;".$item[2]."&#39;"));
    if($pr[0]=="1") {
    $prm = "
    * Mod";
    }else if($pr[0]=="2") {
    $prm = "
    * Admin";
    }else if($pr[0]=="3") {
    $prm = "
    * Vlasnik";
    }else{
    $prm ="";
    }


    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$seximg $item[0]</a>";
    echo "$lnk$prm
    [$item[1]]
    -----
    ";
    }
    echo "
    </p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"index.php?action=online&amp;page=$ppage&amp ;sid=$sid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"index.php?action=online&amp;page=$npage&amp ;sid=$sid\">Next»</a>";
    }
    echo "
    $page/$num_pages
    ";
    if($num_pages>2)
    {
    echo getjumper($action, $sid,"index");
    }
    echo "</p>";
    ////// UNTILL HERE >>

    echo "<p align=\"center\">";
    $mols = mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id=&#39;2&#39;"));
    echo "Most online: $mols[1]
    ";

    $mols = mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt=&#39;".date("d m y")."&#39;"));
    echo "Most online today: $mols[0]
    ";

    $tm24 = time() - (24*60*60);
    $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39;"));
    echo mysql_error();
    echo "Active users today: <a href=\"lists.php?action=actmem&amp;sid=$sid\">$aut[0]</a>

    ";

    echo "<img src=\"http://besttop.mobi/c2.php?id=16727\" alt=\"*\"/>
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p>";
    echo "</card>";
    }On my forum I have online list with male and female....but me need code for active user today!
    That code go in List.php


    here the code of my online list:




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

    addonline(getuid_sid($sid),"Online List","");
    echo "<card id=\"main\" title=\"[".getnumonline()."] Online\">";


    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $num_items = getnumonline(); //changable
    $items_per_page= 5;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;

    //changable sql
    $sql = "SELECT
    a.name, b.place, b.userid FROM ibwf_users a
    INNER JOIN ibwf_online b ON a.id = b.userid
    GROUP BY 1,2
    LIMIT $limit_start, $items_per_page
    ";


    "<img src=\"images/online.gif\" alt=\"*\"/>
    ";
    echo "<p align=\"center\">";
    include (&#39;lastpost_wappyMOD2.php&#39;);
    echo "
    ";

    $timeout = 180;
    $timeon = time()-$timeout;
    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>&#39;0&#39; AND lastact>&#39;".$timeon."&#39;"));
    echo "<a href=\"index.php?action=stfol&amp;sid=$sid\">Tim Online: ".$noi[0]."</a>
    ";
    echo "<a href=\"index.php?action=online&amp;sid=$sid\">*Osw ezi*</a>
    ";

    $tmsg = getpmcount(getuid_sid($sid));
    $umsg = getunreadpm(getuid_sid($sid));

    echo "<a href=\"inbox.php?action=main&amp;sid=$sid\">*Inbox[$umsg-$tmsg]*</a>
    ";
    echo "</p>";
    echo "<p align=\"left\">";
    echo "";
    $items = mysql_query($sql);
    echo mysql_error();
    while ($item = mysql_fetch_array($items))
    {

    $gender = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id=&#39;".$item[2]."&#39;"));
    if($gender[0]=="M") {
    $seximg = "<img src=\"images/male.gif\" alt=\"M\"/>";
    }else if($gender[0]=="F") {
    $seximg = "<img src=\"images/female.gif\" alt=\"F\"/>";
    }else{
    $seximg = "???";
    }


    $pr = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id=&#39;".$item[2]."&#39;"));
    if($pr[0]=="1") {
    $prm = "
    * Mod";
    }else if($pr[0]=="2") {
    $prm = "
    * Admin";
    }else if($pr[0]=="3") {
    $prm = "
    * Vlasnik";
    }else{
    $prm ="";
    }


    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$seximg $item[0]</a>";
    echo "$lnk$prm
    [$item[1]]
    -----
    ";
    }
    echo "
    </p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"index.php?action=online&amp;page=$ppage&amp ;sid=$sid\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"index.php?action=online&amp;page=$npage&amp ;sid=$sid\">Next»</a>";
    }
    echo "
    $page/$num_pages
    ";
    if($num_pages>2)
    {
    echo getjumper($action, $sid,"index");
    }
    echo "</p>";
    ////// UNTILL HERE >>

    echo "<p align=\"center\">";
    $mols = mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id=&#39;2&#39;"));
    echo "Most online: $mols[1]
    ";

    $mols = mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt=&#39;".date("d m y")."&#39;"));
    echo "Most online today: $mols[0]
    ";

    $tm24 = time() - (24*60*60);
    $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39;"));
    echo mysql_error();
    echo "Active users today: <a href=\"lists.php?action=actmem&amp;sid=$sid\">$aut[0]</a>

    ";

    echo "<img src=\"http://besttop.mobi/c2.php?id=16727\" alt=\"*\"/>
    ";
    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p>";
    echo "</card>";
    }

    #2
    I`m sorry for duplicate in post

    Comment


      #3
      anybody know???
      please heeeeeelp

      Comment


        #4
        copy and paste this code index.php
        Code:
        else if($action=="actmem")
        {
        
          addonline(getuid_sid($sid),"Active Users today","index.php?action=$action");
            echo "<card id=\"main\" title=\"Active Users today\">";
            $tm24 = time() - (24*60*60);
                    $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39;"));
                    echo mysql_error();
            if($page=="" || $page<=0)$page=1;
            $num_items = $aut[0]; //changable
            $items_per_page= 5;
            $num_pages = ceil($num_items/$items_per_page);
            if($page>$num_pages)$page= $num_pages;
            $limit_start = ($page-1)*$items_per_page;
        
            $sql = "SELECT name, sex, lastact, id FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39; ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
           echo "
        
        ";
        $items = mysql_query($sql);
            echo mysql_error();
            while ($item = mysql_fetch_array($items))
            {
             if($item[1]==M)
          {
            $usex = "<img src=\"images/male.gif\" alt=\"M\"/>";
          }else if($item[1]==F){
            $usex = "<img src=\"images/female.gif\" alt=\"F\"/>";
          }else{ 
            $usex = "<img src=\"smilies/alien.gif\" alt=\"Shemale\"/>";
          }
           $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$item[0]</a>";
                      echo "$usex $lnk -".date("D d M y - H:i:s a", $item[2])."
        ";
        }
        
        echo "</p>";
            echo "<p align=\"center\">";
            if($page>1)
            {
              $ppage = $page-1;
              echo "<a href=\"index.php?action=actmem&amp;page=$ppage&amp;sid=$sid\">«PREV</a> ";
            }
            if($page<$num_pages)
            {
              $npage = $page+1;
              echo "<a href=\"index.php?action=actmem&amp;page=$npage&amp;sid=$sid\">Next»</a>";
            }
            echo "
        $page/$num_pages
        ";
            if($num_pages>2)
            {
              echo getjumper($action, $sid,"index");
            }
            echo "</p>";
          ////// UNTILL HERE >>
        
          echo "<p align=\"center\">";
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
        echo "Home</a>";
          echo "</p>";
          echo "</card>";
        }
        usage in index.php
        Code:
        $tm24 = time() - (24*60*60);
        $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39;"));
        echo mysql_error();
        echo "[size="1"]Active users today: <a href=\"index.php?action=actmem&amp;sid=$sid\">$aut[0]</a>[/size]
        
        ";

        Comment


          #5
          index.php
          Code:
          else if($action=="actmem")
          {
          
            addonline(getuid_sid($sid),"Active Users today","index.php?action=$action");
              echo "<card id=\"main\" title=\"Active Users today\">";
              $tm24 = time() - (24*60*60);
                      $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39;"));
                      echo mysql_error();
              if($page=="" || $page<=0)$page=1;
              $num_items = $aut[0]; //changable
              $items_per_page= 5;
              $num_pages = ceil($num_items/$items_per_page);
              if($page>$num_pages)$page= $num_pages;
              $limit_start = ($page-1)*$items_per_page;
          
              $sql = "SELECT name, sex, lastact, id FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39; ORDER BY lastact DESC LIMIT $limit_start, $items_per_page";
             echo "
          
          ";
          $items = mysql_query($sql);
              echo mysql_error();
              while ($item = mysql_fetch_array($items))
              {
               if($item[1]==M)
            {
              $usex = "<img src=\"images/male.gif\" alt=\"M\"/>";
            }else if($item[1]==F){
              $usex = "<img src=\"images/female.gif\" alt=\"F\"/>";
            }else{ 
              $usex = "<img src=\"smilies/alien.gif\" alt=\"Shemale\"/>";
            }
             $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$item[0]</a>";
                echo "$usex $lnk -  date("D d M y - H:i:s a",$item[2]) 
          ";
          echo "</p>";
              echo "<p align=\"center\">";
              if($page>1)
              {
                $ppage = $page-1;
                echo "<a href=\"index.php?action=actmem&amp;page=$ppage&amp;sid=$sid\">«PREV</a> ";
              }
              if($page<$num_pages)
              {
                $npage = $page+1;
                echo "<a href=\"index.php?action=actmem&amp;page=$npage&amp;sid=$sid\">Next»</a>";
              }
              echo "
          $page/$num_pages
          ";
              if($num_pages>2)
              {
                echo getjumper($action, $sid,"index");
              }
              echo "</p>";
            ////// UNTILL HERE >>
          
            echo "<p align=\"center\">";
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "Home</a>";
            echo "</p>";
            echo "</card>";
          }
          usage
          Code:
          $tm24 = time() - (24*60*60);
          $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>&#39;".$tm24."&#39;"));
          echo mysql_error();
          echo "[size="1"]Active users today: <a href=\"index.php?action=actmem&amp;sid=$sid\">$aut[0]</a>[/size]
          
          ";
          [/b]



          Rukiya i try this but i think that something need in list.php

          rukiya y try and have error on this line

          echo "$usex $lnk - date("D d M y - H:i:s a",$item[2])
          ";

          are you know where is problem in that code?

          Comment


            #6
            I have fixed the bugs.now just copy and paste the edited code above.and there is no file named list.php.it will belists.phpand just follow my instuction and get your desire fulfilled

            Comment


              #7
              yeah i do it!
              Now working
              Thank you very much rukiya

              Comment


                #8
                Thank you very much. It works for me......

                WapCHAT Forum Currenltly changing over to xhtml

                My Dowloads Site

                Comment


                  #9
                  its works, tnx

                  Comment


                    #10
                    can i use this coding in to wapdesire??

                    Comment


                      #11
                      Thank you that worked great

                      Comment


                        #12
                        how many times do i have to say this ffs wapdesire IS!!! lavalair

                        Comment


                          #13
                          funmobile + wapdesire = lavalair

                          nothing can replace the lavalair :D
                          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


                            #14
                            lavalair script has been updated from unrealx script

                            Comment


                              #15
                              lavalair script has been updated from unrealx script[/b]
                              yup only the ravingwap version hence why im saying lavalair 


                              Comment

                              Working...
                              X