View file super2/deluser.php

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

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

$us = $row['user'];

$nk = intval($_GET['nk']);

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

if(mysql_affected_rows() == 0)
{
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="5"/>';
}
else
{
print '<card id="error" title="Error" ontimer="mpanel.php?id='.$id.'&amp;ps='.$ps.'&amp;ref='.$ref.'">
<timer value="5"/>';
}
}
else
{
print '<card id="error" title="error" ontimer="chat.php?id='.$id.'&amp;ps='.$ps.'&amp;rm='.$_GET['rm'].'&amp;ref='.$ref.'">
<timer value="5"/>';
}

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

$inf = mysql_fetch_assoc($select);
$bid = $inf['id'];
$level = $inf['level'];
$bnik = $inf['user'];
$broom = $inf['room'];
$ip = $inf['user_ip'];
$soft = $inf['user_soft'];

print $top;

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="5"/>';
}
}
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 $bnik.' удалён!<br/>';
mysql_query('DELETE FROM `antihack_users` WHERE id = '.$bid);

$f = fopen('syst/log.dat', 'a');
fputs($f, "\n".gmdate('Y.m.d H:i', time() + $correct_time).' '.$us.' удалил ник '.$bnik);
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();
?>