$tb->execute(array(':login'=>$username));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}	
	function writeLoging($inneruserId,$rzlt){
		$sql = 'INSERT INTO loging (`tmlog`,`login_id`,`moving`,`rzlt`,`vargroup`,`ipuser`) VALUES (NOW(),:login_id,"мн. удаление",:rzlt,"1","'.$_SERVER["REMOTE_ADDR"].'")';
		$tb = $this->dbIt->connection->prepare($sql);
		$tb->execute(array(':login_id'=>$inneruserId,':rzlt'=>$rzlt));
	}
}

//print_r($_GET);

$count=0;

$dellData = new mainpage_query();
foreach($_GET as $DelUsers){
	$count++;
		$userGet = $dellData -> getDatafromtableUsers($DelUsers);
	if(count($_GET)==$count){
		$email .= $userGet['login'];
	}else{
		$email .= $userGet['login'] .', ';
	}
	$dellData ->Deletefromtable($DelUsers);	
}
$dellData ->writeLoging($_SESSION['user_id'],$email);
?>


		$tb = $this->db->connection->prepare($sql);
		$tb->execute(array(':alias_id'=>$param));
		

	}
	function getDatafromtableUsers($username){
		$sql = 'SELECT * FROM aliases WHERE alias_id = :login';
		$tb = $this->db->connection->prepare($sql);
		$tb->execute(array(':login'=>$username));
		$this->arrBest = $tb->fetch(PDO::FETCH_ASSOC);
		return $this->arrBest;
	}	
	function writeLoging($inneruserId,$rzlt){
		$sql = 'INSERT INTO loging (`tmlog`,`login_id`,`moving`,`rzlt`,`vargroup`,`ipuser`) VALUES (NOW(),:login_id,"удаление",:rzlt,"2","'.$_SERVER["REMOTE_ADDR"].'")';
		$tb = $this->dbIt->connection->prepare($sql);
		$tb->execute(array(':login_id'=>$inneruserId,':rzlt'=>$rzlt));
	}	
}

//print_r($_GET);
$dellData = new mainpage_query();

$userGet = $dellData -> getDatafromtableUsers($param);

$dellData -> writeLoging($_SESSION['user_id'],$userGet['username']);

$dellData ->Deletefromtable($param);
?>