I'm not too sure on what you are having trouble with?
If you are just trying to work out a time difference then you can work out how many seconds are in a week and you know what the current time is using time() so just substract the timestamp of the record from the current time and see if its bigger or smaller than the number of seconds in a week.
If you are just trying to work out a time difference then you can work out how many seconds are in a week and you know what the current time is using time() so just substract the timestamp of the record from the current time and see if its bigger or smaller than the number of seconds in a week.