Thanks for your query.Based on the facts that you have posted it appears that you have acquired UTI with Balano Posthatitis.You have developed Phimosis due to Diabetes .
Please consult qualified general surgeon
for clinical examination. You may need to undergo Circumcision
once your Diabetes is well controlled.
In the mean while take some antibiotic like Ciprofloxacin
along with Urinary antiseptic like Nitrofuarantoin twice daily.
Get prescription of these drugs from your family Physician.