Hi all,
I have to update some classic ASP code and I need to add an if statment to compare if a uppercase value is == "N/A" and to compare value with request("productLink") line 8 and if it is it should by pass validation on line 16.
Any further information required please let me know
Thanks in advance
David
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../includes/functions/insphire.asp"-->
<!--#include file="../../includes/functions/stock.asp"-->
<!--#include file="../../includes/functions/logaccess.asp"-->
<%
if request("Allow") = "f875eba085941cc78509bd3482dc0294" then
' security check passed
categorycodeSQL = "SELECT StockExpectedCategoryCode FROM StockExpectedCategories WHERE StockExpectedCategoryProductID = '" & replace(request("ProductLink"), "heaters", "heater") & "'"
set rowCategoryCode = returnrecordsetstock(categorycodeSQL)
if not rowCategoryCode.eof then
' category code found
response.redirect("available.asp?Allow=" & request("Allow") & "&SONID=" & request("SONID") & "&ProductNo=" & request("ProductNo") & "&ProductQTY=" & request("ProductQTY") & "&ProductIgnore=" & request("ProductIgnore") & "&CategoryFilter=" & rowCategoryCode("StockExpectedCategoryCode"))
else
' category code not found
response.write("Incompatible Product Type")
end if
else
' security check failed
dim CurrentDate, dbLog, IPAddress, logSQL
CurrentDate = year(date) & "-" & month(date) & "-" & day(date) & " " & formatdatetime(now(), 3)
IPAddress = request.servervariables("HTTP_X_FORWARDED_FOR")
if IPAddress = "" then
' get ip address
IPAddress = request.servervariables("REMOTE_ADDR")
end if
logSQL = "INSERT INTO LogIP (LogIPDate, LogIPAddress, LogIPPage) VALUES ('" & CurrentDate & "', '" & IPAddress & "', 'sons/allocate/select-group.asp')"
set dbLog = ExecuteSQL2(logSQL)
end if
%>