<?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";
// Login
$login = autorize();
// Data
$q_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='".$room."'");
// Count
$count = @mysql_fetch_array($q_count);
// Main

//$rmnm = @mysql_query("SELECT val1 FROM chat_settings WHERE var=$ins;");
//$rmnm = @mysql_query("select `val1` from `".$px.$stable."` where `var`='".$room."';");
$query_settings = @mysql_query("select `val1` from `".$px.$stable."` where `var`='$room' and `mod`='room';"); $settings = @mysql_fetch_array($query_settings);

print '<card title="'.$settings['val1'].' ('.$count['count(*)'].')">'.
'<p>';
//     
if($login['fsize'] == "small") { $fsize1 = "<small>";
$fsize2 = "</small>"; }
elseif($login['fsize'] == "small") { $fsize1 = "<small>";
$fsize2 = "</big>"; }
elseif($login['fsize'] == "verysmall") { $fsize1 = "<small><small>"; $fsize2 = "</small></small>"; }
else { $fsize1 = ""; $fsize2 = ""; }
print $fsize1;

$logaz = @mysql_query("SELECT * FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='".$room."' order by posts desc;");
print "<b>Members inside :</b><br/>";

    while ($logazz=mysql_fetch_array($logaz)) { 
if($logazz['sex']=="m") { $sex = "<img src=\"./image/male.gif\" alt=\"\"/>$logazz[1]" ;} else { $sex = "<img src=\"./image/fee.gif\" alt=\"\"/>$logazz[1]"; }
print $data[]="<a href=\"./user.php?id=$id&amp;pass=$pass&amp;room=$room&amp;dbid=".$logazz[0]."&amp;r=$r\">$sex</a> ,"; };

print "<br/>---<br/><a href=\"./room.php?id=$id&amp;pass=$pass&amp;room=$room\">Back to Chat</a><br/>---";
print "<br/><a href=\"./enter.php?id=$id&amp;pass=$pass\">Hall</a><br/>";

print $fsize2;
print '</p>'.
'</card>'.
'</wml>';
// End
@mysql_close();
ob_end_flush();
?>