A city of the metropolitan class, in addition to other remedies, may institute any appropriate action or proceedings to prevent an unlawful erection, construction, reconstruction, alteration, conversion, maintenance, or use of any building or structure in violation of any ordinance or regulations enacted or issued pursuant to sections 14-401 to 14-418, to restrain, correct, or abate such violation, to prevent the occupancy of the building, structure, or land, or to prevent any illegal act, conduct, business, or use in or about such premises. Such ordinance or regulations shall be enforced by the city as the city council may provide. In addition to, and not in restriction of any other powers, the city may cause any building, structure, place, or premises to be inspected and examined and to order in writing the remedying of any condition found to exist in or at such building, structure, place, or premises in violation of any provision of the ordinance or regulations made under authority of such sections. The owner, general agent, lessee, or tenant of a building or premises or of any part of such building or premises where a violation of any provision of the ordinance or regulations has been committed or shall exist or the general agent, architect, builder, contractor, or any other person who commits, takes part, or assists in any such violation or who maintains any building or premises in which any such violation shall exist shall be guilty of a Class IV misdemeanor for a first or second violation and a Class II misdemeanor for a third or subsequent violation, if the third or subsequent violation is committed within two years after the commission of the prior violation.