Просмотр файла katrinka.ru/admin/user_ban.php

Размер файла: 1.05Kb
  1. <?php
  2. include '../wap/config.php';
  3. include 'acl.php';
  4. list ($uid, $pl) = priv_level();
  5. if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
  6. echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
  7. };
  8. pg_query($conn,"begin;");
  9. if ($kick>0) {
  10. $timex=time()+($kick*60);
  11. pg_query($conn,"update users set temp_ban='$timex',kmoder='$uid' where id='$id';");
  12. } else {
  13. pg_query($conn,"update users set moder='$uid' where id='$id';");
  14. pg_query($conn,"delete from users_ignore where uid='$id' or who='$id';");
  15. pg_query($conn,"delete from chat where fr_u='$id';");
  16. pg_query($conn,"delete from wapgbk where uid='$id';");
  17. }
  18. pg_query($conn,"delete from chat where fr_u='$id';");
  19. pg_query($conn,"delete from chat_tet where fr_u='$id';");
  20. pg_query($conn,"end;");
  21. pg_close($conn);
  22. switch ($l) {
  23. case 1:
  24. $link=sprintf("Location: users.php?p=%d", $p);
  25. break;
  26. case 2:
  27. $link=sprintf("Location: chat.php?r=%d", $r);
  28. break;
  29. default:
  30. $link=sprintf("Location: book.php?p=%d", $p);
  31. }
  32. header($link);
  33. ?>