<%@ Language=VBScript %> <%Option Explicit%> <%'******************************************************************************* ' File: feedback.asp ' ' Purpose: Generates the feedback form for research ' ' J. Vu 01/27/2004 - Initial version. '********************************************************************************* Dim strErrMsg,objEmailList,strFrom, strTo, strCc, strBcc, strSubject, strBody,lngImportance,lngMsgFormat,lngMsgEncode,lngAttEncode Dim strFileName,strProject,strValid,strPName, intCount, strAddr Dim objCommand,objParameter,rstProjects,strProjectList,rstList,strValues,arrProjects Call OpenDBConnection() Set rstProjects = Server.CreateObject("ADODB.Recordset") Set objCommand = Server.CreateObject("ADODB.Command") objCommand.ActiveConnection = cnnSQL objCommand.CommandType = adCmdStoredProc objCommand.CommandTimeout = 120 objCommand.CommandText = "wwwGetResearchProjects" rstProjects.Open objCommand, , adOpenStatic, adLockReadOnly If (Not rstProjects.EOF) Then While Not rstProjects.EOF If (rstProjects.Fields("strProject").Value <> "") Then strProjectList = strProjectList & "" & vbCrLf strValues = strValues & rstProjects.Fields("strProject").Value & "," End If rstProjects.MoveNext Wend End If Set rstProjects = Nothing Set objCommand = Nothing Set objParameter = Nothing Call CloseDBConnection() strPName = Request("project") strPName = Replace(strPName,"""",""") strPName = Replace(strPName,"%20"," ") If (Not Request.ServerVariables("QUERY_STRING") = "") Then strValid = False strValues = Left(strValues,Len(strValues) - 1) arrProjects = Split(strValues,",") For intCount = 0 To UBound(arrProjects) If (strPName = arrProjects(intCount)) Then strValid = True End If Next If (strValid = False) Then Session("strErrMsg") = "Error! Project code does not exist." Response.Redirect("feedback.asp") End If End If If (Not(IsEmpty(Request("Submit"))) AND Request("view") = "true") Then If (Request("email") = "") Then strErrMsg = "Please fill in your e-mail address." ElseIf (Request("project") = "") Then strErrMsg = "Please select a project." ElseIf (Request("comments") = "") Then strErrMsg = "Please fill in your comments." Else Call OpenDBConnection() Set rstList = Server.CreateObject("ADODB.Recordset") Set objCommand = Server.CreateObject("ADODB.Command") objCommand.ActiveConnection = cnnSQL objCommand.CommandType = adCmdStoredProc objCommand.CommandTimeout = 120 objCommand.CommandText = "wwwGetResearchEmail" Set objParameter = objCommand.CreateParameter("@strProject", adVarChar, adParamInput, 50) objCommand.Parameters.Append objParameter objCommand.Parameters("@strProject") = Request("project") rstList.Open objCommand, , adOpenStatic, adLockReadOnly If (Not rstList.EOF) Then strTo = rstList.Fields("strEmail").Value End If rstList.Close Set rstList = Nothing Call CloseDBConnection() strCc = "" strBcc = "" strSubject = Request("project") strBody = " Name: " & Request("name") & "
" & _ " Email: " & Request("email") & "
" & _ " Project: " & strPName & "
" & _ "Comments: " & "
  " & Request("comments") strFrom = Request("email") lngImportance = CdoNormal lngMsgFormat = CdoBodyFormatHTML ' These must be zero so the URL in email is not truncated. lngMsgEncode = CdoMailFormatMime ' These must be zero so the URL in email is not truncated. lngAttEncode = CdoEncodingBase64 strFileName = "" Call SendEmail(strFrom,_ strTo,_ strCc,_ strBcc,_ strSubject,_ strBody,_ lngImportance,_ lngMsgFormat,_ lngMsgEncode,_ lngAttEncode,_ strFileName) Response.Redirect("thanks.htm") End If End If %>

/programsandresearch/feedback/Copy Of form.asp

originally: http://www.oclc.org/programsandresearch/feedback/Copy Of form.asp

Send us your ideas

Use this web form to send an email directly to the OCLC Research team involved with this project.

We look forward to receiving your feedback and comments.

<% If (Not strErrMsg = "" Or Not IsEmpty(Session("strErrMsg"))) Then If Not IsEmpty(Session("strErrMsg")) Then strErrMsg = Session("strErrMsg") End If %> <% End If %>
<%=strErrMsg%>
 
Name:
" size="35" type="text" name="name">
 
*E-mail address: (required)
" size="35" type="text" name="email">
 
*Project: (required)
<% If (Not Request.ServerVariables("QUERY_STRING") = "" OR Not IsEmpty(Request("query"))) Then Response.Write(Request("project")) Else %> <% End If %>
 
*Comments: (required)
 
  
<% If (Not(IsEmpty(Request("project"))) And (Request("project") <> "" )) Then%> <% End If %> <% If (Not Request.ServerVariables("QUERY_STRING") = "") Or (Not IsEmpty(Request("query"))) Then %> <% End If %> <% Session.Abandon %>