Been neutered? That sometimes helps. If he's been neutered, you really have only one solution left that I can see and that is to take him out regularly and perhaps reward him with a bite of cheese when he goes outside. You'll have to keep him limited in the kitchen until he is housebroken.
The carpets will need to be cleaned thoroughly and professionally with pet stain cleaner to remove any odor and stains.