Online list help

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

9 replies · 488 views · started 17 years ago · 1 min read

4 participants
riderz Lead · 975 posts #1

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)

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&sid=$sid\">(set status)</a>";
}else{
$set = "";
} echo "$set<br/>";
 echo "Staff: <a href=\"index.php?action=stfol&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&who=$item[3]&sid=$sid\" style=\"color:#FF0000\" style=\"font-weight:bold\">".getsimbol($item[3])."$item[0]</a>";}else{
 $lnk = "<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\">".getsimbol($item[3])."$item[0]</a>";
 }
if ($item[3]==1 || $item[3]==2 || $item[3]==3){
 echo "»$usersex $lnk <br/> »Status:".getstatus($item[3])."<br/>";
}else{
 echo "»$usersex $lnk <br/> »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 "»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&page=$ppage&sid=$sid\">«Prev</a> ";
echo "<b>|</b>";
 }
 if($page<$num_pages)
 {
   $npage = $page+1;
  echo "<a href=\"index.php?action=online&page=$npage&sid=$sid\">NExt»</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&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>";
}

Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

morse Senior · 364 posts #2

Well just take a look at

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?action=$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

riderz Lead · 975 posts #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


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

morse Senior · 364 posts #4
$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

riderz Lead · 975 posts #7

opti i have this error when using this link

when i use

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

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


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

opticalpigion Lead · 593 posts #8

addonline(getuid_sid($sid),"<a href="index.php?action=online&sid=$sid">Online List</a>","");

change inwf_online

place varchar 50

to varchar 250.

jayd21 Junior · 11 posts #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.

check outcoding-talk

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close