<% Response.Expires =0 %> Feedback Form <% if Request.QueryString.Count = 0 then errStr = "Please enter a comment or feedback.
" else if Request.QueryString("ErrorType") = "1" then smallerrstr = "Error: Your message has been included." errStr = "" & smallerrstr & "
" else errStr = "Please enter a comment or feedback.
" end if end if if (lcase(Request.Form("submitted")) = "true" )Then if (IsNull(Session("feedbacked"))) then Session("feedbacked") = False end if if (Session("feedbacked")=True) then errStr = "You are allowed only one message per session.
" else Session("feedbacked")=True smessage = Request.Form("feedbody") smessage = Trim(smessage) smessage = Replace(smessage,"<","") smessage = Replace(smessage,">","") sname = Request.Form("feedname") sname = Trim(sname) sname = Replace(sname,"<","") sname = Replace(sname,">","") sdate = Now() smessage = smessage & "
- " & sname & " (" & sdate & ")" sfile = "_feedback.txt" whichFN=server.mappath(sfile) if (whichfN <> "") and (Not ISNull(whichFN)) then Set fstemp = server.CreateObject("Scripting.FileSystemObject") if (fstemp.FileExists(whichFN) = True) then Set filetemp = fstemp.OpenTextFile(whichfN, 8, false, 0) filetemp.writeLine("") filetemp.WriteLine(smessage) filetemp.writeLine("") filetemp.Close set filetemp=Nothing end if set fstemp=Nothing end if end if end if sfeedback = "" sfile = "_feedback.txt" whichFN=server.mappath(sfile) if (whichfN <> "") and (Not ISNull(whichFN)) then Set fstemp1 = server.CreateObject("Scripting.FileSystemObject") if (fstemp1.FileExists(whichFN) = True) then Set filetemp = fstemp1.OpenTextFile(whichfN, 1, false, 0) Do while (filetemp.AtEndofStream <> True) strLine = filetemp.ReadLine strLine = Replace(strLine,"","") strLine = Replace(strLine,"","
") sfeedback = sfeedback & strLine Loop filetemp.Close Set filetemp = Nothing else Set filetemp = fstemp1.CreateTextFile(whichfN, false) filetemp.close end if Set fstemp1 = Nothing end if sfeedback = sfeedback & "
" %>

Feedback And Comments

<% = errStr %>
" OnSubmit="return Validate()">
Enter your comments
Enter your Name
<%=sfeedback%>