%
v_InternalId = Request("txtinternalid")
Set DBConn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.Recordset")
DBConn.Open Session("DSN")
Sql = "Select * from products_colors pc ,brands b ,products p where b.brand_id = pc.brand_id and p.product_id = pc.product_id and product_color_id = " & v_InternalId
Rs.Open SQl,DBConn
v_Category = rs.Fields("categorie_id")
if v_Category<>7 then
v_FileName= Session("TemplateName")
else
v_FileName = Session("WatchTemplateName")
strDesc = rs.Fields("desc")
end if
response.Write v_FileName
'Change the InternalPointers to the Correct Parameters
StrBrandName = trim(rs.Fields("brand_n"))
StrColorName = rs.Fields("color_name")
if v_Category<>7 then
v_WhereisSlash = instr(1,StrColorName,"/")
StrLenseColor = left(StrColorName,v_WhereisSlash-1)
StrFrameColor = mid(StrColorName,v_WhereisSlash+1,len(rs.Fields("color_name")))
end if
if v_Category<>7 then
v_Url = "http://www.decormyeyes.com/Shades/ProductImages/" & rs.Fields("brand_id") & "/"
else
v_Url = "http://www.sunglassexpo.com/Watches/ProductImages/" & rs.Fields("brand_id") & "/"
end if
StrEye = rs.Fields("eye")
StrBridge = rs.Fields("bridge")
StrTemple = rs.Fields("temple")
StrModel = rs.Fields("product_n")
StrColorCode = rs.Fields("color_code_n")
StrPic1 = v_Url & rs.Fields("pic1") & ""
StrPic2 = v_Url & rs.Fields("pic2") & ""
StrPic3 = v_Url & rs.Fields("pic3") & ""
StrPic4 = v_Url & rs.Fields("pic4") & ""
StrPic5 = v_Url & rs.Fields("pic5") & ""
StrRetailPrice = round(rs.Fields("counter_offer_price") * 2)
StrCasePic = "http://www.decormyeyes.com/cases/" & rs.Fields("brand_id")
'If rs.Fields("polarized_i") = true then
' StrPolarized = " Polarized
"
'Else
' StrPolarized = ""
'End if
Rs.Close
'Sql = "Select property_n from properties where property_id = " & StrPropertyID
'Rs.Open SQl,DBConn
'StrPropertyName = ucase(rs.Fields("property_n") & " ")
'Rs.Close
'Server.CreateObject("WinHttp.WinHttpRequest.5")
'Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")
Dim objWinHttp
Dim strHTML
Set objWinHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
v_TemplateFile = "http://www.sunglassexpo.com/templates/" & v_FileName
'Response.Write v_TemplateFile
objWinHttp.Open "GET", v_TemplateFile
objWinHttp.Send
strHTML = objWinHttp.ResponseText
strHTML = replace(strHTML,"StrBrandName",StrBrandName)
if v_Category<>7 then
strHTML = replace(strHTML,"StrEye",StrEye)
strHTML = replace(strHTML,"StrBridge",StrBridge)
strHTML = replace(strHTML,"StrTemple",StrTemple)
strHTML = replace(strHTML,"StrLenseColor",StrLenseColor)
strHTML = replace(strHTML,"StrFrameColor",StrFrameColor)
else
strHTML = replace(strHTML,"strDescription",strDesc)
end if
strHTML = replace(strHTML,"StrModel",StrModel)
strHTML = replace(strHTML,"StrYouMayLikePic1",StrYouMayLikePic1)
strHTML = replace(strHTML,"StrYouMayLikePic2",StrYouMayLikePic2)
strHTML = replace(strHTML,"StrYouMayLikePic3",StrYouMayLikePic3)
strHTML = replace(strHTML,"StrYouMayLikePic4",StrYouMayLikePic4)
strHTML = replace(strHTML,"StrYouMayLikeLink1",StrYouMayLikeLink1)
strHTML = replace(strHTML,"StrYouMayLikeLink2",StrYouMayLikeLink2)
strHTML = replace(strHTML,"StrYouMayLikeLink3",StrYouMayLikeLink3)
strHTML = replace(strHTML,"StrYouMayLikeLink4",StrYouMayLikeLink4)
strHTML = replace(strHTML,"StrPic1",StrPic1)
strHTML = replace(strHTML,"StrPic2",StrPic2)
strHTML = replace(strHTML,"StrPic3",StrPic3)
strHTML = replace(strHTML,"StrPic4",StrPic4)
strHTML = replace(strHTML,"StrCasePic",StrCasePic)
'strHTML = replace(strHTML,"StrPolarized",StrPolarized)
'strHTML = replace(strHTML,"StrPropertyName",StrPropertyName)
strHTML = replace(strHTML,"StrRetailPrice",StrRetailPrice)
strHTML = replace(strHTML,"StrPolarized",StrPolarized)
strHTML = replace(strHTML,"Str2Polarized",Str2Polarized)
strHTML = replace(strHTML,"StrColorCode",StrColorCode)
strHTML = replace(strHTML,"StrAbout",StrAbout)
strHTML = replace(strHTML,"StrCheckout",StrCheckout)
strHTML = replace(strHTML,"StrPayment",StrPayment)
strHTML = replace(strHTML,"StrShipping",StrShipping)
strHTML = replace(strHTML,"StrContact",StrContact)
strHTML = replace(strHTML,"StrFaq",StrFaq)
' Trash our object now that I'm finished with it.
Set objWinHttp = Nothing
%>
| You may copy and paste the below generated HTML |
| Here is the result of what the page will look like: |
| <%=strHTML%> |