<?php
include '../wap/config.php';
if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
};
pg_query($conn,"delete from wapgbk where uid='$id';");
pg_query($conn,"delete from chat where fr_u='$id' or to_u='$id';");
pg_query($conn,"delete from downloads where uid='$id';");
pg_query($conn,"delete from users_ignore where uid='$id' or who='$id';");
pg_query($conn,"delete from users where id='$id';");
pg_query($conn,"update site_var set v_num=(select v_num from site_var where id=2)-1 where id=2;");
pg_close($conn);
$link=sprintf("Location: users.php?p=%d", $p);
header($link);
?>