Просмотр файла txtban/forum/index.php

Размер файла: 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="&#x0424;&#x043E;&#x0440;&#x0443;&#x043C;">
<?
echo '<p>';



   

     echo '<small><a href="rules.php?UIN='.$UINmd5.'&amp;pass='.$pass.'">&#x041F;&#x0440;&#x0430;&#x0432;&#x0438;&#x043B;&#x0430;</a><br/></small>';
   echo '<small>&#x0420;&#x0430;&#x0437;&#x0434;&#x0435;&#x043B;&#x044B;:<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?>&amp;pass=<?=$pass?>&amp;room=1">O Ce&#x0442;&#x0438; [<?
?><?=$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?>&amp;pass=<?=$pass?>&amp;room=2">Tex&#x043D;&#x0438;&#x0447;ec&#x043A;&#x0438;&#x0439; Pa&#x0437;&#x0434;e&#x043B; [<?
?><?=$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?>&amp;pass=<?=$pass?>&amp;room=3">Ky&#x043F;&#x043B;&#x044E;/&#x041F;po&#x0434;a&#x043C; [<?
?><?=$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?>&amp;pass=<?=$pass?>&amp;room=4">Pe&#x043A;&#x043B;a&#x043C;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?>&amp;pass=<?=$pass?>&amp;room=5">Bo&#x043F;poc&#x044B; &#x0438; &#x041F;pe&#x0434;&#x043B;o&#x0436;e&#x043D;&#x0438;&#x044F;  [<?=$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?>&amp;pass=<?=$pass?>&amp;room=7">O&#x0431;&#x0449;e&#x043D;&#x0438;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/>&#x0412;&#x0441;&#x0435;&#x0433;&#x043E; &#x0442;&#x0435;&#x043C;: '.$n22;
echo '</small><br/>';
?><small><a href="../apanel.php?id=<?=$UINmd5?>&amp;pass=<?=$pass?>">B &#x041F;a&#x043D;e&#x043B;&#x044C;</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>