Просмотр файла chatservice/online.php

Размер файла: 2.17Kb
  1. <?php
  2.  
  3. header ("Content-type:text/vnd.wap.wml; charset=utf-8");
  4.  
  5. print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
  6. print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'.
  7. ' "http://www.wapforum.org/DTD/wml_1.1.xml">'.
  8. '<wml><head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';
  9.  
  10. include "./ini.php";
  11. mysql_query ("select * from bannedib WHERE ci='$ci' AND (ip = '".getenv(REMOTE_ADDR)."')and(browser = '".getenv(HTTP_USER_AGENT)."')");
  12. if(mysql_affected_rows()!=0){include "b.php";}
  13. $login = autorize();
  14.  
  15. $q_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline )."'and ci='$ci'");
  16.  
  17. $count = @mysql_fetch_array($q_count);
  18.  
  19. print '<card title="'.$lang['who_online'].' ('.$count['count(*)'].')">'.
  20. '<p>';
  21.  
  22. if($login['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
  23. elseif($login['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
  24. elseif($login['fsize'] == "verysmall") { $fsize1 = "<small><small>"; $fsize2 = "</small></small>"; }
  25. else { $fsize1 = ""; $fsize2 = ""; }
  26. print $fsize1;
  27.  
  28. $q = @mysql_query("select `var`,`val1` from `".$px.$stable."` where mod='room' and ci='$ci' order by val3;");
  29.  
  30. while($droom = @mysql_fetch_array($q)) {
  31. $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;");
  32. print '<a href="./room.php?ci='.$ci.'&amp;id='.$id.'&amp;pass='.$pass.'&amp;room='.$droom['var'].'">'.$droom['val1'].'</a>:<br/>';
  33. while($donline = @mysql_fetch_array($q_online)) { print $donline['login'].", "; }
  34. print '<br/>';
  35. }
  36.  
  37. $pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='' and ci='$ci';");
  38.  
  39. $pdc = @mysql_fetch_array($pr_count);
  40. print "<a href=\"enter.php?ci=$ci&amp;id=$id&amp;pass=$pass\">".$lang['holl']." (".$pdc['count(*)'].")</a><br/>";
  41. print $fsize2;
  42. print '</p>'.
  43. '</card>'.
  44. '</wml>';
  45.  
  46. @mysql_close();
  47. ob_end_flush();
  48. ?>