File size: 5.36Kb
<?
require "conf.php";
$agent=$HTTP_USER_AGENT;
$conn=mysql_connect(my_host, my_user, my_password);
mysql_select_db(my_db, $conn);
header("Cache-Control: no-cache");
header("Content-Type: text/vnd.wap.wml; charset=utf-8");
echo '<?xml version="1.0" encoding="utf-8"?>';
echo '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">';
if(isset($HTTP_GET_VARS['UIN']))
{
$UIN=$HTTP_GET_VARS['UIN'];
}
else
{
$UIN="Guest";
}
if(isset($HTTP_GET_VARS['pass']))
{
$pass=$HTTP_GET_VARS['pass'];
}
else
{
$pass="Guest";
}
$UINmd5=$UIN;
$sql=("select `pass` from `index` where id='$UIN'");
$res=mysql_query($sql);
$row=mysql_fetch_object($res);
if ($pass!=$row->pass)
{
$UIN="Guest";
}
$sql1=("select `id` from `forum` where room='1'");
$result1=mysql_query($sql1);
$n11=0;
$n22=0;
$n333=0;
$n44=0;
$n55=0;
$n66=0;
$n77=0;
$n88=0;
$n99=0;
$n100=0;
$n110=0;
$n222=0;
$n120=0;
$n130=0;
$n140=0;
while ($row1=mysql_fetch_object($result1))
{
$n11=$n11+1;
}
$sql2=("select `id` from `forum` where room='2'");
$result2=mysql_query($sql2);
while ($row2=mysql_fetch_object($result2))
{
$n222=$n222+1;
}
$sql3=("select `id` from `forum` where room='3'");
$result3=mysql_query($sql3);
while ($row3=mysql_fetch_object($result3))
{
$n333=$n333+1;
}
$sql4=("select `id` from `forum` where room='4'");
$result4=mysql_query($sql4);
while ($row4=mysql_fetch_object($result4))
{
$n44=$n44+1;
}
$sql5=("select `id` from `forum` where room='5'");
$result5=mysql_query($sql5);
while ($row5=mysql_fetch_object($result5))
{
$n55=$n55+1;
}
$sql7=("select `id` from `forum` where room='7'");
$result7=mysql_query($sql7);
while ($row7=mysql_fetch_object($result7))
{
$n77=$n77+1;
}
$sql22=("select * from `rating`");
$res22=mysql_query($sql22);
$n22=0;
while ($row22=mysql_fetch_object($res22))
{
$n22=$n22+1;
}
echo '<wml>';
echo '<head>';
echo '<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>';
echo '</head>';
?>
<card id="who" title="Форум">
<?
echo '<p>';
echo '<small><a href="rules.php?UIN='.$UINmd5.'&pass='.$pass.'">Правила</a><br/></small>';
echo '<small>Разделы:<br/></small>';
$n1=0;
$sql1=("select `id` from `rating` where room='1'");
$result1=mysql_query($sql1);
while ($row1=mysql_fetch_object($result1))
{
$n1=$n1+1;
}
?><small><a href="forum.php?UIN=<?=$UINmd5?>&pass=<?=$pass?>&room=1">O Ceти [<?
?><?=$n1?>/<?=$n11?>]<? echo '</a></small>';
echo '<small></small><br/>';
$n2=0;
$sql2=("select `id` from `rating` where room='2'");
$result2=mysql_query($sql2);
while ($row2=mysql_fetch_object($result2))
{
$n2=$n2+1;
}
?><small><a href="forum.php?UIN=<?=$UINmd5?>&pass=<?=$pass?>&room=2">Texничecкий Paздeл [<?
?><?=$n2?>/<?=$n222?>]<? echo '</a></small>';
echo '<small></small><br/>';
$n3=0;
$sql11=("select `id` from `rating` where room='3'");
$result11=mysql_query($sql11);
while ($row11=mysql_fetch_object($result11))
{
$n3=$n3+1;
}
?><small><a href="forum.php?UIN=<?=$UINmd5?>&pass=<?=$pass?>&room=3">Kyплю/Пpoдaм [<?
?><?=$n3?>/<?=$n333?>]<? echo '</a></small>';
echo '<small></small><br/>';
$n4=0;
$sql14=("select `id` from `rating` where room='4'");
$result14=mysql_query($sql14);
while ($row14=mysql_fetch_object($result14))
{
$n4=$n4+1;
}
?><small><a href="forum.php?UIN=<?=$UINmd5?>&pass=<?=$pass?>&room=4">Peклaмa [<?
?><?=$n4?>/<?=$n44?>]<? echo '</a></small>';
echo '<small></small><br/>';
$n5=0;
$sql5=("select `id` from `rating` where room='5'");
$result5=mysql_query($sql5);
while ($row5=mysql_fetch_object($result5))
{
$n5=$n5+1;
}
?><small><a href="forum.php?UIN=<?=$UINmd5?>&pass=<?=$pass?>&room=5">Boпpocы и Пpeдлoжeния [<?=$n5?>/<?=$n55?>]<? echo '</a><br/></small>';
$n7=0;
$sql7=("select `id` from `rating` where room='7'");
$result7=mysql_query($sql7);
while ($row7=mysql_fetch_object($result7))
{
$n7=$n7+1;
}
?><small><a href="forum.php?UIN=<?=$UINmd5?>&pass=<?=$pass?>&room=7">Oбщeниe [<?=$n7?>/<?=$n77?>]<? echo '</a><br/></small>';
$n6=0;
$sql6=("select `id` from `rating` where room='6'");
$result6=mysql_query($sql6);
/*$sqlr="select * from `forum` where `room`='6'";
$resultr=mysql_num_rows($sqlr); */
echo '<small>-----------<br/>Всего тем: '.$n22;
echo '</small><br/>';
?><small><a href="../apanel.php?id=<?=$UINmd5?>&pass=<?=$pass?>">B Пaнeль</a></small><br/><?
$dpoint=".";
$dpoint2=":";
$time2 =date(d);
$time2 .=$dpoint;
$time2 .=date(m);
$time2 .=$dpoint;
$time2 .=date(y);
$time2.= " - ";
$time2 .=date(H);
$time2.=$dpoint2;
$time2.=date(i);
$time2.=$dpoint2;
$time2 .=date(s);
echo '</p>';
echo '</card>';
?></wml>