lastmod.asp: (include file)
Code:
<%
Dim fileList
Set fileList = CreateObject("Scripting.Dictionary")
'add all the filenames with their corresponding modified date
fileList.Add "home.htm", "01/10/2005"
fileList.Add "page1.htm", "12/01/2004"
fileList.Add "page2.asp", "01/01/2005"
...
Function GetIcon(ByVal filename)
dim mod, img
mod = fileList.Item(filename)
if IsDate(mod) then
if DateDiff("d", mod, Date()) < 90 then
img = "<img src=""new.gif""" border=""0"" />
end if
end if
GetIcon = img
End Function
%>
main.asp: (that contains the links)
Code:
<!--#include file="lastmod.asp"-->
<%
response.write "<a href=""home.asp"">Home" & GetIcon("home.htm") & "</a>"
response.write "<a href=""page1.asp"">Page 1" & GetIcon("page1.htm") & "</a>"
response.write "<a href=""page2.asp"">Page 2" & GetIcon("page2.asp") & "</a>"
...
%>