<% Dim objXMLHTTP, objXML Dim strURL, strFileToGo, strURLToGo, strXML Dim intPos1, IntPos2 Set objXMLHTTP = Server.CreateObject("Msxml2.SERVERXMLHTTP.4.0") strURL = Request.QueryString If (CInt(InStr(strURL,"success_reg=1")) > CInt(0)) Then Dim strRegDate : strRegDate = Now() strRegDate = DatePart("m", strRegDate) & "/" & DatePart("d", strRegDate) & "/" & DatePart("yyyy", strRegDate) Response.Cookies("yachtcouncil_registration").Expires = DateAdd("d", 370, Date()) Response.Cookies("yachtcouncil_registration") = CStr(strRegDate) End If intPos1 = InStr(strURL, "-") intPos2 = InStr(intPos1 + 1, strURL, "-") If (intPos1 = 0 And intPos2 = 0) Then If ((CInt(InStr(strURL, "&Size=")) > CInt(0)) And (CInt(InStr(strURL, "&Price=")) > CInt(0))) Then strURL = "-vessel_new_list.asp-&" & strURL & "&my_search=1&HullConfig=3&HullConfig=4" Else strURL = "-vessel_list.asp-&" & strURL End If intPos1 = InStr(strURL, "-") intPos2 = InStr(intPos1 + 1, strURL, "-") End If strFileToGo = Mid(strURL, intPos1 + 1, intPos2 - 6) 'without - 2 symbols and .asp Total 6 strURL = Replace(strURL, "-" & strFiletoGO & ".asp-", "") strURL = Mid(strURL, 2, Len(strURL)) strURL = Replace(strURL, "&source_xml", "") strURLToGo = base & "/t_server/" & strFileToGo & ".asp?" & strURL strURLtoGo = Replace(strURLToGO,"&scid=761","") strURLtoGo = Replace(strURLToGO,"&slid=3896","") If (InStr(strURLToGo,"r_addr") = 0) Then strURLToGo = strURLToGo & "&r_addr=" & CStr(Request.SERVERVARIABLES("REMOTE_ADDR")) & "&server=" & CStr(Request.SERVERVARIABLES("SERVER_NAME")) & Replace(CStr(Request.SERVERVARIABLES("URL")), "main.asp", "") End If strURLToGo = Replace(strURLToGo,"&no_menu=1","") strURLToGo = Replace(strURLToGo,"&office_id=1","") Dim strReg : strReg = "" Set strReg = Request.Cookies("yachtcouncil_registration") If (strReg <> "") Then strURLToGo = strURLToGo & "&yc_reg=" & strReg End If strURLToGo = strURLToGo & "&unique=" & Server.URLEncode(CStr(Now)) & "&no_menu=1&office_id=1&scid=761&slid=3896&source_xml" strURLToGo = Replace(strURLToGo, "my_search=1", "&my_search=1") strURLToGo = Replace(strURLToGo, "&&", "&") strURLToGo = Replace(strURLToGo, "?&", "?") 'Response.Write("" & strURLToGo & "
") 'Response.Write("Debug :View XML
") ''Response.Write("Debug :View Server Version
") objXMLHTTP.Open "GET", strURLToGo, False Call objXMLHTTP.Send("") Set objXML = objXMLHTTP.ResponseXML Call XMLToHTMLOutput(objXML, "xsl/" & strFileToGO & ".xsl") Set objXML = Nothing Set objXMLHTTP = Nothing %>