<% @ LANGUAGE="VBSCRIPT" %> <% OPTION EXPLICIT DIM cm, iLength,Email, MessageEmail, MessageBody, MessageDate, MessageFrom, MessagePrivate, MessageSubject, objConn, objParam, strProvider, strQuery, StrSort, URL, MessageURL, lead_cell, mid_cell, end_cell '********** Variable assignments lead_cell = "" mid_cell = "" end_cell = "" ' $Date: 10/20/97 4:17p $ ' $ModTime: $ ' $Revision: 14 $ ' $Workfile: signbook.asp $ If ((request("REQUEST_METHOD") = "POST") and ((request("CONTENT_LENGTH") > 0) and (request("CONTENT_LENGTH") < 1700))) then %> <% If request("MessageEmail") <> "" Then Email = request("MessageEmail") Else Email = "no email" End If If request("MessageBody") <> "" Then MessageBody = Request("MessageBody") Else MessageBody = "blank" End If If request("MessageDate") <> "" Then MessageDate = request("MessageDate") Else MessageDate = ( month( now ) & "/" & day( now ) & "/" & year( now ) & " " & time() ) End If If request("MessageFrom") <> "" Then MessageFrom = request("MessageFrom") Else MessageFrom = "anonymous visitor" End If If request("MessagePrivate") <> "" Then MessagePrivate = request("MessagePrivate") Else MessagePrivate = "True" End If If request("MessageSubject") <> "" Then MessageSubject = request("MessageSubject") Else MessageSubject = "blank" End If If request("MessageURL") <> "" Then If request("MessageURL") = "http://" THEN URL = "no homepage" Else URL = request("MessageURL") End If Else URL = "no homepage" End If If MessageBody = "" Then iLength=255 Else iLength = Len(MessageBody) End If strProvider="Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\iisadmin") & "\website\messages.mdb;" set cm = Server.CreateObject("ADODB.Command") set objConn = server.createobject("ADODB.Connection") objConn.Open strProvider cm.ActiveConnection = objConn cm.CommandText="INSERT INTO Messages(MessagePrivate,MessageDate,MessageFrom,Email,URL,MessageSubject,MessageBody) VALUES (?, ?, ?, ?, ?, ?, ?)" Set objParam=cm.CreateParameter(, 200, , 255, MessagePrivate) cm.Parameters.Append objParam Set objParam=cm.CreateParameter(, 200, , 255, MessageDate) cm.Parameters.Append objParam Set objParam=cm.CreateParameter(, 201, , 255, MessageFrom) cm.Parameters.Append objParam Set objParam=cm.CreateParameter(, 201, , 255, Email) cm.Parameters.Append objParam Set objParam=cm.CreateParameter(, 201, , 255, URL) cm.Parameters.Append objParam Set objParam=cm.CreateParameter(, 201, , 255, MessageSubject) cm.Parameters.Append objParam Set objParam=cm.CreateParameter(, 201, , iLength, MessageBody) cm.Parameters.Append objParam cm.Execute %> Thanks! <% call stylesheet %> <% response.write lead_cell & "Your name: " & mid_cell & MessageFrom & end_cell _ & lead_cell & "Your email address: " & mid_cell & Email & end_cell _ & lead_cell & "Home page URL: " & mid_cell & URL & end_cell _ & lead_cell & "Message subject: " & mid_cell & MessageSubject & end_cell _ & lead_cell & "Your message: " & mid_cell & MessageBody & end_cell %>
 

Thank you for entering your comments!


Sign the guest book
Return to the guest book
Return to the home page
<% Else %> <% If request("private") <> "" Then response.write "Leave a private message" Else response.write "Sign the guest book" End If %> <% call stylesheet %>
<% response.write lead_cell & "Your name: " & mid_cell & "" & end_cell _ & lead_cell & "Your email address: " & mid_cell & "" & end_cell _ & lead_cell & "Home page URL: " & mid_cell & ""& end_cell _ & lead_cell & "Message subject: " & mid_cell & "" & end_cell _ & lead_cell & "Your message: " & mid_cell & "" & end_cell %>
  <% If request("private") <> "" Then %>

Leave a private message

To leave a message, fill out the form below and click the "Send message" button.
If you want to start over, click the "Clear fields" button.
<% Else %>

Sign the guest book

To sign the guest book, fill out the form below and click the "Send message" button.
If you want to start over, click the "Clear fields" button.
<% End If %>
 

Return to the guest book
Return to the home page ">
<% End If %>