Every person convicted by the municipal court of a violation of the criminal provisions of an ordinance for which no punishment is specifically prescribed in the ordinance is guilty of a gross misdemeanor and shall be punished by a fine of not more than five thousand dollars or imprisonment in the city jail for up to three hundred sixty-four days, or both such fine and imprisonment.