View file super2/kick.php

File size: 3.53Kb
<?php
require 'connect.php';
require 'header.php';
require 'result.php';


if($row['level'] < 4)
{
print $top.'
<card id="error" title="Error">
<p>
У вас нет прав доступа!
</p>
</card>
</wml>';
mysql_close();
exit;
}

$us = $row['user'];

if(isset($_GET['nk']))
{
$nk = intval($_GET['nk']);
$select = mysql_query('SELECT * FROM `antihack_users` WHERE id='.$nk);
}
else
{
$nick = check($_POST['nick']);
$select = mysql_query("SELECT * FROM `antihack_users` WHERE user = '".$nick."'");
}

if(!mysql_affected_rows())
{
print $top.'
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';

if(!isset($_GET['rm']))
{
if($row['level'] > 6)
{
print '<card id="error" title="Error" ontimer="apanel.php?id='.$id.'&amp;ps='.$ps.'&amp;ref='.$ref.'">
<timer value="15"/>';
}
else
{
print '<card id="error" title="Error" ontimer="mpanel.php?id='.$id.'&amp;ps='.$ps.'&amp;ref='.$ref.'">
<timer value="15"/>';
}
}
else
{
print '<card id="error" title="Error" ontimer="chat.php?id='.$id.'&amp;ps='.$ps.'&amp;rm='.$_GET['rm'].'&amp;ref='.$ref.'">
<timer value="15"/>';
}

print '<p>
Нет такого юзера!
</p>
</card>
</wml>';
mysql_close();
exit;
}

$inf = mysql_fetch_assoc($select);
$pid = $inf['id'];
$level = $inf['level'];
$pnik = $inf['user'];
$broom = $inf['room'];

if($_GET['go'] != 1)
{
print $top.'
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>
<card id="pin" title="Пнуть">
<p>
<small>
Кого<br/>
</small>
<input name="nick'.$ref.'" value="'.$pnik.'" type="text"/><br/>
<small>
На сколько (мин)<br/>
</small>
<input name="wtime'.$ref.'" format="*N" type="text"/><br/>
<small>
За что<br/>
</small>
<input name="whykik'.$ref.'" type="text"/><br/>
<small>
<anchor>Пнуть засранца
<go href="kick.php?go=1&amp;id='.$id.'&amp;ps='.$ps.'&amp;rm='.$_GET['rm'].'&amp;ref='.$ref.'" method="post">
<postfield name="nick" value="$(nick'.$ref.')"/>
<postfield name="wtime" value="$(wtime'.$ref.')"/>
<postfield name="whykik" value="$(whykik'.$ref.')"/>
</go></anchor><br/>
</small>
</p>
</card>
</wml>';
mysql_close();
exit;
}

print $top.'
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';

if(!isset($_GET['rm']))
{
if($row['level'] > 6)
{
print '<card id="ok" title="Ok" ontimer="apanel.php?id='.$id.'&amp;ps='.$ps.'&amp;ref='.$ref.'">
<timer value="5"/>';
}
else
{
print '<card id="ok" title="Ok" ontimer="mpanel.php?id='.$id.'&amp;ps='.$ps.'&amp;ref='.$ref.'">
<timer value="10"/>';
}
}
else
{
print '<card id="ok" title="Ok" ontimer="chat.php?id='.$id.'&amp;ps='.$ps.'&amp;rm='.$_GET['rm'].'&amp;ref='.$ref.'">
<timer value="5"/>';
}

print '<p>';
if($level < $row['level'])
{
print $pnik.' успешно выпнут!<br/>';
$wtime = intval($_POST['wtime']);
$totime = $wtime;
$wtime = $wtime * 60 + time();
$whykik = check($_POST['whykik']);

mysql_query("UPDATE `antihack_users` SET kik = '".$wtime."', whokik = '".$us."', whykik = '".$whykik."' WHERE id = ".$pid);

$f = fopen('syst/log.dat', 'a');
fputs($f, "\n".gmdate('Y.m.d H:i', time() + $correct_time).' '.$us.' пнул '.$pnik.' Причина: '.$whykik.' ('.$totime.' min)');
fclose($f);
}
else
{
$levels = mysql_fetch_assoc(mysql_query('SELECT `name` FROM `levels` WHERE level='.$level));
print 'С ума сошли '.$levels['name'].' банить!? '.$bnik.' вам это припомнит!';
}

print '</p>
</card>
</wml>';
mysql_close();
?>