%
'Set the response buffer to true as we maybe redirecting and setting a cookie
Response.Buffer = true
'Make sure this page is not cached
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "No-Store"
Dim checkURLQuery
checkURLQuery = formatURLFilter(Request.ServerVariables("QUERY_STRING"))
%>
<%
Dim productstoshow : productstoshow = Trim(Request.QueryString("id"))
Dim sqlquery
if productstoshow <> "" then
if IsNumeric(productstoshow) = true then
sqlquery = "Select * From tbl_Kaizenint_Products Where Productid = "& productstoshow & " AND trashed=0 ORDER BY ProductSection, CategoryId;"
rs.Open sqlquery ,objconn,3,2
if not rs.eof then
id = rs("ProductId")
CategoryId = rs("CategoryId")
ProductSection = rs("ProductSection")
ProductTitle = rs("ProductTitle")
ProductImage1 = rs("ProductImage1")
if rs("ProductDetails") <> "" then
ProductDetails = rs("ProductDetails")
else
ProductDetails = "(no details)"
end if
if ProductSection = "Kaizen Tools" then
gotobackpage = "catid=1&subcatid=" & CategoryId
elseif ProductSection = "Kaizen Equipments" then
gotobackpage = "catid=2&subcatid=" & CategoryId
elseif ProductSection = "Kaizen Technology" then
gotobackpage = "catid=3&subcatid=" & CategoryId
elseif ProductSection = "Kaizen International" then
gotobackpage = "catid=4&subcatid=" & CategoryId
end if
end if
rs.close
if CategoryId <> "" then
rs.Open "Select * from tbl_Kaizenint_Category Where CategoryId="& CategoryId &";", objconn, 3, 2
if not rs.eof then
HeaderCategory = " :: " & rs("CategoryTitle")
end if
rs.Close
end if
else
errmsg = "Sorry. Details for the requested product cannot be found."
end if
end if
%>