View file chat_polifonia/index.php

File size: 2.8Kb
<?
header("Cache-Control: no-cache");
header("Content-type:text/vnd.wap.wml");
$ref=rand(10000,1000000);
require("inc.php");
$link = @mysql_pconnect ($MySQL_Hostname, $MySQL_Username, $MySQL_Password)
                or die ("<wml>
<card id=\"error\" title=\"error\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">Can not connect to MySQL<br/>".mysql_error()."</p>
</card>
</wml>");

     @mysql_select_db($MySQLDatabasename) or die ("<wml>
<card id=\"error\" title=\"error\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">error select the database...<br/>".mysql_error()."</p>
</card>
</wml>");

for ($n = 0; $n <= 10; $n++){
$room = "room".$n;
$tm = time()-300;
$r = @mysql_query ("Select id from $room WHERE id > '".$tm."' group by who order by id desc");
$asnum = mysql_affected_rows();
@$kol = $kol + $asnum-1;
}
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">\n";
echo "<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>\n";
echo "<card id=\"index\" title=\"&#x427;&#x430;&#x442;\">\n";
echo "<p align=\"center\" mode=\"wrap\">\n";
echo "<small>&#1044;&#1086;&#1073;&#1088;&#1086; &#1087;&#1086;&#1078;&#1072;&#1083;&#1086;&#1074;&#1072;&#1090;&#1100;!!!</small><br/>";
$chl = "&#x447;&#x435;&#x43B;&#x43E;&#x432;&#x435;&#x43A;";
if ((($kol%10==2)||($kol%10==3)||($kol%10==4))&&($kol/10)!=1)$chl = "&#x447;&#x435;&#x43B;&#x43E;&#x432;&#x435;&#x43A;&#x430;";
echo "<small>&#x412; &#x447;&#x430;&#x442;&#x435;: $kol $chl</small><br/>";
echo "<small>- - -</small><br/>\n";
echo "<small>&#x0412;&#x0430;&#x0448; &#x043D;&#x0438;&#x043A;:</small><br/>\n";
echo "<input name=\"us\" maxlength=\"20\"  title=\"nick\" emptyok=\"true\" size=\"12\"/><br/>\n";
echo "<small>&#x041F;&#x0430;&#x0440;&#x043E;&#x043B;&#x044C;:</small><br/>\n";
echo "<input name=\"ps\" maxlength=\"20\" title=\"password\" emptyok=\"true\" size=\"12\"/><br/>\n";
echo "<small><anchor title=\"go\">&#x412;&#x43E;&#x439;&#x442;&#x438;<go href=\"enter.php?ref=$ref\" method=\"post\">\n";
echo "<postfield name=\"us\" value=\"$(us)\"/>\n";
echo "<postfield name=\"ps\" value=\"$(ps)\"/>\n";
echo "</go></anchor></small><br/>\n";
echo "<small>- - -</small><br/>\n";
echo "<small><a href=\"ustav.php\">Правила чата!</a></small><br/>\n";

echo "<small><a href=\"reghelp.php\">Регистрация</a></small><br/>\n";
echo "<small>- - -</small><br/>\n";
$r = mysql_query("select count(id) as num from users");
$a = mysql_fetch_array($r);
$num = $a["num"];
mysql_close ($link);
echo "<small>Регистраций: $num</small><br/>\n";
echo "<small><a href=\"http://$siti\">$imya</a></small><br/>";
echo "</p></card></wml>";
?>