Online privacy code

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

#online-priiivacy

10 replies · 571 views · started 16 years ago · 1 min read

3 participants
rap-4ever Developer · 180 posts #1

i tried to do this but dont working... here is my online list..

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

  addonline(getuid_sid($sid),"Online lista","");
    echo "<card id=\"main\" title=\"ONLINE\">";
    $tmsg = getpmcount(getuid_sid($sid));
  $umsg = getunreadpm(getuid_sid($sid));
  if($umsg>0)
  {
  echo "<small>»<a href=\"inbox.php?action=main&sid=$sid\">Privatne Poruke($umsg/$tmsg)</a><br/></small>";
  }

  //////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, b.place, b.userid, sex , a.onlinemsg, a.plusses 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><small>";
    $mols = mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id='2'"));
    print "Najvise online: <b>$mols[1]</b><br/>";
    $mols = mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
    print "Najvise online danas: <b>$mols[0]</b><br/><br/>";
    $items = mysql_query($sql);
    echo mysql_error();
   while ($item = mysql_fetch_array($items))
    {
      if ($item[3]=="M"){
      $icon = "<img src=\"images/male.gif\" alt=\"M\"/>";
      }else
      if ($item[3]=="F"){
      $icon = "<img src=\"images/female.gif\" alt=\"F\"/>";
      }
 if ($item[5]>="0"){
      $status = "Novajlija!";
      }else
     if ($item[5]>"24"){
      $status = "Mladji clan!";
      }
if ($item[5]>"49"){
      $status = "Pocetnik!";
      }
if ($item[5]>"249"){
      $status = "Stariji clan!";
      }
if ($item[5]>"499"){
      $status = "Dobar clan!";
      }
if ($item[5]>"749"){
      $status = "Super Clan";
      }
if ($item[5]>"999"){
      $status = "Dobar clan";
      }
if ($item[5]>"1499"){
      $status = "V.I.P";
      }
if ($item[5]>"1999"){
      $status = "Mator clan!";
      }
if ($item[5]>"2499"){
      $status = "Serbian World Kralj!";
      }
if ($item[5]>"2999"){
      $status = "No1!";
      }
if ($item[5]>"4999"){
      $status = "MATORA DRTINA!";
      }
if ($item[5]>"3999"){
      $status = "Serbian World Slatkish!";
      }
      $onlmsg = parsepm($item[4], $sid);
      $lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$item[0]</a>";
      echo "$icon $lnk<br/><b>Status:</b> $status<br/>";

$bre = "SELECT showonline FROM ibwf_users WHERE name='".$item[0]."'";
if ($bre[0]=1)
{
echo "<b>Where:</b> $item[1] <br/>";
}else
if ($bre[0]=0)
{
echo "<b>Online privacy!</b><br/>";
   }
echo "<b>Online message:</b> $onlmsg<br/><a href=\"inbox.php?action=sendpm&who=$item[2]&sid=$sid\">PP</a> | <a href=\"genproc.php?action=bud&who=$item[2]&sid=$sid&todo=add\">PR</a><br/>--------<br/>";
}
echo "</small></p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"index.php?action=online&page=$ppage&sid=$sid\">«Nazad</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"index.php?action=online&page=$npage&sid=$sid\">Napred»</a>";
    }
    echo "<br/>$page/$num_pages<br/>";
    if($num_pages>2)
    {
      echo getjumper($action, $sid,"index");
    }
    echo "</p>";
  ////// UNTILL HERE >>

  echo "<p align=\"center\">";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
  echo "</card>";
}

here is sql

ALTER TABLE `ibwf_users` ADD `showonline` INT( 1 ) NOT NULL
riderz Lead · 975 posts #3

what u want the code to do m8 sorry u didnt give much info on this


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

rap-4ever Developer · 180 posts #4

i want to code something like private profile but i want to code this in online list... when i click on online list (in main page) i must see something like this: add this user as friend if u want to see him in future in online list. sorry for bad english

riderz Lead · 975 posts #5

oh u want to make a code like

rider+ rap-4ever+ user+ user+ user+

when u click on the + or - it will remove the user from ur online list ?


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

rap-4ever Developer · 180 posts #6

noo i want to code something like this:

rap-4ever Status: Baby Where: You must add this user as friend to see this


rider Status: Moderator Where: Online list

*user who see this,is firiend with rider but not friend with rap-4ever .

riderz Lead · 975 posts #7

ohhh now i understand will have alook and see


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

rap-4ever Developer · 180 posts #11

Loony wrote: just had a quick glance thru the code but should

$bre = "SELECT showonline FROM ibwf_users WHERE name='".$item[0]."'";

be

$bre = "SELECT showonline FROM ibwf_users WHERE name='".$item[2]."'";

maybe this

 
$bre = "SELECT showonline FROM ibwf_users WHERE id='".$item[2]."'";

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