It's hard to say, but often when stool smells that bad it can be indicative of some kind of infection, or possibly food staying too long in the gut. And a yellowish colour can either be because of the colour of his food, or if it isn't that, it can mean a problem with the bilirubin levels in his liver. However these scenarios are manageable.
It may be none of these things. But take him to the vet. Like Margot said, stool sample and bloodwork.
With the stool being that color, I would definitely take a stool sample into the Vet and have it checked. A blood panel may not be a bad idea either.
Have you ever had his teeth checked by a vet? That is one reason why dogs stop eating, possibly its why yours won't eat. Also, the excessive peeing could be any number of things, I would definately have him checked by a vet.