page owner information in footer of website

W

Whitney

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...

Can i somehow get this (or similiar) functionality using javascript?
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
out how to get that info using javascript.

<%
Dim fso, fname, iname, imail, fpath
Dim tsin, ln, contactline, fp, pagefile, pagedate

' Format of _siteinfo.txt data file...
'CONTACT_NAME=Whitney Cali
'[email protected]


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)
End If
If Left(ln,13) = "CONTACT_EMAIL" Then
imail = Mid(ln,15)
End If
If Left(ln,13) = "CONTACT_PHONE" Then
iphone = Mid(ln,15)
End If
Loop
' Close filestream
tsin.Close
If imail <> "" And iname <> "" Then
contactline = "Site Owner: <a href='mailto:" & imail & "?subject=Web
Site Feedback'>" & _
iname & "</a> Phone: " & iphone
Else
contactline = ""
End If
Else
contactline = ""
End If
Set tsin = Nothing

Set pagefile = fso.GetFile(fp)
pagedate = pagefile.DateLastModified

Set pagefile = Nothing
Set fso = Nothing

pagename = Request.ServerVariables("PATH_INFO")
%>
 
T

Thomas 'PointedEars' Lahn

Whitney said:
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.
Can i somehow get this (or similiar) functionality using javascript?

Yes, but you will need a different server. ASP supports JScript, not
JavaScript.
[...]
[VBScript code snipped]

Wrong newsgroup.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top