Molecular orientation in fluids near solid-liquid interface as studied by the density functional method