Classifying spaces related to foliations