Upon notice from the building official, work on any building, structure or electrical, gas, mechanical or plumbing system that is being done contrary to the provisions of the technical codes or in a dangerous or unsafe manner, shall immediately cease. Such notice shall be in writing and shall be given to the owner of the property, or to his agent or to the person doing the work or posted in a conspicuous spot at the site of conflict and shall state the conditions under which work may be resumed. Where an emergency exists, the building official shall not be required to give a written notice prior to stopping the work.