Online privacy code

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

  • rap-4ever
    replied
    Originally posted by Loony View Post
    just had a quick glance thru the code but should
    Code:
    $bre = "SELECT showonline FROM ibwf_users WHERE name='".$item[0]."'";
    be
    Code:
    $bre = "SELECT showonline FROM ibwf_users WHERE name='".$item[2]."'";
    maybe this
    PHP Code:
    $bre = "SELECT showonline FROM ibwf_users WHERE id='".$item[2]."'"; 
    
    Last edited by rap-4ever; 03.01.10, 23:57.

    Leave a comment:


  • rap-4ever
    replied
    no mate...ur code is wrong

    Leave a comment:


  • Loony
    replied
    just had a quick glance thru the code but should
    Code:
    $bre = "SELECT showonline FROM ibwf_users WHERE name='".$item[0]."'";
    be
    Code:
    $bre = "SELECT showonline FROM ibwf_users WHERE name='".$item[2]."'";

    Leave a comment:


  • rap-4ever
    replied
    i am glad to see that... i succes do code in genproc and index.php to hide and show this option but i have problem in online list.

    Leave a comment:


  • riderz
    replied
    ohhh now i understand will have alook and see

    Leave a comment:


  • rap-4ever
    replied
    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 .
    Last edited by rap-4ever; 03.01.10, 18:38.

    Leave a comment:


  • riderz
    replied
    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 ?

    Leave a comment:


  • rap-4ever
    replied
    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

    Leave a comment:


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

    Leave a comment:


  • rap-4ever
    replied
    look at variable $bre

    Leave a comment:


  • rap-4ever
    started a topic Online privacy code

    Online privacy code

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


    PHP Code:
    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&amp;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&amp;who=$item[2]&amp;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&amp;who=$item[2]&amp;sid=$sid\">PP</a> | <a href=\"genproc.php?action=bud&amp;who=$item[2]&amp;sid=$sid&amp;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&amp;page=$ppage&amp;sid=$sid\">«Nazad</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"index.php?action=online&amp;page=$npage&amp;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&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
      echo "</p>";
      echo "</card>";
    } 
    
    here is sql
    PHP Code:
    ALTER TABLE `ibwf_users` ADD `showonline` INT( 1 ) NOT NULL 
    
Working...
X