View file chatservice/online.php

File size: 2.17Kb
<?php

header ("Content-type:text/vnd.wap.wml; charset=utf-8");

print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'.
' "http://www.wapforum.org/DTD/wml_1.1.xml">'.
'<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';

include "./ini.php";
mysql_query ("select * from bannedib WHERE ci='$ci' AND (ip = '".getenv(REMOTE_ADDR)."')and(browser = '".getenv(HTTP_USER_AGENT)."')");
                        if(mysql_affected_rows()!=0){include "b.php";}
$login = autorize();

$q_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline )."'and ci='$ci'");

$count = @mysql_fetch_array($q_count);

print '<card title="'.$lang['who_online'].' ('.$count['count(*)'].')">'.
'<p>';

        if($login['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
        elseif($login['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
        elseif($login['fsize'] == "verysmall") { $fsize1 = "<small><small>"; $fsize2 = "</small></small>"; }
        else { $fsize1 = ""; $fsize2 = ""; }
        print $fsize1;

        $q = @mysql_query("select `var`,`val1` from `".$px.$stable."` where mod='room'  and ci='$ci' order by val3;");

        while($droom = @mysql_fetch_array($q)) {
                $q_online = @mysql_query("SELECT `login` FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='".$droom['var']."'  and ci='$ci' order by ltime desc;");
                print '<a href="./room.php?ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$droom['var'].'">'.$droom['val1'].'</a>:<br/>';
                while($donline = @mysql_fetch_array($q_online)) { print $donline['login'].", "; }
                print '<br/>';
        }

$pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room=''  and ci='$ci';");

$pdc = @mysql_fetch_array($pr_count);
print "<a href=\"enter.php?ci=$ci&amp;id=$id&amp;pass=$pass\">".$lang['holl']." (".$pdc['count(*)'].")</a><br/>";
print $fsize2;
print '</p>'.
'</card>'.
'</wml>';

@mysql_close();
ob_end_flush();
?>