Unfortunately (that word gets used a lot with these phones) POE can be rather more complex than just plugging them into a POE router. Let's start with some history. Cisco started providing POE on their own routers for their own phones before the existing POE standards were decided. (Actually there are several current standards, but these relate mostly to power capabilty). Unfortunately Cisco guessed wrong. Unfortunately these 'early' phones are non-standard and usually don't work with modern (non-Cisco) POE routers. Unfortunately these 'early' phones include the desireable 7940 and 7960.
So you have a choice with these 'early' phones:
1. Use a power brick (a bit of an eyesore)
2. Use an old Cisco router. Not as daft as it sounds. They were horribly expensive new, but occaisionally appear quite cheaply after being ripped out of an upgraded server suite. They tend to be noisy, you would want to keep them in a cupboard, which would get hot, because they are old and not 'green'.
3. Some top of the range non-Cisco routers work using these phones. Check the specs, the standard you are looking for is CDP. (Cisco Discovery Protocol).
4. Use a modern POE server with some modified network wiring. I am afraid you will have to google and study this yourself. It is frightening - good luck.
5. Use a later variant of the 794x or 796x series or even a 797x. These are standard POE. But be careful, converting these later phones to SIP, (I have a brief guide on this) gets increasingly difficult the more recent the phone is.