1. Administrative sanctions. Except as otherwise provided in this subdivision, any person who violates any provision of article 33 of this chapter or any rule, regulation or order issued thereunder or commits any offense described in section 33-1301 of this chapter shall be liable to the people of the state for a civil penalty not to exceed five thousand dollars for a first violation, and not to exceed ten thousand dollars for a subsequent offense, to be assessed by the commissioner after a hearing or opportunity to be heard. Notwithstanding any provision of law to the contrary, an owner or owner's agent of a multiple dwelling or owner, owner's agent or a person in a position of authority for all other types of premises, as such terms are defined in paragraph d of subdivision five of section 33-0905 of this chapter, who violates any provision of a local law adopted pursuant to subdivision one of section 33-1004 of this chapter relating to paragraph b of such subdivision, and a person, who violates any provision of a local law adopted pursuant to subdivision one of section 33-1004 of this chapter relating to paragraph c of such subdivision, and a person who violates the provisions of subdivision three of section three hundred ninety-c of the social services law shall, for a first such violation, in lieu of a penalty, be issued a written warning and shall also be issued educational materials pursuant to subdivision two of section 33-1005 of this chapter. Such person shall, however, for a second violation, be liable to the people of the state for a civil penalty not to exceed one hundred dollars, and not to exceed two hundred fifty dollars for any subsequent violation, such penalties to be assessed by the commissioner after a hearing or opportunity to be heard. Notwithstanding any provision of law to the contrary, any person who violates the provisions of a local law adopted pursuant to subdivision one of section 33-1004 of this chapter relating to paragraph a of such subdivision, shall be issued a warning for the first violation and shall be provided seven days to correct such violation; and shall be liable to the people of the state for a civil penalty not to exceed one hundred dollars for a second violation, and not to exceed two hundred fifty dollars for a subsequent violation, to be assessed by the commissioner after a hearing or opportunity to be heard. The commissioner, acting by the attorney general, may bring suit for collection of such assessed civil penalty in any court of competent jurisdiction. Such civil penalty may be released or compromised by the commissioner before the matter has been referred to the attorney general; and where such matter has been referred to the attorney general, any such penalty may be released or compromised and any action commenced to recover the same may be settled and discontinued by the attorney general with the consent of the commissioner. Any civil penalty assessed by the commissioner under this subdivision shall be reviewable in a proceeding under article 78 of the civil practice law and rules.