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

Размер файла: 1.05Kb
<?php
  include '../wap/config.php';
	include 'acl.php';
	list ($uid, $pl) = priv_level();
    if (!($conn=pg_connect("host=$dbhost port=$dbport dbname=$dbname user=$dbuser password=$dbpass"))) {
      echo ("пЫЙВЛБ РПДЛМАЮЕОЙС Л вд!\n");
    };
	pg_query($conn,"begin;");
	if ($kick>0) {
		$timex=time()+($kick*60);
    	pg_query($conn,"update users set temp_ban='$timex',kmoder='$uid' where id='$id';");
	} else {
    	pg_query($conn,"update users set moder='$uid' where id='$id';");
		pg_query($conn,"delete from users_ignore where uid='$id' or who='$id';");
		pg_query($conn,"delete from chat where fr_u='$id';");
		pg_query($conn,"delete from wapgbk where uid='$id';");
	}
	pg_query($conn,"delete from chat where fr_u='$id';");
	pg_query($conn,"delete from chat_tet where fr_u='$id';");
	pg_query($conn,"end;");
    pg_close($conn);
	switch ($l) {
		case 1:	
			$link=sprintf("Location: users.php?p=%d", $p);
			break;
		case 2:	
			$link=sprintf("Location: chat.php?r=%d", $r);
			break;
		default:
			$link=sprintf("Location: book.php?p=%d", $p);
	}
	header($link);	
?>