My dog ate some rotten food and the exact same thing happened to him. (nothing went wrong with his eyes though) The constant jerking in his legs and inibility to stand were him having seizures.

He's fine now but he almost died. I took him to the vet a few hours after he ate the food and he just BARELY made it.

If you give a shit about that dog you should take him to a local animal hospital now. (but call first. I don't know if you described the dogs problems accuratley enough. He may not be in as a dire situation)

I just took my dog to the vet and they gave him every kind of (whatever they were using to knock him out) Drug they had in the place and it didn't make him sleep or stop having siezures.

We had to drive him to an animal hospital.