Flare model chromospheres and photospheres