It looks like the delete is not working correctly because the file is not being referenced correctly. Currently you are deleting the file that is in this value:
$row_treatRS['TreatImage']
This value comes from your treatsRS recordset. The problem is that this recordset is filtered on the $_POST['treatid'] and you do not have a form element with this name and value in your form. You do have a form element that looks like it would be holding this value, it is called tid.
If the tid field in your form is being populated with the correct treatid value then you could probably just update the form elements name to match the one you are filtering on. So you would update the tid form filed and rename it to treatid.