Every public officer who, for any gratuity or reward, appoints another person to a public office, or permits another person to exercise or discharge any of the duties of his office, is punishable by a fine not exceeding ten thousand dollars ($10,000), and, in addition thereto, forfeits his office and is forever disqualified from holding any office in this state.