Density-functional theory of freezing and properties of the ordered phase