Online list help

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

    Online list help

    hey guys anyone can help me fast please who can make this online list to show where the user are it only show

    online/offline Username
    status: Owner
    Mood:

    i want to show online/offline Username
    Owner
    Mood
    Where (If its possible to help make the where a link so users can go to the place where they are would be nice)



    Code:
    else if($action=="online")
    {
    addvisitor();
     addonline(getuid_sid($sid),"Online","index.php?action=$action");
       echo "<head>";
       echo "<title>Online</title>";
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";
        echo "</head>";
        echo "<body>";
    	 // alerte
      $uid = getuid_sid($sid);
      $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lirpopups WHERE unread='1' AND touid='".$uid."'"));
      if ($unreadpopup[0]>0)
       {
       echo popup($sid);
       echo "</p>";
    echo "</body>";
     echo "</html>";
     exit();}
        //echo "<div><img src=\"images/onlinelist.gif\" alt=\"Online List\"/></div>";
     ///// echo user_link($uid);
      //////ALL LISTS SCRIPT <<
     if($page=="" || $page<=0)$page=1;
     $num_items = getnumonline(); //changable
        $items_per_page= 20;
     $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, a.hidden, b.place, b.userid sex FROM lirusers a
               INNER JOIN lironline b ON a.id = b.userid
               GROUP BY 1,2
               LIMIT $limit_start, $items_per_page";
    
      ///////////////vasy
     echo "<p align=\"center\">";
     $noi2 = mysql_fetch_array(mysql_query("SELECT count(*) FROM lirusers WHERE perm>'0'"));
     $timeout = 300;
     $timeon = time()-$timeout;
     $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lirusers WHERE perm>'0' AND hidden='0' AND lastact>'".$timeon."'"));
     $me = getuid_sid($sid);
     if($uid==$me)
    {
    $set = "<a href=\"index.php?action=stat&amp;sid=$sid\">(set status)</a>";
    }else{
    $set = "";
    } echo "$set<br/>";
     echo "Staff: <a href=\"index.php?action=stfol&amp;sid=$sid\">".$noi[0]."/$noi2[0]</a><br/>";
     echo "</p>";
     echo "<p align=\"left\">";
    $items = mysql_query($sql);
     echo mysql_error();
    while ($item = mysql_fetch_array($items))
     {
      if($item[1]==0) {
    //////////////////isus cristos
    $sex = mysql_fetch_array(mysql_query("SELECT sex FROM lirusers WHERE name='$item[0]'"));
    if($sex[0]=="M"){$usersex = "<img src=\"images/male.gif\" alt=\"(M)\"/>";}
    if($sex[0]=="F"){$usersex = "<img src=\"images/female.gif\" alt=\"(F)\"/>";}
    if($sex[0]=="") {$usersex = "<img src=\"images/male.gif\" alt=\"(M)\"/>";}
    ///{$usersex = isus2"";}
    if ($item[3]==1 || $item[3]==2 || $item[3]==3){
     $lnk = " <a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\" style=\"color:#FF0000\" style=\"font-weight:bold\">".getsimbol($item[3])."$item[0]</a>";}else{
     $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">".getsimbol($item[3])."$item[0]</a>";
     }
    if ($item[3]==1 || $item[3]==2 || $item[3]==3){
     echo "&#187;$usersex $lnk <br/> &#187;Status:".getstatus($item[3])."<br/>";
    }else{
     echo "&#187;$usersex $lnk <br/> &#187;Status:".getstatus($item[3])." <br/>";
    }
      $staters = mysql_fetch_array(mysql_query("SELECT stats FROM lirusers WHERE id='".$item[3]."'"));
    $stats = parsepm($staters[0], $sid);
    if($stats=="")
      {
      echo "";
      }else{
      echo "&#187;Message: $stats<br/>";
      }    echo "<small>------</small><br/>";
    }else{
     }
        }
    
    //////////////////////////////////////////ioon
      //////////// isus
      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\">&#171;Prev</a> ";
    echo "<b>|</b>";
     }
     if($page<$num_pages)
     {
       $npage = $page+1;
      echo "<a href=\"index.php?action=online&amp;page=$npage&amp;sid=$sid\">NExt&#187;</a>";
     }
     echo "<br/>$page/$num_pages";
     if($num_pages>2)
     {
      echo getjumper($action, $sid,"index");
     } echo "</p>";
    echo "<center>";
     echo "<small>Enter your name and see the member's profile</small><br/>";
     echo "Name:";
    echo "<form action=\"index.php?action=viewuser&amp;sid=$sid\" method=\"post\">";
     echo "<input name=\"mnick\" maxlength=\"15\"/>";
    echo "<input type=\"submit\" value=\"see profil\"/>";
      echo "</form>";
    echo "</center>";
     ////// UNTILL HERE >>
     include("ioon.php");
     echo "</body>";
    }
    Last edited by riderz; 08.08.09, 17:55.

    #2
    Well just take a look at
    Code:
    addonline(getuid_sid($sid),"Online","index.php?action=$action");
    Thats the real culprit
    when you are going to make a 'go there' or 'catch them' link then just echo this url, am sure index.php?action=online might be getting saved in ibwf_users in the place row so just echo place as you echo sex, mood etc , that should work fine but before you do this, you will have to go through all the code pages and make sure that addonline(getuid_sid($sid),"Online","index.php?act ion=$action");
    value is there for every action, like in chat.php it should be addonline(getuid_sid($sid),"Chatting in Heaven","chat.php?action=whateveritis");
    tinyurl.com/earnbymobile
    Easy earning for Indians
    ---------------------
    Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
    goo.gl/6vub3

    Comment


      #3
      Ok nice but i need help with the code to show where the user are lol this script im translating only show this
      online/offline Username
      status: Owner
      Mood:

      it dnt show where the user are hehe im really stupid tonight

      Comment


        #4
        Code:
        $sql = "SELECT
                   a.name, a.hidden, b.place, b.userid sex FROM lirusers a
                   INNER JOIN lironline b ON a.id = b.userid
                   GROUP BY 1,2
                   LIMIT $limit_start, $items_per_page";
        you are inner joining the row value place so just echo "<a href=\"$sql[2]\">Catch them</a>";
        tinyurl.com/earnbymobile
        Easy earning for Indians
        ---------------------
        Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
        goo.gl/6vub3

        Comment


          #5
          ive tried the code but it dnt link up the location where the user are it make it like http://unknown.co.za/L when u click on it
          Last edited by riderz; 10.08.09, 15:18.

          Comment


            #6
            Originally posted by riderz View Post
            ive tried the code but it dnt link up the location where the user are it make it like http://unknown.co.za/L when u click on it
            addonline(getuid_sid($sid),"Online","<a href=\"index.php?action=$action\");
            Last edited by riderz; 10.08.09, 15:18.
            sigpic

            Comment


              #7
              opti i have this error when using this link

              when i use
              Code:
              echo "Where:<a href=\"$sql[2]\">$item[2]</a><br/>";
              when click on link it show http://unknown.co.za/L
              when i use this code
              Code:
              echo "Where:<a href=\"$item[2]\">$item[2]</a><br/>";
              it give this link http://unknown.co.za/Online

              so it dnt give the link to go to the page where user are
              Last edited by riderz; 10.08.09, 15:18.

              Comment


                #8
                addonline(getuid_sid($sid),"<a href=\"index.php?action=online&amp;sid=$sid\">Onli ne List</a>","");

                change inwf_online

                place varchar 50

                to varchar 250.
                sigpic

                Comment


                  #9
                  that code only show my user id it dnt show the other users link they are still on http://unknown.co.za/L

                  and my user id give the full link
                  Last edited by riderz; 10.08.09, 15:19.

                  Comment


                    #10
                    what is stored in hidden in ur database. and what is stored in place.
                    the code above you gave is suppose to catch that.

                    Comment

                    Working...
                    X