For any and every violation of the provisions of this article, the owner, general agent or contractor of a building or premises where such violation has been committed or shall exist, and the lessee or tenant of an entire building or entire premises where such violation has been committed or shall exist, and the general agent, architect, builder, contractor or any other person who knowingly commits, takes part or assists in any such violation or who maintains any building or premises in which such violation shall exist, shall be liable for a fine not exceeding $1,000 or imprisonment for a period not to exceed six months, or both, for conviction of a first offense; for conviction of a second offense both of which were committed within a period of five years, punishable by a fine of not less than $350 nor more than $700 or imprisonment for a period not to exceed six months, or both; and upon conviction for a third or subsequent offense, all of which were committed within a period of five years, punishable by a fine of not less than $700 nor more than $1,000 or imprisonment for a period not to exceed six months, or both. Such penalties shall be collected as provided by law. Each week's continued violation shall constitute a separate, additional violation.