To call into effect these enumerated powers and all others by this Act or by general law conferred, or which may hereafter be conferred upon the said City, or its Council, or any of its officers, the said Council shall have and possess full authority to make, pass and adopt all needful ordinances, bylaws, orders and resolutions, not repugnant to the Constitution of the United States, the Constitution of West Virginia and laws of this State; and to enforce any and all of such ordinances, bylaws, orders or resolutions, by prescribing for a violation thereof fines and penalties, and imprisonment in either the County jail of Barbour County, or the City prison, if there be one; but no fine shall exceed five hundred dollars ($500.00) and no person shall be imprisoned or compelled to labor on the streets of said City for a longer period than six months; provided, that any violation of the prohibition or liquor laws of this State shall be punished by the fines and penalties prescribed by general law, unless, different fines and penalties are prescribed by the ordinances of said City. Said fines and penalties shall be imposed and recovered, and such imprisonment inflicted and enforced by the judgment of the Mayor of said City, or in case of his absence or inability to act then by the Clerk of said City or in the case of the absence or inability to act of both of such officers then one of the councilmen appointed for that purpose shall act.