No Buddies Online Help :0)

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

    No Buddies Online Help :0)

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
    echo web_head($uid);
    addonline(getuid_ses($ses),"Viewing My Buddies List","");
    $uid=getuid_ses($ses);
    echo "
    <img src=\"../phpThumb/phpThumb.php?src=../images/chat.gif\" alt=\"buddylist\"/>
    ";
    $bmsg=getbbcode(getbudmsg($uid),$ses,0);
    if($bmsg!="")
    {
    echo "($bmsg)";
    }else{
    echo "No Mood";
    }
    echo popup($ses);

    if($page==""||$page<=0)$page=1;
    $num_items=getonbuds(getuid_ses($ses));
    $items_per_page=10;
    $num_pages=ceil($num_items/$items_per_page);
    if(($page>$num_pages)&&$page!=1)$page=$num_pages;
    $limit_start=($page-1)*$items_per_page;

    $sql="
    SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt
    FROM members a INNER JOIN buddies b ON (a.id = b.uid)
    OR (a.id=b.tid) WHERE (b.uid=&#39;".getuid_ses($ses)."&#39; OR
    b.tid=&#39;".getuid_ses($ses)."&#39;) AND b.agreed=&#39;1&#39; AND
    a.id!=&#39;".getuid_ses($ses)."&#39; GROUP BY 1,2 ORDER BY
    a.lastact DESC LIMIT $limit_start, $items_per_page";

    echo "<p align=\"center\">";
    $items=mysql_query($sql);
    echo mysql_error();
    if(mysql_num_rows($items)>0)
    {
    while($item=mysql_fetch_array($items))
    {
    if(isonline($item[2]))
    {
    $style="style=\"font-size:10px;color:#009900\"";$status="online!";
    $bmsg=getbbcode(getbudmsg($item[2]),$ses,0);
    if($bmsg!="")
    {
    $budmood="($bmsg)";
    }else{
    $budmood="No Mood";
    }
    echo "<a href=\"profile.php?ses=$ses&amp;who=$item[2]\">$item[1]</a>";
    echo " - $status
    $budmood
    ";}
    }
    }else{
    echo "No Buddies Online Atm..
    "; /////it dont show up
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
    echo "<a href=\"buds.php?ses=$ses&amp;view=$view&amp;page=" .($page-1)."\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
    echo "<a href=\"buds.php?ses=$ses&amp;view=$view&amp;page=" .($page+1)."\">Next»</a>";
    }
    echo "
    $page/$num_pages
    ";
    if($num_pages>2)
    {
    echo pagejump($ses,"buds");
    }
    echo "</p>";


    echo "<p align=\"center\">";
    echo "<a accesskey=\"2\" href=\"buds.php?ses=$ses\">Refresh</a>
    ";
    echo "<a accesskey=\"4\" href=\"inbox.php?where=popdialog&amp;sid=$sid\">Po pup Dialog</a>
    ";
    $popmsgs=mysql_fetch_array(mysql_query("SELECT popmsg FROM members WHERE id=&#39;".$uid."&#39;"));
    if($popmsgs[0]==0){
    echo "<a accesskey=\"5\" href=\"settings.php?where=popon&amp;sid=$sid\">Ena ble Popups</a>
    ";
    }else{
    echo "<a accesskey=\"5\" href=\"settings.php?where=popoff&amp;sid=$sid\">Di sable Popups</a>
    ";}
    echo "<a accesskey=\"6\" href=\"mood.php?ses=$ses\">Change Mood</a>
    ";
    echo "<a accesskey=\"5\" href=\"Offline.php?ses=$ses\">Offline Buds</a>
    ";

    $chat=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chat_online"));
    echo "<a $key1 href=\"inbox.php?ses=$ses\">Inbox</a>
    ";
    echo "<a $key2 href=\"forums.php?where=forumindx&amp;ses=$ses\">F orums</a>
    ";
    echo "<a $key3 href=\"online.php?ses=$ses\">Online List(".getnumonline().")</a>
    ";
    echo "<a $key4 href=\"chat1.php?where=chat&amp;ses=$ses\">ChatRoo ms($chat[0])</a>
    ";
    echo "<a $key0 href=\"main.php?ses=$ses\">
    <img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>
    ";
    echo webfoot();
    exit();
    </div>
    hi i got online and offlinr buts list and trying to get it so then no ones online it will say No Buddies Online Atm.. but its not working for me lol

    #2
    What is this im your lavalair support ??

    Amylee and blaze need to pay me lol

    jj guys

    Well i will look at this code for you.
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #3
      thanks bro i been trying to do it all weakend lol but all i get is some thing like this pmsl


      No Buddies Online Atm..
      No Buddies Online Atm..
      No Buddies Online Atm..
      No Buddies Online Atm..
      No Buddies Online Atm..
      No Buddies Online Atm..
      No Buddies Online Atm..
      No Buddies Online Atm..

      lol

      Comment


        #4
        <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>echo web_head($uid);
        addonline(getuid_ses($ses),"Viewing My Buddies List","");
        $uid=getuid_ses($ses);
        echo "
        <img src=\"../phpThumb/phpThumb.php?src=../images/chat.gif\" alt=\"buddylist\"/>
        ";
        $bmsg=getbbcode(getbudmsg($uid),$ses,0);
        if($bmsg!="")
        {
        echo "($bmsg)";
        }else{
        echo "No Mood";
        }
        echo popup($ses);

        if($page==""||$page<=0)$page=1;
        $num_items=getonbuds(getuid_ses($ses));
        $items_per_page=10;
        $num_pages=ceil($num_items/$items_per_page);
        if(($page>$num_pages)&&$page!=1)$page=$num_pages;
        $limit_start=($page-1)*$items_per_page;

        $sql="SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM members a INNER JOIN buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid=&#39;".getuid_ses($ses)."&#39; OR b.tid=&#39;".getuid_ses($ses)."&#39;) AND b.agreed=&#39;1&#39; AND a.id!=&#39;".getuid_ses($ses)."&#39; GROUP BY 1,2 ORDER BY a.lastact DESC LIMIT $limit_start, $items_per_page";

        echo "<p align=\"center\">";
        $items=mysql_query($sql);
        echo mysql_error();
        if(mysql_num_rows($items)>0)
        {
        while($item=mysql_fetch_array($items))
        {
        if(isonline($item[2]))
        {
        $style="style=\"font-size:10px;color:#009900\"";$status="online!";
        $bmsg=getbbcode(getbudmsg($item[2]),$ses,0);
        if($bmsg!="")
        {
        $budmood="($bmsg)";
        }else{
        $budmood="No Mood";
        }
        echo "<a href=\"profile.php?ses=$ses&amp;who=$item[2]\">$item[1]</a>";
        echo " - $status
        $budmood
        ";}
        }
        }else{
        echo "No Buddies Online Atm..
        "; /////it dont show up
        }
        echo "</p>";
        echo "<p align=\"center\">";
        if($page>1)
        {
        echo "<a href=\"buds.php?ses=$ses&amp;view=$view&amp;page=" .($page-1)."\">«PREV</a> ";
        }
        if($page<$num_pages)
        {
        echo "<a href=\"buds.php?ses=$ses&amp;view=$view&amp;page=" .($page+1)."\">Next»</a>";
        }
        echo "
        $page/$num_pages
        ";
        if($num_pages>2)
        {
        echo pagejump($ses,"buds");
        }
        echo "</p>";


        echo "<p align=\"center\">";
        echo "<a accesskey=\"2\" href=\"buds.php?ses=$ses\">Refresh</a>
        ";
        echo "<a accesskey=\"4\" href=\"inbox.php?where=popdialog&amp;sid=$sid\">Po pup Dialog</a>
        ";
        $popmsgs=mysql_fetch_array(mysql_query("SELECT popmsg FROM members WHERE id=&#39;".$uid."&#39;"));
        if($popmsgs[0]==0){
        echo "<a accesskey=\"5\" href=\"settings.php?where=popon&amp;sid=$sid\">Ena ble Popups</a>
        ";
        }else{
        echo "<a accesskey=\"5\" href=\"settings.php?where=popoff&amp;sid=$sid\">Di sable Popups</a>
        ";}
        echo "<a accesskey=\"6\" href=\"mood.php?ses=$ses\">Change Mood</a>
        ";
        echo "<a accesskey=\"5\" href=\"Offline.php?ses=$ses\">Offline Buds</a>
        ";

        $chat=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM chat_online"));
        echo "<a $key1 href=\"inbox.php?ses=$ses\">Inbox</a>
        ";
        echo "<a $key2 href=\"forums.php?where=forumindx&amp;ses=$ses\">F orums</a>
        ";
        echo "<a $key3 href=\"online.php?ses=$ses\">Online List(".getnumonline().")</a>
        ";
        echo "<a $key4 href=\"chat1.php?where=chat&amp;ses=$ses\">ChatRoo ms($chat[0])</a>
        ";
        echo "<a $key0 href=\"main.php?ses=$ses\">
        <img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Main Menu</a>
        ";
        echo webfoot();
        exit();</div>

        Try this if not i dont like sql of lavalair.
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          nop m8 lol its not comming up pmsl

          Comment


            #6
            <div class='quotetop'>QUOTE (jsyguy23 @ Mar 2 2009, 02:14 PM) <{POST_SNAPBACK}></div>
            nop m8 lol its not comming up pmsl[/b]
            gonna have a look later think i got ur error but not so sure

            PHP Code:
            foreach ($_SERVER as $server => $value)
            {
            echo 
            "$server is $value<br />";

            Comment


              #7
              why not

              Code:
              echo mysql_num_rows($items);
              and see if it results in 1 or more rows being sent back even when no buddies are online, may sound silly but you never know

              Comment


                #8
                arrr djlee is on the right track i remember this lol
                Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                Visit: WapMasterz Coming Back Soon!
                _______
                SCRIPTS FOR SALE BY SUBZERO
                Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                _______
                Info & Tips
                php.net
                w3schools.com

                Comment


                  #9
                  im just thinking of one of the JOINS is returning a false positive resultset. so when it tries to echo, nothing is really echo&#39;d as the data required doesnt exist, but a result comes back as one of the JOINS is working

                  Try using LEFT JOIN instead ;)

                  i am tired though so maybe im talking crap lol

                  Comment


                    #10
                    I dont get what youre saying. Do u mean online buds show on seperate page than offline buds ? Or the code that shows (2/ on top of buddy list?

                    click here to join blingywap.co.za
                    http://blingywap.co.za


                    IF YOU NEED HELP JUST ASK AND ALWAYS SAY THANK YOU!

                    Comment

                    Working...
                    X