page owner information in footer of website
I would like all of our intranet pages to provide a link to the site
owner... and when clicked the visitor should be able to send the owner
I was using ASP to do this (see below) but I would like to not have
use the .asp extension on all 70,000 of our pages...
You will notice that a _siteinfo.txt file has to be dropped into each
directory for the code to work.
This code also generates a page last modified date... but I did figure
Dim fso, fname, iname, imail, fpath
Dim tsin, ln, contactline, fp, pagefile, pagedate
' Format of _siteinfo.txt data file...
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fp = Request.ServerVariables("PATH_TRANSLATED")
fpath = fso.GetParentFolderName(fp)
fname = fpath + "\_siteinfo.txt"
If fso.FileExists(fname) Then
Set f = fso.GetFile(fname)
Set tsin = f.OpenAsTextStream(1, -2)
Do While Not tsin.AtEndOfStream
ln = tsin.ReadLine()
If Left(ln,12) = "CONTACT_NAME" Then
iname = Mid(ln,14)
If Left(ln,13) = "CONTACT_EMAIL" Then
imail = Mid(ln,15)
If Left(ln,13) = "CONTACT_PHONE" Then
iphone = Mid(ln,15)
' Close filestream
If imail <> "" And iname <> "" Then
contactline = "Site Owner: <a href='mailto:" & imail & "?subject=Web
Site Feedback'>" & _
iname & "</a> Phone: " & iphone
contactline = ""
contactline = ""
Set tsin = Nothing
Set pagefile = fso.GetFile(fp)
pagedate = pagefile.DateLastModified
Set pagefile = Nothing
Set fso = Nothing
pagename = Request.ServerVariables("PATH_INFO")
Re: page owner information in footer of website
> I would like all of our intranet pages to provide a link to the site
> owner... and when clicked the visitor should be able to send the owner
> an email.
> I was using ASP to do this (see below) but I would like to not have
> use the .asp extension on all 70,000 of our pages...
Don't do it then but let ASP parse *.html files, too.
Yes, but you will need a different server. ASP supports JScript, not
> [VBScript code snipped]
|All times are GMT. The time now is 02:07 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.