Файл: sys/delete_user_inc/files/default.php
Строк: 49
<?
$q1=query("SELECT * FROM `forum_t` WHERE `id_user` = '$ank[id]'");
while ($p1 = mysql_fetch_assoc($q1))
{
query("DELETE FROM `forum_p` WHERE `id_them` = '$p1[id]'");
}
$q2=query("SELECT * FROM `obmennik_files` WHERE `id_user` = '$ank[id]'");
while ($p2 = mysql_fetch_assoc($q2))
{
unlink(H.'sys/obmen/files/'.$p2['id'].'.dat');
}
@unlink(H."files/avatars/$ank[id].png");
query("DELETE FROM `forum_t` WHERE `id_user` = '$ank[id]'");
query("DELETE FROM `forum_p` WHERE `id_user` = '$ank[id]'");
query("DELETE FROM `forum_zakl` WHERE `id_user` = '$ank[id]'");
query("DELETE FROM `guest` WHERE `id_user` = '$ank[id]'");
query("DELETE FROM `obmennik_files` WHERE `id_user` = '$ank[id]'");
query("DELETE FROM `users_konts` WHERE `id_user` = '$ank[id]' OR `id_kont` = '$ank[id]'");
query("DELETE FROM `mail` WHERE `id_user` = '$ank[id]' OR `id_kont` = '$ank[id]'");
query("DELETE FROM `user_collision` WHERE `id_user` = '$ank[id]' OR `id_user2` = '$ank[id]'");
query("DELETE FROM `user` WHERE `id` = '$ank[id]' LIMIT 1");
query("DELETE FROM `ban` WHERE `id_user` = '$ank[id]' OR `id_ban` = '$ank[id]'");
query("DELETE FROM `gallery` WHERE `id_user` = '$ank[id]'");
query("DELETE FROM `gallery_komm` WHERE `id_user` = '$ank[id]'");
if (isset($_GET['all']) && count($collisions)>1)
{
for ($i=1;$i<count($collisions);$i++)
{
query("DELETE FROM `ban` WHERE `id_user` = '$collisions[$i]' OR `id_ban` = '$collisions[$i]'");
}
}
$gallery_q=query("SELECT * FROM `gallery` WHERE `id_user` = '$ank[id]'");
while ($gallery = mysql_fetch_assoc($gallery_q))
{
$q=query("SELECT * FROM `gallery_foto` WHERE `id_gallery` = '$gallery[id]'");
while ($post = mysql_fetch_assoc($q))
{
@unlink(H."files/foto/$post[id].png");
query("DELETE FROM `gallery_foto` WHERE `id` = '$post[id]' LIMIT 1");
query("DELETE FROM `gallery_komm` WHERE `id_foto` = '$post[id]'");
query("DELETE FROM `gallery_rating` WHERE `id_foto` = '$post[id]'");
}
}