I've had sore glands, jaw pain, and ear pain for almost 2 weeks. Dr diagnosed as sinus/middle ear infection but z pack didn't help. What should I do?

Try again. A middle ear infection should include decreased hearing. Pus in the nose running over the opening to the eustachian tube could cause ear pain. If it's mainly jaw pain it may be TMJ and not infection at all. See an ENT and get a good nasal exam. You may want to call your doctor first and see if he wants to try a second antibiotic. A z pak could miss some important bacteria.
See another doctor. Jaw pain can be associated with dental problems, trauma, infection, or serious illness. It should be investigated more throughly than simply using medication. Sore glands may be associated with infection, but may not be glands. Lymph nodes that are swollen due to infection or systemic illness may be what you are feeling. This could be related to TMJ syndrome, too. Seeing a dentist should help.
Go back to doctor. The antibiotic might not have helped depending on type of bacteria and severity of infection. It will be advantageous for you to go back to your doctor to evaluate antibiotic.
Consider TMJ. Most common cause of ear pain not due to ear is jaw joint. TMJ often misdiagnosed by MDs as "ear infection". Ask your dentist to look at your TMj. Treatment depending on findings.