Offline Buds Online Buds For Lava

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

    Offline Buds Online Buds For Lava

    has any one got offline buds nd online budz for the lava script please

    #2
    i couldnt be arsed to code it properly or test it lol but these will kind of work lol
    (might have a few blank pages at start of offline 1 tho lol)
    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>//////////////////////////////////Online Buddies

    else if($action=="onlinebuds")
    {
    addonline(getuid_sid($sid),"Viewing My Buddies List","lists.php?action=buds");
    echo "<head>";
    echo "<title>Buddy List</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    $uid = getuid_sid($sid);
    echo "<p align=\"center\">";
    //echo "<img src=\"logos/buddylist.gif\" alt=\"buddylist\"/>
    ";
    $bmsg = parsemsg(getbudmsg($uid), $sid);
    if($bmsg!="")
    {echo "($bmsg)</p>";}else
    {echo "</p>";}
    echo popup($sid);
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $num_items = getnbuds($uid); //changable
    $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;

    //changable sql
    /*
    $sql = "SELECT
    a.name, 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
    ";
    */
    $sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid=&#39;".$uid."&#39; OR b.tid=&#39;".$uid."&#39;) AND b.agreed=&#39;1&#39; AND a.id!=&#39;".$uid."&#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]))
    {
    $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";

    $bmsg = parsemsg(getbudmsg($item[2]), $sid);
    if($bmsg!="")
    {
    $budmood="($bmsg)";
    }else{
    $budmood="";
    }
    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$iml$item[1]</a>$budmood";
    echo "$lnk
    ";
    }
    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"lists.php?action=buds&amp;page=$ppage&amp;s id=$sid&amp;view=$view\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"lists.php?action=buds&amp;page=$npage&amp;s id=$sid&amp;view=$view\">Next»</a>";
    }
    echo "
    $page/$num_pages
    ";
    if($num_pages>2)
    {
    $rets = "<form action=\"lists.php\" method=\"get\">";
    $rets .= "<input name=\"page\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"2\"/>";
    $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
    $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
    $rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
    $rets .= "</form>";

    echo $rets;
    }
    echo "</p>";
    ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    echo "2 <a accesskey=\"2\" href=\"lists.php?action=buds&amp;sid=$sid\">Refres h</a>
    ";
    echo "3 <a accesskey=\"3\" href=\"inbox.php?action=popupto&amp;sid=$sid\">Sen d Popup</a>
    ";
    echo "4 <a accesskey=\"4\" href=\"inbox.php?action=popdialog&amp;sid=$sid\">P opup Dialog</a>
    ";
    $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    if($popmsgs[0]==0){
    echo "5 <a accesskey=\"5\" href=\"index.php?action=popenable&amp;sid=$sid\">E nable Popups</a>
    ";
    }else{
    echo "5 <a accesskey=\"5\" href=\"index.php?action=popdisable&amp;sid=$sid\"> Disable Popups</a>
    ";
    }
    echo "6 <a accesskey=\"6\" href=\"index.php?action=chbmsg&amp;sid=$sid\">Chan ge Mood</a>
    ";
    echo "7 <a accesskey=\"7\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
    echo "8 <a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chatro oms</a>
    ";
    echo forumlink($sid,9);
    echo "0 <a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
    }
    //////////////////////////////////offline Buddies

    else if($action=="offlinebuds")
    {
    addonline(getuid_sid($sid),"Viewing My Buddies List","lists.php?action=buds");
    echo "<head>";
    echo "<title>Buddy List</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    $uid = getuid_sid($sid);
    echo "<p align=\"center\">";
    //echo "<img src=\"logos/buddylist.gif\" alt=\"buddylist\"/>
    ";
    $bmsg = parsemsg(getbudmsg($uid), $sid);
    if($bmsg!="")
    {echo "($bmsg)</p>";}else
    {echo "</p>";}
    echo popup($sid);
    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;
    $num_items = getnbuds($uid); //changable
    $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;

    //changable sql
    /*
    $sql = "SELECT
    a.name, 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
    ";
    */
    $sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid=&#39;".$uid."&#39; OR b.tid=&#39;".$uid."&#39;) AND b.agreed=&#39;1&#39; AND a.id!=&#39;".$uid."&#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]))
    {

    $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";

    $bmsg = parsemsg(getbudmsg($item[2]), $sid);
    if($bmsg!="")
    {
    $budmood="($bmsg)";
    }else{
    $budmood="";
    }
    $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$iml$item[1]</a>$budmood";
    echo "$lnk
    ";
    }
    }
    }
    echo "</p>";
    echo "<p align=\"center\">";
    if($page>1)
    {
    $ppage = $page-1;
    echo "<a href=\"lists.php?action=buds&amp;page=$ppage&amp;s id=$sid&amp;view=$view\">«PREV</a> ";
    }
    if($page<$num_pages)
    {
    $npage = $page+1;
    echo "<a href=\"lists.php?action=buds&amp;page=$npage&amp;s id=$sid&amp;view=$view\">Next»</a>";
    }
    echo "
    $page/$num_pages
    ";
    if($num_pages>2)
    {
    $rets = "<form action=\"lists.php\" method=\"get\">";
    $rets .= "<input name=\"page\" style=\"-wap-input-format: &#39;*N&#39;\" size=\"2\"/>";
    $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
    $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
    $rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
    $rets .= "</form>";

    echo $rets;
    }
    echo "</p>";
    ////// UNTILL HERE >>
    echo "<p align=\"center\">";
    echo "2 <a accesskey=\"2\" href=\"lists.php?action=buds&amp;sid=$sid\">Refres h</a>
    ";
    echo "3 <a accesskey=\"3\" href=\"inbox.php?action=popupto&amp;sid=$sid\">Sen d Popup</a>
    ";
    echo "4 <a accesskey=\"4\" href=\"inbox.php?action=popdialog&amp;sid=$sid\">P opup Dialog</a>
    ";
    $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id=&#39;".$uid."&#39;"));
    if($popmsgs[0]==0){
    echo "5 <a accesskey=\"5\" href=\"index.php?action=popenable&amp;sid=$sid\">E nable Popups</a>
    ";
    }else{
    echo "5 <a accesskey=\"5\" href=\"index.php?action=popdisable&amp;sid=$sid\"> Disable Popups</a>
    ";
    }
    echo "6 <a accesskey=\"6\" href=\"index.php?action=chbmsg&amp;sid=$sid\">Chan ge Mood</a>
    ";
    echo "7 <a accesskey=\"7\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a>
    ";
    echo "8 <a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chatro oms</a>
    ";
    echo forumlink($sid,9);
    echo "0 <a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
    }</div> lol
    the sql needs editing really but i couldnt be bothered to work out what the time out is on lastact in ibwf_users lol

    Comment


      #3
      thanks m8 im sure i can work the rest out lol

      Comment

      Working...
      X