Ex-president gets 30-year treason sentence