As long as the week old leftover food has been kept refrigerated the entire time then yes you can eat week old leftovers.
I sometimes have leftovers for as long as 6 months but I keep them frozen if I don't eat the leftovers within a week.
So if you want to keep leftover food longer than a week then freeze it but if you plan to eat the leftovers within a weeks time then refrigerating them is good enough.
If you don't refrigerate the leftovers then they can go bad within a day or two.
But it's very safe to eat leftovers after a week or two as long as you refrigerate them and they smell good and have no mold growth on them.