To begin with, we need this...
function CreateFreshExpiryDataFile()
...in order to create a fresh file on first use of the Expiry Checker.
Next, we need this...
function AppendExpiryDataToFile( *parameters* )
...to be called whenever an expired page gets hit.
Finally, we need this...
function SendExpiryMessages()
...which will get executed once, first thing on Monday morning.
Main Program:
If the referring page has expired then
If ExpiryData.xml doesn't exist, CreateFreshExpiryDataFile
Append the expired page data (using AppendExpiryDataToFile)
If ((today is a Monday) but (ExpiryData file is pre-today)) then
Send out the expiry messages
Re-name ExpiryData.xml to ExpiryDataLastWeek.xml
Endif
Endif
|