Militants who have occupied much of a southern Philippines city over the past week were planning violent attacks during the holy month of Ramadan to earn recognition as a regional branch of the Islamic State group, the military said Tuesday.