Online List Help Please

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

    Online List Help Please

    I've searched the forums and tried different pieces of code for the online list , but cant get it to work, I want my online list for it to show the users location as well as the mood , its for lavalair and the the coding im using is this, i would be very grateful if someone can take a look for me, I cant code i wish i could. Thanks in advance...Tz





    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>


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

    addonline(getuid_sid($sid),"Online Mood","");
    echo "<head>";
    echo "<title>Online Mood</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "

    ";
    $mmsg = parsepm(getsetmood(getuid_sid($sid)));
    $uid = getuid_sid($sid);
    $mood1 = parsepm($mood, $sid);
    $mood=getsetmood($item[3]);
    echo "Here You Can Set A &#39;mood&#39; To Display instead of your location in the online users list</p>";
    echo "<form action=\"genproc.php?action=upmood&amp;sid=$sid\" method=\"post\" name=\"form22\">";
    echo "

    Text:<input name=\"mmsg\" maxlength=\"100\"/>
    ";
    echo "<input type=\"submit\" value=\"Submit\" Name=\"Submit\"/></p></form>

    ";

    echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
    echo "</p>";
    echo "</body>";
    }</div><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    else if($action=="online")

    {



    addonline(getuid_sid($sid),"Online List","index.php?action=online");

    echo "<p align=\"center\">";
    echo "<head>";

    echo "<title>Online List</title>";
    echo "<meta http-equiv=\"refresh\" content=\"30; url=index.php?action=online&amp;sid=$sid\">";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

    echo "</head>";

    echo "<body>";

    echo "<img src=\"../images/onlinelist.gif\" alt=\"Online List\"/>";

    echo popup($sid);
    echo "</p>";
    //////ALL LISTS SCRIPT <<



    if($page=="" || $page<=0)$page=1;

    $num_items = getnumonline(); //changable

    $items_per_page= 10;

    $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.perm, 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

    ";

    echo "<p align=\"center\">";

    $items = mysql_query($sql);

    echo mysql_error();

    while ($item = mysql_fetch_array($items))

    {

    if($item[1]==&#39;0&#39;)

    {

    $tit = "";

    }if($item[1]==&#39;1&#39;)

    {

    $tit = "<img src=\"../images/mo.gif\" alt=\"(Moderator)\"/>";

    }if($item[1]==&#39;2&#39;)

    {

    $tit = "<img src=\"../images/ad.gif\" alt=\"(admin)\"/>";

    } if($item[1]==&#39;3&#39;)

    {

    $tit = "<img src=\"../images/ha.gif\" alt=\"(head admin)\"/>";

    } if($item[1]==&#39;4&#39;)

    {

    $tit = "<img src=\"../images/ow.gif\" alt=\"(owner)\"/>";

    }



    $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name=&#39;$item[0]&#39;"));

    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 = "";}

    if($item[1]>&#39;0&#39;)

    {

    $lnk = "$usersex<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit</a>";

    }else{

    $lnk = "$usersex<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit</a>";

    }

    $mood1 = parsepm($mood, $sid);
    $mood=getsetmood($item[3]);
    if($mood!="")
    {
    $item[2]="(".$mood.")";
    }
    echo "$lnk - $item[2]
    ";

    }

    //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 >>

    </div>

    #2
    use $item[2] to show the place... and the mood is the getmood or whatever its called...

    so something like
    Code:
    $lnk - $mood - $item[2]
    Is that what you mean?

    Comment


      #3
      <div class='quotetop'>QUOTE (WhiteWarrior @ Nov 1 2008, 01:55 AM) <{POST_SNAPBACK}></div>
      use $item[2] to show the place... and the mood is the getmood or whatever its called...

      so something like
      Code:
      $lnk - $mood - $item[2]
      Is that what you mean?[/b]
      Thank you, that was already in the coding though, i&#39;ve sorted it now only thing thats missing is the male/female icons on the online list for some reason they no longer show, but its working how i want it for now.. thanks again though

      Comment

      Working...
      X