Preparation and characterization of ordered nanoporous carbon materials by templating method