How to make UP online list

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

    How to make UP online list

    anybody help me watz coding missed

    PHP Code:
    ////this is my online card
    else if($show=="online")

    {


    $who $_GET["who"];
    addonline(getuid_hits($hits),"All Online List","");

    echo 
    getheader($hits);
    echo 
    "<body>";
    echo 
    "<div class=\"box_cen\" align=\"center\">";
    echo 
    "<b>All Online</b>";
    echo 
    "</div>";
    echo 
    "<div class=\"box_sub\" align=\"left\">";
    echo 
    "<a href=\"index.php?show=online&amp;hits=$hits\">".ge tnumonline()." All Online</a><br/>";

    $timeout time();
    $timeon $timeout-18*60;

    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_users WHERE sex='M' AND lastact>'".$timeon."'"));
    if(
    $noi[0]>0)
    {
    echo 
    "<a href=\"index.php?show=monline&amp;hits=$hits\">".$ noi[0]." Male</a><br/>";
    }else{
    echo 
    "".$noi[0]." Male<br/>";
    }
    $timeout time();

    $timeon $timeout-18*60;

    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_users WHERE sex='F' AND lastact>'".$timeon."'"));
    if(
    $noi[0]>0)
    {
    echo 
    "<a href=\"index.php?show=fonline&amp;hits=$hits\">".$ noi[0]." Female</a><br/>";
    }else{
    echo 
    "".$noi[0]." Female<br/>";
    }
    $vfc mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_online WHERE placedet LIKE 'index.php?show=forum%'"));
    $vft mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_online WHERE placedet LIKE 'index.php?show=viewcat%'"));
    $vfo mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_online WHERE placedet LIKE 'index.php?show=viewfrm%'"));
    $cnt mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_online WHERE placedet LIKE 'index.php?show=newtopic%'"));
    $pry mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_online WHERE placedet LIKE 'index.php?show=viewtpc%'"));
    $prya mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_online WHERE placedet LIKE 'index.php?show=forumon%'"));

    $nif $vfc[0] + $vft[0] + $vfo[0] + $cnt[0] + $pry[0] + $prya[0];
    if(
    $nif>0)
    {
    echo 
    "<a href=\"index.php?show=forumon&amp;hits=$hits\">$ni f Forumer Online</a><br/>";
    }else{
    echo 
    "$nif Forumer Online<br/>";

    $timeout time();
    $timeon $timeout-18*60;
    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_users WHERE zerm>'0' AND lastact>'".$timeon."'"));
    if(
    $noi[0]>0)
    {
    echo 
    "<a href=\"index.php?show=speol&amp;hits=$hits\">".$no i[0]." V.I.P Online</a><br/>";
    }else{
    echo 
    "".$noi[0]." V.I.P Online<br/>";
    }

    $timeout time();
    $timeon $timeout-18*60;

    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM mx_users WHERE spermis>'0' AND spermis<'6' AND lastact>'".$timeon."'"));
    if(
    $noi[0]>0)
    {
    echo 
    "<a href=\"index.php?show=stfol&amp;hits=$hits\">".$no i[0]." Staff Online</a>";
    }else{
    echo 
    "".$noi[0]." Staff Online";
    }
    echo 
    "</div>";
    echo 
    "<div class=\"box_cen\" align=\"center\">";
    echo 
    "<div class=\"box_sub\" align=\"left\">";
    //////ALL LISTS SCRIPT <<

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

    $num_items getnumonline(); //changable

    $items_per_page6;

    $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 name, spermis,location, id FROM mx_users WHERE id AND lastact>'"
    .$timeon."'

    LIMIT 
    $limit_start$items_per_page

    "
    ;

    $items mysql_query($sql);
    echo 
    mysql_error();
    while (
    $item mysql_fetch_array($items))
    {

    $online mysql_fetch_array(mysql_query("SELECT sex, uicon FROM mx_users WHERE id='".$item[2]."'"));
    if(
    $online[1]=="")
    {
    $seximg "";
    }else{
    $seximg "<img src=\"$online[1]\" alt=\"*\"/>";
    }
    $sym mysql_fetch_array(mysql_query("SELECT state FROM mx_users WHERE id='".$item[2]."'"));

    if(
    $sym[0]=='1') {
    $open "India";

    }else if(
    $sym[0]=='2') {
    $open "Pakistan";

    }else if(
    $sym[0]=='3') {
    $open "South Africa";

    }else if(
    $sym[0]=='4') {
    $open "Sri Lanka";

    }else if(
    $sym[0]=='5') {
    $open "Bangla Desh";

    }else if(
    $sym[0]=='6') {
    $open "Pinoy";

    }else if(
    $sym[0]=='7') {
    $open "U.A.E";

    }else if(
    $sym[0]=='8') {
    $open "Q.S.A";

    }else if(
    $sym[0]=='9') {
    $open "ASIA";

    }else if(
    $sym[0]=='10') {
    $open "U.K";

    }else if(
    $sym[0]=='11') {
    $open "U.S.A";

    }else if(
    $sym[0]=='12') {
    $open "Australia";

    }else if(
    $sym[0]=='13') {
    $open "Urope";

    }else if(
    $sym[0]=='14') {
    $open "Malesia";

    }else if(
    $sym[0]=='15') {
    $open "Indonesia";

    }else if(
    $sym[0]=='16') {
    $open "Chaina";

    }else if(
    $sym[0]=='17') {
    $open "Other";

    }else{

    $open "India";
    }
    $foto idle($item[2], 2525);
    $pm "<a href=\"inbox.php?show=sendpms&amp;who=$item[2]&amp;hits=$hits\">Send PM</a>";

    if(
    isadmin(getuid_hits($hits)))
    {
    $edt "<a href=\"index.php?show=scmmsg&amp;who=$item[2]&amp;hits=$hits\">[e]</a>";
    }

    $cmmsg htmlspecialchars(getcmmsg($item[2]));

    $perm mysql_fetch_array(mysql_query("SELECT spermis FROM mx_users WHERE id='".$item[2]."'"));

    if((
    $perm[0]>0)&&($perm[0]<6))
    $cname cname($item[2]);
    if((
    $cname == "000000")||($cname == "")){ $fonto "";
    $fontc ""; }else{ $fonto "<font color=\"$cname\">";
    $fontc "</font>"; }
    $lnk "$seximg<a href=\"prov.php?show=viewuser&amp;who=$item[2]&amp;hits=$hits\">$fonto".htmlspecialchars($ite m[0])."$fontc</a> $open";

    }else{
    $cname cname($item[2]);
    if((
    $cname == "000000")||($cname == "")){ $fonto "";
    $fontc ""; }else{ $fonto "<font color=\"$cname\">";
    $fontc "</font>"; }
    $lnk "$seximg<a href=\"prov.php?show=viewuser&amp;who=$item[2]&amp;hits=$hits\">$fonto".htmlspecialchars($ite m[0])."$fontc</a> $open";

    }
    $ctext ctext($item[2]);
    if((
    $ctext == "000000")||($ctext == "")){ $texto "";
    $textc ""; }else{ $texto "<font color=\"$ctext\">";
    $textc "</font>"; }
    echo 
    "<table><tr><td>$foto<br/>$pm</td><td>$item[1] $lnk <br/>mood - $texto$cmmsg$textc</td></tr></table><hr>";

    }
    echo 
    "• <a href=\"index.php?show=cmmsg&amp;hits=$hits\">";

    echo 
    "Change Message</a></div></div>";
    echo 
    "<div class=\"box_sub\" align=\"center\">";
    if(
    $page>1)

    {

    $ppage $page-1;

    echo 
    "<a href=\"index.php?show=online&amp;page=$ppage&amp;h its=$hits\">«</a> ";

    }
    if(
    $page>1)
    {
    $nump $page-2;
    if((
    $page>$nump)&&($nump>0))
    {
    echo 
    "<a href=\"index.php?show=$show&amp;page=$nump&amp;hit s=$hits\">[$nump]</a> ";
    }
    $nump $page-1;
    if((
    $page>$nump)&&($nump>0))
    {
    echo 
    "<a href=\"index.php?show=$show&amp;page=$nump&amp;hit s=$hits\">[$nump]</a> ";
    }
    }
    $nump $page;
    if(
    $page==$nump)
    {
    echo 
    "[$nump] ";
    }
    $nump $page+1;
    if((
    $page<$nump)&&($nump<=$num_pages))
    {
    echo 
    "<a href=\"index.php?show=$show&amp;page=$nump&amp;hit s=$hits\">[$nump]</a> ";
    }
    $nump $page+2;
    if((
    $page<$nump)&&($nump<=$num_pages))
    {
    echo 
    "<a href=\"index.php?show=$show&amp;page=$nump&amp;hit s=$hits\">[$nump]</a> ";
    }
    if(
    $page<$num_pages)

    {

    $npage $page+1;
    echo 
    "<a href=\"index.php?show=online&amp;page=$npage&amp;h its=$hits\">»</a>";
    }
    echo 
    "<br/>Page $page of $num_pages<br/>";
    if(
    $num_pages>2)

    {

    echo 
    getjumper($show$hits,"index");

    }
    echo 
    "</div>";
    ////// UNTILL HERE >>
    include("lastpost.php");
    echo 
    footerweb($hits);
    echo 
    "</body>";

    }
    ///////////////////// 
    Last edited by subzero; 20.01.11, 12:38.

    #2
    what problem with it ?

    You trying to put
    12 ( india )
    5 ( aussies )

    like that?


    also note code your input next time !
    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
      how to say wht is missing without looking at the error??? getnumonline should be corrected..even u correct it wht happen if u call to an function which is not declared?????????............


      I'm Proud to be a Sri Lankan!

      Comment

      Working...
      X