<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print '<?xml version="1.0" encoding="UTF-8"?>'.
'<!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";
$sc=mysql_query("select * from cusers where ci='".$ci."';");
$ch = @mysql_fetch_array($sc);
$topic=$ch['FunChaT'];
$name=$ch['FunChaT'];
$link=$ch['2-wap.net'];

$r = @rand(0,100000);
$pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."';");
$pdc = @mysql_fetch_array($pr_count);
$count = $pdc['count(*)'];
$q_regs = @mysql_query("select count(*) from `".$px.$utable."`;");
$nregs = @mysql_fetch_array($q_regs);

print '<card title="Fun-ChaT">'.
'<p align="center">';
$r = @rand(0,100000);


print '<small><b>WelCome To Fun-ChaT</b></small><br/>';
$pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' and ci ='".$ci."';");
$pdc = @mysql_fetch_array($pr_count);
$count = $pdc['count(*)'];
print "<small><a href=\"./online1.php\">$count users online</a></small><br/>";
print '<small>Nick:</small><br/>'.
'<input type="text" name="login"/><br/>'.
'<small>'.$lang['pass'].':</small><br/>'.
'<input type="password" name="pass"/><br/>'.
'<small><anchor>Login<go href="in.php?ci=$ci&amp;id=$id&amp;pass=$pass" method="post">'.
'<postfield name="login" value="$(login)"/>'.
'<postfield name="pass" value="$(pass)"/>'.
'</go>'.
'</anchor>'.
'<br/><a href="./rega.php?ci='.$ci.'">Register</a>';
print '<br/>******<br/>Registers: '.$nregs['count(*)'].'</small><br/>';
print '</p></card></wml>';

@mysql_close();
ob_end_flush();
?>