RACP - Feedback
<%fold=""
top=6%>
<%
Function CheckString (Str)
If Str = "" Then
Str = Null
End If
CheckString = Trim(Str)
End Function
Sub FetchCountry()
Set oCom = Server.CreateObject("ADODB.Command")
oCom.activeconnection = ConnString
oCom.commandtype = adCmdtext
oCom.commandtext = "Select * from country order by countrycode"
Set oRS = oCom.execute
If Not (oRS.Eof And oRS.Bof) Then
Do While Not oRS.Eof
Response.Write("")
oRS.movenext
Loop
End If
set oRS = Nothing
set oCom = Nothing
End Sub
Function GetTextValue(Cat, Val)
Set oCom1 = Server.CreateObject("ADODB.Command")
oCom1.activeconnection = ConnString
oCom1.commandtype = adCmdtext
GetTextValue = Val
If Val = "5" Then
GetTextValue = "Australia"
ElseIf Val="39" Then
GetTextValue = "New Zealand"
End If
If Not IsNull(CheckString(Val)) Then
If Cat = "State" Then
oCom1.commandtext = "Select StateName from State where stateID=" & Val
Else
oCom1.commandtext = "Select CountryName from country where countrycode=" & Val
End If
Set oRS1 = oCom1.execute
If Not (oRS1.Eof And oRS1.Bof) Then
GetTextValue = oRS1(0)
End If
set oRS1 = Nothing
set oCom1 = Nothing
End If
End Function
Dim sDataAction
sDataAction = Request ("DataAction")
If sDataAction <> "" Then
Select Case sDataAction
Case "Save"
Dim sTitle, sFName, sLName, sEmail, sAddress1, sAddress2, sSuburb, sPostCode
Dim sState, sCountry, sComment, sOptin
sTitle = CheckString (Request ("Title")) : sFName = CheckString (Request ("FName")) : sLName = CheckString (Request ("LName"))
sEmail = CheckString (Request ("Email")) : sAddress1 = CheckString (Request ("Address1")) : sAddress2 = CheckString (Request ("Address2"))
sSuburb = CheckString (Request ("Suburb")) : sPostCode = CheckString (Request ("PostCode")) : sState = CheckString (Request ("State")) : sCountry = CheckString (Request ("Country"))
sComment = CheckString (Request ("Comments")) : nOptin = CheckString (Request ("Optin"))
sPhone = CheckString (Request ("Phone"))
'Response.Write sTitle & " " & sFName & " " & sLName & " "
'Response.Write sEmail & " "
'Response.Write sAddress1 & " " & sAddress2 & " " & sSuburb & " " & sPostCode & " " & sState & " " & sCountry & " "
'Response.Write sComment
Set Conn = Server.createObject("ADODB.Connection")
conn.open connstring
Set oCom = Server.CreateObject("Adodb.Command")
oCom.activeconnection = ConnString
oCom.commandtype = adCmdStoredProc
oCom.commandtext = "Add_Feedback_babu"
oCom.parameters(1) = sTitle
oCom.parameters(2) = sFName
oCom.parameters(3) = sLName
oCom.parameters(4) = sEmail
oCom.parameters(5) = sPhone
oCom.parameters(6) = sAddress1
oCom.parameters(7) = sAddress2
oCom.parameters(8) = sSuburb
oCom.parameters(9) = sState
oCom.parameters(10) = sPostCode
oCom.parameters(11) = sCountry
oCom.parameters(12) = sComment
oCom.parameters(13) = nOptin
oCom.parameters(14) = Session.SessionID
oCom.Execute
Set oCom = Nothing
body="Name - "&sFName & " " &sLName & vbnewline
body=body&"Email - "&sEmail&vbnewline
body=body&"Country - "&GetTextValue("Country", sCountry)&vbnewline
If Not IsNull(sPhone) Then body=body&"Phone - "&sPhone&vbnewline
If Not IsNull(sAddress1) Then body=body&"Address -"&vbnewline&sAddress1&vbnewline
If Not IsNull(sAddress2) Then body=body&sAddress2&vbnewline
If Not IsNull(sSuburb) Then body=body&"Suburb - "&sSuburb&vbnewline
If Not IsNull(sState) Then body=body&"State - "& sState&vbnewline
If Not IsNull(sPostCode) Then body=body&"Postcode - "&sPostCode&vbnewline
If Not IsNull(sCountry) Then body=body&"Country - "&GetTextValue("Country", sCountry)&vbnewline
If Not IsNull(sComment) Then body=body&"Comments - "&sComment&vbnewline
If nOptin = 1 Then
body=body&"I'd like to be kept up-to-date with information from the RACP."&vbnewline
End If
body=body&"Date - "&Date&" "&Time&vbnewline
'Please replace ****** with appropriate information.
call SendEmail("racp@liquidvision.com", "RACP Website", "betterpractice@racp.edu.au", "Feedback for RACP Website", body, "******", "text", "RACP", "")
End Select
End If
%>
<%'If sDataAction = "" Then%>
Your Opinions and Experiences Count
Contribute a case study or tell us about your experiences. We would like to hear about your projects.
We also welcome any comments about this site.
<%'End If%>
<%If sDataAction = "" Then%>
Please complete your details below and we will respond as soon as possible.
Please click the submit button to submit your feedback
RACP respects your privacy. To see our privacy policy click here