Erdogan ill, reappears in public as elections loom