%Option Explicit%>
<%
Function createGuid()
Dim TypeLib, tg
Set TypeLib = Server.CreateObject("Scriptlet.TypeLib")
tg = TypeLib.Guid
createGuid = left(tg, len(tg)-2)
Set TypeLib = Nothing
End Function
Dim objHttp, sQuerystring, objXMLDOC, objNode, intdecision, intdescription, nodes, strPhone, strPhone1, strPhone2
If Request.Form() = "" Then
Dim strGUID, strWAPID
strGUID = createGuid
Set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "POST", "http://www.livelinks.com/ctc/wapid?&keyword=c2c&Campaign=emailaquisition&source=pmllk&code=" & strGUID, false
'response.write ""
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send
sQuerystring = objHttp.responseText
Set objXMLDOC = server.CreateObject("MSXML2.DOMDocument")
objXMLDOC.async = False
objXMLDOC.resolveExternals = False
objXMLDOC.LoadXml(sQuerystring)
strWAPID = sQuerystring
If Request.QueryString("phone") <> "" Then
strPhone = Request.QueryString("phone")
If Len(strPhone) <> 10 Or Not IsNumeric(strPhone) Then
Response.End
End If
strPhone1 = Mid(strPhone,1,3)
strPhone2 = Mid(strPhone,4,7)
End If
'Set objNode = objXMLDOC.documentElement
'Set intdecision= objNode.selectSingleNode("//ccTxnResponseV1//decision")
'Set intdescription= objNode.selectSingleNode("//ccTxnResponseV1//description")
ElseIf Request.Form() <> "" Then
'response.write request.form
Dim formFields
formFields = "area_code=" & Request.Form("area_code") & "&" & _
"phone_number=" & Request.Form("phone_number") & "&" & _
"lookup_call_me_now=" & Request.Form("lookup_call_me_now") & "&" & _
"partnerID=" & Request.Form("partnerID") & "&" & _
"Keyword=" & Request.Form("Keyword") & "&" & _
"Campaign=" & Request.Form("Campaign") & "&" & _
"Source=" & Request.Form("Source") & "&" & _
"LandingPage=" & Request.Form("LandingPage") & "&" & _
"atid=" & Request.Form("atid") & "&" & _
"wapid=" & Request.Form("wapid") & "&" & _
"CaptchaValue=" & Request.Form("CaptchaValue") & "&" & _
"CaptchaHash=" & Request.Form("CaptchaHash") & "&" & _
"CaptchaID=" & Request.Form("CaptchaID") & "&" & _
"language=" & Request.Form("language") & "&" & _
"brand=" & Request.Form("brand") & "&" & _
"form_build_id=" & Request.Form("form_build_id") & "&" & _
"form_id=" & Request.Form("form_id")
Set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "POST", "http://www.livelinks.com/ctc/call", False
'response.write ""
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send (formFields)
sQuerystring = objHttp.responseText
Set objXMLDOC = server.CreateObject("MSXML2.DOMDocument")
objXMLDOC.async = False
objXMLDOC.resolveExternals = False
objXMLDOC.LoadXml(sQuerystring)
If Trim(sQuerystring) = "200" And Request.Form("phone") <> Request.Form("area_code") & Request.Form("phone_number") Then
UpdateUserPhone Request.Form("guid"), Request.Form("email"), Request.Form("area_code") & Request.Form("phone_number")
End If
'response.write ""
End If
Function UpdateUserPhone( strGUID, strEmail, strNewPhone)
Dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open GetDBConnection()
oConn.BeginTrans
Dim cmd
Set cmd = Server.CreateObject("ADODB.Command")
cmd.CommandText = "dbo.LL_UpdateUser"
cmd.CommandType = adCmdStoredProc
cmd.ActiveConnection = oConn
' Append stored proc parameters
cmd.Parameters.Append cmd.CreateParameter("@Email", adVarchar, adParamInput, 5000, strEmail)
cmd.Parameters.Append cmd.CreateParameter("@GUID", adVarchar, adParamInput, 60, strGUID)
cmd.Parameters.Append cmd.CreateParameter("@Phone", adVarchar, adParamInput, 10, strNewPhone)
'On Error Resume Next
cmd.Execute ,,adExecuteNoRecords
Dim oErrors, oError, strErrors
Set oErrors = cmd.ActiveConnection.Errors
If (oErrors.Count > 0) Then
cmd.ActiveConnection.RollbackTrans
'There were errors, report them
For Each oError in oErrors
strErrors = strErrors & "Error: " & oError.Number & "
" & _
"Source: " & oError.Source & "
" & _
"Description: " & oError.Description & "
"
Next
Else
oConn.CommitTrans
End If
On Error GoTo 0
Set cmd = Nothing
Set oConn = Nothing
response.write strerrors
UpdateUserPhone = strErrors
End Function
%>
Thank you for confirming your email. Start your 30 minutes free trial with Livelinks now. Enter your phone number below to get started. |
CALL | Listen to greetings from real people in your area. |
FLIRT | Send & receive messages with anyone you want. |
CONNECT | Enjoy private 1-on-1 chat... or more! |
Sound like fun? It is! So what are you waiting for? Try Livelinks now for free!
Livelinks is for callers 18 years of age or older.