%
' $Date: 10/20/97 6:35p $
' $ModTime: $
' $Revision: 26 $
' $Workfile: sub.inc $
' *** Style Sheet selection
Sub styleSheet
If myinfo.Theme <> "" Then
response.write""
End If
End Sub
' ********************* DATE/TIME/MESSAGING/LINKS
' ******* Date/Time
Sub page_datetime
response.write "
Welcome!
"_
& "
Today is " & Date & ". "_
& "The local time is " & Time & ".
"
End Sub
' ******* Guestbook and Messaging
Sub page_messaging
If myinfo.Guestbook <> "" or myinfo.Messages <> "" or myinfo.Email <> "" Then
If myinfo.Guestbook = "-1" or myinfo.Messages = "-1" or myinfo.checkEmail ="-1" Then
response.write "
While you are here...
"
End If
response.write ""
If myinfo.Guestbook = "-1" THEN
response.write "
Read my guest book "
End If
If myinfo.Messages = "-1" THEN
response.write "
"
End If
End Sub
Sub file_check
'***This routine checks for files in the webpub directory and creates a link to view the file list when files do exist.
DIM FileSystem, fl, g, f, sc, fc, isFiles
isfiles = 0
Set FileSystem=CreateObject("Scripting.FileSystemObject")
'Set File System Object.
g = Server.MapPath("\webpub")
g = g + "\"
Set f=FileSystem.GetFolder(g)
Set sc = f.SubFolders
'Check for files in folder.
Set fc = f.Files
For Each fl in fc
isfiles= isfiles + 1
Next
'If files exist, create link.
If isfiles > 0 Then
response.write ""_
& "View my published documents."_
& " "
End If
End Sub
' ***This subroutine creates an array of your weblinks.
Sub page_links
If myinfo.intUrl <> "" Then
response.write " "
call urlArray
response.write ""
End If
End Sub
'***Favorite links array
Sub urlArray
Dim urlList(), urlWordsList()
intID = 0
For i = 0 to myinfo.intUrl
If myinfo("urlWords" & i) = "null" or myinfo("urlWords" & i) = "endoffile" or myinfo("url" & i) = "http://" or myinfo("url" & i) = "" THEN
myinfo("url" & i) = "null"
myinfo("urlWords" & i) = "null"
Else
Redim Preserve urlList(intID), urlWordsList(intID)
urlList(intID) = Myinfo("url" & i)
urlWordsList(intID) = Myinfo("urlWords" & i)
response.write "" & urlWordsList(intID) & " "
intID = intID + 1
myinfo.favoriteLinks = -1
End If
Next
End Sub
'***Title
Sub Title
If myinfo.Title <> "" Then
response.write myinfo.Title
ElseIf myinfo.Name <> "" Then
response.write myinfo.Name & "'"
If right(myInfo.Name, 1) <> "s" then
response.write "s"
End If
response.write " Home Page"
Else
response.write "My Home Page"
End If
End sub
'*** main page contents
Sub layout_Email
If myinfo.Email <> "" Then
response.write ""_
& "
"
End If
End Sub
Sub Phone
If myinfo.Phone <> "" Then
response.write ""_
& "
Phone number: "_
& myinfo.Phone & "
"
End If
End Sub
Sub faxPhone
If myinfo.faxPhone <> ""Then
response.write ""_
& "
Fax number: "_
& myinfo.faxPhone &"
"
End If
End Sub
Sub Address
If myinfo.Name <> "" Then
response.write "
" & myinfo.Name & " "
End If
If myinfo.Department <> "" Then
response.write "
"_
& myinfo.Department & "
"
End If
DIM number
number = 1
For number = 1 to 4
If myinfo("Address" & number) <> "" Then
response.write "
"_
& myinfo("Address" & number) & "
"
End If
Next
End Sub
'*** Headings & paragraphs
Function Heading(num)
Dim strHeading
strHeading = "
"
If myinfo("Heading" & num) <> "" Then
strHeading = strHeading & myinfo("Heading" & num) & " "
End If
strHeading = strHeading & ""
If myinfo("Words" & num) <> "" Then
strHeading = strHeading & myinfo("Words" & num)
End If
strHeading = strHeading & ""
Heading = strHeading
End Function
'*** IE LOGO
Sub ie_logo
response.write "
"
End Sub
'*** Navigation buttons for Guestbook and Administration pages.
Sub navigationButtons
If intMessageID <> "" Then
response.write "
"
rst.MovePrevious
If not rst.BOF Then
response.write FormSubmit("SUBMIT", "prev", "<<")
End If
rst.MoveNext
If page_Admin = "True" Then ' Add delete button to admin page.
response.write FormSubmit("SUBMIT", "delete", "Delete message")
Else
response.write " "
End If
rst.MoveNext
If not rst.EOF Then
response.write FormSubmit("SUBMIT", "next", ">>")
End If
rst.MovePrevious
response.write FormSubmit("HIDDEN", "MessageID", rst("MessageID"))
response.write "
"
If MessagePrivate <> "True" Then
response.write "New Query "
End If
End If
response.write "Web Site
"
End Sub
'*** Guestbook and Administration pages: Table of messages.
Sub buildTable
Set rst = Session("rst")
If rst.EOF Then
If intMessageID <> "" Then
response.Write "
There are no more messages.
"
ElseIf request.QueryString("MessageDateLimit") <> "" Then
response.Write "
There are no messages that meet your criteria.
"
Else
response.Write "
There are no entries in your "
If MessagePrivate = "False" Then
response.write L_Guestbook
Else
response.write L_Dropbox
End If
response.write ".
"
End If
ElseIf intMessageID <> "" Then
Dim col1Cell
Dim col5Cell
Dim colFont
col5Cell = "
"
count = count + 1
Loop
End If
End Sub
' *** Creates input buttons.
Function FormSubmit( t, name, value )
Dim btnSubmit
btnSubmit = ""
FormSubmit = btnSubmit
End Function
%>