Размер файла: 2.45Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
header("Cache-Control: no-cache");
header("Content-type:text/vnd.wap.wml; charset=utf-8");
$ref=rand(10000,1000000);
require("conf.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\">ERROR: SERVICE CAN NOT CONNECT TO MySQL<br/></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: SERVICE CAN NOT CONNECT TO DB!<br/></p>
</card>
</wml>");
$timestamp=time();
$timeoutnline = 60*5;
$timekik=$timestamp-$timeoutnline;
@mysql_query("DELETE FROM nline WHERE time<$timekik");
$query = mysql_query("SELECT count(*) FROM gbsusers");
$allgbs = mysql_result($query, 0);
$query = mysql_query("SELECT count(*) FROM recs");
$allmsgs = mysql_result($query, 0);
$query = mysql_query("SELECT count(*) FROM nline");
$online = mysql_result($query, 0);
$query = mysql_query("SELECT count(*) FROM ban");
$bans = mysql_result($query, 0);
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=\"Сервис гостевых\">\n";
echo "<p align=\"center\" mode=\"wrap\">\n";
$r = mysql_query("select count(id) as num from gbsusers");
$a = mysql_fetch_array($r);
$num = $a["num"];
$now = date("j-m-Y");
$query = mysql_query("SELECT count(*) FROM gbsusers WHERE date = '".$now."'");
$today = mysql_result($query, 0);
echo 'Добро пожаловать в лучший сервис гостевых без рекламы и спама!<br/>
<br/>
<a href="cpanel/auth.php">Администратирование</a><br/>
<a href="reg.wml">Регистрация</a><br/>
<a href="index.php?id=2">Поддержка</a><br/>
<br/>
* * *<br/>
Всего гостевых: '.$allgbs.'<br/>
Зарегано сегодня: '.$today.'<br/>
Всего сообщений: '.$allmsgs.'<br/>
В онлайне: '.$online.'<br/>
Забанено в гостевых: '.$bans.'<br/>
<br/>
<a href="http://piratoff.net">Главная</a>
</p></card></wml>';
mysql_close ($link);
?>