View file forum/ban.php

File size: 1.81Kb
<?
header("Content-Type: text/vnd.wap.wml");
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">';
require "consts.php";
$conn=mysql_connect(my_host, my_user, my_password);
mysql_select_db(my_db, $conn);



if(isset($HTTP_GET_VARS['UIN']))
{
$UIN=$HTTP_GET_VARS['UIN'];
}
else
{
$UIN="Guest";
}
$UINmd5=$UIN;




if(isset($HTTP_GET_VARS['pass']))

{

$pass=$HTTP_GET_VARS['pass'];

}

else

{

$pass="Guest";

}






$sql="select pass from users where id='$UIN'";
$res=mysql_query($sql);
$row=mysql_fetch_object($res);
if ($pass!=$row->pass)
{
$UIN="Guest";
}
$user=$HTTP_GET_VARS['user'];
echo '<wml>';
echo '<head>';
echo '<meta http-equiv="Cache-Control" content="no-store" forua="true"/>';
echo '</head>';
?>
<card ontimer="main.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;room=<?=$room?>" id="user" title="<?=$user?>">
<timer value="20"/>
<p>
<?



if ($user=="1")
  {
    echo 'Fuck you!';
  }
elseif ($user=="2")
  {
    echo 'Fuck you!';
  }
$sql="select * from users where id='$UIN'";
$result3=mysql_query($sql);
$row3=mysql_fetch_object($result3);


if ($row3->admin==1)
     {
      $stat="Banned";
      $sql="update users set banned='1' where id='$user'";
      mysql_query($sql);
       $sql="update users set status='$stat' where id='$user'";
        mysql_query($sql);


$sql="select * from topic where id='$user'";
$res=mysql_query($sql);
while($row=mysql_fetch_object($res))
{
 $sql="delete from topic where id='$row->id'";
      mysql_query($sql);
 $sql="delete from rating where ident='$row->id'";
      mysql_query($sql);
 $sql="delete from forum where topic='$row->id'";
      mysql_query($sql);
}


     ?>
        Looser <?=$row->name?> has been banned...<br/>
        <?
          mysql_close($conn);?><?

 }


?>
</p>
</card>
</wml>