<% '-- Long/Double vars used dim lngProductID, lngIndex dim lngCurrentPage, lngManufacturerID, lngCategoryID '-- MOD luis 29DEC2008 added dblLease dim dblPrice, dblMSRP, dblLease dim dblShippingWeight, dblShippingInsurance dim strStoreSwitch, strTabSwitch '-- String vars used dim strHTML dim strCode, strName, strDescription, strTagDescription dim strManufacturerName, strImage, strProductThumbNail dim strWarrantyDescription, strShippingTypeDescription, strPDF dim strCartItemInfo '-- Boolean vars used dim blnHasRecords, blnHasCompatibleProducts, blnHasLinkURLs, blnHasApplicationNotes dim strBaseURL '-- MOD menchu 11-MAY-2008 replaced 206.67.54.56 with www.aeswave.com strBaseURL = "http://www.aeswave.com" '-- MOD menchu 11-MAY-2008 protecting inputs '-- lngProductID = nsIsNull(Request("i"), 0) '-- lngManufacturerID = nsIsNull(Request("mi"), 0) '-- lngCategoryID = nsIsNull(Request("ci"), 0) If IsNumeric(Request("i")) Then lngProductID = nsIsNull(Request("i"), 0) Else lngProductID = 0 End If If IsNumeric(Request("mi")) Then lngManufacturerID = nsIsNull(Request("mi"), 0) Else lngManufacturerID = 0 End If If IsNumeric(Request("ci")) Then lngCategoryID = nsIsNull(Request("ci"), 0) Else lngCategoryID = 0 End If strTabSwitch = nsIsNull(Request("tsw"), "") '-- MOD menchu 11-MAY-2008 protecting inputs with killChars strTabSwitch = killChars(strTabSwitch) strStoreSwitch = "" dbConnect 'strLatestNews = "" 'strLatestNews_URL = "" AddBackPathItem "Home", "default.asp" If Request("sa") = "Y" Then strStoreSwitch = "&sa=Y" '-- MOD menchu 11-MAY-2008 protecting inputs '-- AddBackPathItem "Store", "Products.asp?p=" & nsIsNull(Request("vp"), 0) If IsNumeric(Request("vp")) Then AddBackPathItem "Store", "Products.asp?p=" & nsIsNull(Request("vp"), 0) Else AddBackPathItem "Store", "Products.asp?p=0" End If End If If lngManufacturerID Then strSQL = "www_GetManufacturer " & lngManufacturerID Set rs = gobjDB.Execute(strSQL) If Not rs.EOF Then '-- MOD menchu 11-MAY-2008 protecting inputs '-- AddBackPathItem "Back To """ & rs("mfr_Name") & """", "Products.asp?mi=" & lngManufacturerID & "&p=" & nsIsNull(Request("vp"), 0) & strStoreSwitch If IsNumeric(Request("vp")) Then AddBackPathItem "Back To """ & rs("mfr_Name") & """", "Products.asp?mi=" & lngManufacturerID & "&p=" & nsIsNull(Request("vp"), 0) & strStoreSwitch Else AddBackPathItem "Back To """ & rs("mfr_Name") & """", "Products.asp?mi=" & lngManufacturerID & "&p=0" & strStoreSwitch End If strStoreSwitch = strStoreSwitch & "&mi=" & lngManufacturerID End If rs.Close Else If lngCategoryID Then strSQL = "www_GetCategory " & lngCategoryID Set rs = gobjDB.Execute(strSQL) If Not rs.EOF Then '-- MOD menchu 11-MAY-2008 protecting inputs '-- AddBackPathItem "Back To """ & rs("ctg_Name") & """", "Products.asp?ci=" & lngCategoryID & "&p=" & nsIsNull(Request("vp"), 0) & strStoreSwitch If IsNumeric(Request("vp")) Then AddBackPathItem "Back To """ & rs("ctg_Name") & """", "Products.asp?ci=" & lngCategoryID & "&p=" & nsIsNull(Request("vp"), 0) & strStoreSwitch Else AddBackPathItem "Back To """ & rs("ctg_Name") & """", "Products.asp?ci=" & lngCategoryID & "&p=0" & strStoreSwitch End If strStoreSwitch = strStoreSwitch & "&mi=" & lngManufacturerID End If rs.Close End If End If strSQL = "www_GetProduct " & lngProductID Set rs = gobjDB.Execute(strSQL) If Not rs.EOF Then 'For lngIndex = 0 To rs.Fields.Count -1 ' Response.Write lngIndex & ". " & rs.Fields(lngIndex).Name & "=" & rs.Fields(lngIndex) & "
" ' 'Next 'Response.End strCode = rs("prd_Code") strName = rs("prd_Name") strManufacturerName = rs("prd_ManufacturerName") dblPrice = rs("prd_Price") ' 29-DEC-2008 luis calculate lease price displayed if products costs more than 950 dblLease = dblPrice * 0.0353 dblMSRP = rs("prd_MSRP") strImage = rs("prd_Image") strProductThumbNail = rs("prd_ThumbnailImage") strTagDescription = rs("prd_DescriptionTag") 'strDescription = rs("prd_DescriptionLong") 'If strDescription = "" Then ' strDescription = rs("prd_DescriptionShort") 'Else ' If strDescription = "" Then ' strDescription = strTagDescription ' End If 'End If 'strDescription = Replace(strDescription, vbCRLF, "
") strTagDescription = Replace(strTagDescription, vbCRLF, "
") 'Product Attributes strShippingTypeDescription = rs("prd_ShippingTypeDescription") If strShippingTypeDescription = "" OR IsNull(strShippingTypeDescription) Then strShippingTypeDescription = rs("prd_ShippingTypeName") End If strWarrantyDescription = rs("prd_WarrantyDescription") If strWarrantyDescription = "" OR IsNull(strWarrantyDescription) Then strWarrantyDescription = rs("prd_WarrantyName") End If dblShippingWeight = CDbl(rs("prd_ShippingWeight")) dblShippingInsurance = CDbl(rs("prd_ShippingInsurance")) strPDF = rs("prd_PDFBrochure") blnHasCompatibleProducts = (rs("prd_HasCompatibleProducts") = "Y") blnHasLinkURLs = (rs("prd_HasLinks") = "Y") blnHasApplicationNotes = (rs("prd_HasApplicationNotes") = "Y") strCartItemInfo = "b-3128^" & rs("prd_Code") & "^" & rs("prd_Name") & "^" & dblPrice & "^1" strCartItemInfo = strCartItemInfo & "^^" If CDbl(rs("prd_ShippingInsurance")) > 0 Then strCartItemInfo = strCartItemInfo & rs("prd_ShippingInsurance") End If strCartItemInfo = strCartItemInfo & "^^" If CDbl(rs("prd_ShippingWeight")) > 0 Then strCartItemInfo = strCartItemInfo & rs("prd_ShippingWeight") End If If rs("prd_ThumbnailImage") <> "" Then strCartItemInfo = strCartItemInfo & "^http://www.aeswave.com/" & rs("prd_ThumbnailImage") End If '---- Header WriteHeader Response.Write "" & vbCRLF Response.Write "" & vbCRLF Response.Write vbTab & "" & vbCRLF Response.Write "" & vbCRLF Response.Write "
" & vbCRLF '************************************************************************ Response.Write "" & vbCRLF Response.Write vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & "" & vbCRLF ' 20FEB2007 Luis Menchu Mod for payment option text ' Response.Write vbTab & vbTab & vbTab & "" & vbCRLF WriteTabSection strTabSwitch, lngProductID 'If blnHasLinkURLs Then ' Response.Write vbTab & vbTab & vbTab & vbTab & "" ' Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" ' Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF 'End If Response.Write vbTab & "
" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' 02/24/2002 Lance Menchu ' This replaces the full image with the thumbnail image ' added an alt tag (product name) ' added a bookmark link to the full image 'If strImage <> "" Then if strProductThumbNail <> "" then 'Response.Write "" & vbCRLF Response.Write "" & vbCRLF Else 'Response.Write "" & vbCRLF Response.Write "" & vbCRLF End If ' 02/24/2002 Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' 29MAR2006 Luis Menchu ' Moved PDF link to below product thumbnail here and added ugly div to provide spacing If strPDF <> "" Then Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF End If Response.Write vbTab & vbTab & vbTab & vbTab & "
" & vbCRLF Response.Write "
" & vbCRLF Response.Write vbTab & vbTab & vbTab & "" & vbCRLF '********////////////*******************//////////****** Response.Write vbTab & vbTab & vbTab & vbTab & "
" & vbCRLF ' 20FEB2007 Luis Menchu Mod for payment option text ' Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "
" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF 'If strManufacturerName <> "" Then ' Response.Write vbTab & vbTab & vbTab & vbTab & "" ' Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" ' Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF 'End If If dblPrice > 0 Then If strShippingTypeDescription <> "" Then Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF End If Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF If dblMSRP > 0 Then Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF End If 'Response.Write "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF 'Response.Write "" & vbCRLF End If 'Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF 'Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF 'Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' 29MAR2006 Luis Menchu ' Added ugly div to provide spacing Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' 29MAR2006 Luis Menchu ' Moved PDF link to below product thumbnail ' If strPDF <> "" Then ' Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' End If 'Response.Write vbTab & vbTab & vbTab & vbTab & "" Response.Write vbTab & vbTab & vbTab & vbTab & "
AES# " & strCode & "
" & strName & "
 
Manufacturer: " & strManufacturerName & "
" & strShippingTypeDescription & "
Our Price: " & FormatCurrency(dblPrice, 2) & "
MSRP: " & FormatCurrency(dblMSRP, 2) & "

" & vbCRLF 'Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' 20FEB2007 Luis Menchu ' Modified to add payment options ' Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF ' Response.Write vbTab & vbTab & vbTab & vbTab & "

" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "
" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "
" & vbCRLF ' 20FEB2007 Luis Menchu New line ' Response.Write vbTab & vbTab & vbTab & vbTab & "
Accepting Google Checkout, Paypal,
Visa, MasterCard, Amex and Discover!

" & vbCRLF ' 29DEC2008 luis add lease if price at least 950 If dblPrice >= 950 Then Response.Write vbTab & vbTab & vbTab & vbTab & "
Accepting Google Checkout, Paypal,
Visa, MasterCard, Amex and Discover!
Lease starts at " & FormatCurrency(dblLease, 0) & "/mo for 36 months!

" & vbCRLF else Response.Write vbTab & vbTab & vbTab & vbTab & "
Accepting Google Checkout, Paypal,
Visa, MasterCard, Amex and Discover!

" & vbCRLF End If 'Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "
 
" & vbCRLF Response.Write strTagDescription & vbCRLF ' 29MAR2006 Luis Menchu ' Added ugly div to provide spacing Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "
PDF Brochure Available!
 
" Response.Write vbTab & vbTab & vbTab & vbTab & "
" Response.Write vbTab & vbTab & vbTab & vbTab & "
" ' Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & CreateLinksHTML(lngProductID) ' Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "
" & vbCRLF Response.Write vbTab & "
" & vbCRLF ' 02/24/2002 Lance Menchu ' This section adds the full product image to the page below the tabbed section if len(rtrim(strImage)) <> 0 then Response.Write "
" & vbcrlf Response.Write "" & vbCRLF Response.Write "" end if ' 02/24/2002 rs.Close Set rs = Nothing '---- Footer WriteFooter Else '-- MOD menchu if no referer available, send to home If LEN(Request.ServerVariables("HTTP_REFERER")) > 0 Then Response.Redirect Request.ServerVariables("HTTP_REFERER") Else Response.Redirect strBaseURL End If End If '---- WWW Functions ---- function parseDescription(pStr,plngCharacterLimit) dim lngStringLen, strNewStr lngStringLen = LEN(pStr) strNewStr = "" If lngStringLen > 0 Then strNewStr = pStr If lngStringLen > plngCharacterLimit Then strNewStr = LEFT(strNewStr, plngCharacterLimit + 1) strNewStr = LEFT(strNewStr, InStrRev(strNewStr, " ")) strNewStr = strNewStr & "..." End If End If parseDescription = strNewStr end function sub WriteTabSection(pstrTabSelected, plngProductID) dim strTabSelected, strImageHTML, strImageMapHTML, strImageDescription dim strTabInformation strTabSelected = pstrTabSelected If strTabSelected <> "" Then strTabSelected = UCase(strTabSelected) End If Select Case strTabSelected Case "SU" strImageHTML = "tab_support.gif" strImageDescription = "Support" strImageMapHTML = vbCRLF & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & "" & vbCRLF & vbCRLF strTabInformation = CreateApplicationNotesHTML(plngProductID) Case "RP" strImageHTML = "tab_relatedproducts.gif" strImageDescription = "Related Products" strImageMapHTML = vbCRLF & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & "" & vbCRLF & vbCRLF strTabInformation = CreateCompatibleProductsHTML(plngProductID) Case Else strImageHTML = "tab_overview.gif" strImageDescription = "Overview" strImageMapHTML = vbCRLF & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & vbTab & "" & vbCRLF strImageMapHTML = strImageMapHTML & "" & vbCRLF & vbCRLF strTabInformation = CreateProductDescriptionHTML(plngProductID) End Select Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" Response.Write "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write strImageMapHTML & vbCRLF Response.Write "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write vbTab & vbTab & vbTab & vbTab & "" & vbCRLF Response.Write "
" & vbCRLF Response.Write "" & vbCRLF Response.Write "
" & vbCRLF Response.Write strTabInformation & vbCRLF Response.Write "
" & vbCRLF Response.Write "" & vbCRLF Response.Write "" & vbCRLF end sub function CreateProductDescriptionHTML(plngProductID) dim oRs, strHTML strHTML = "" strSQL = "www_GetProductDescriptions " & lngProductID Set oRs = gobjDB.Execute(strSQL) If Not oRs.EOF Then strDescription = oRs("prd_DescriptionLong") If strDescription = "" Then strDescription = oRs("prd_DescriptionShort") Else If strDescription = "" Then strDescription = oRs("prd_DescriptionTag") End If End If strDescription = Replace(strDescription, vbCRLF, "
") 'Set the width for the OVERVIEW Here ******************************************* strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "
Overview
" & strDescription & "
" & vbCRLF End If oRs.Close Set oRs = Nothing CreateProductDescriptionHTML = strHTML end function function CreateCompatibleProductsHTML(plngProductID) dim oRs, strHTML strHTML = "" strSQL = "www_GetCompatibleProducts " & lngProductID Set oRs = gobjDB.Execute(strSQL) If Not oRs.EOF Then strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF While Not oRs.EOF strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF oRs.MoveNext Wend strHTML = strHTML & "
Related Products:
 • " & oRs("cmp_Name") & "
" & vbCRLF End If oRs.Close Set oRs = Nothing CreateCompatibleProductsHTML = strHTML end function function CreateLinksHTML(plngProductID) dim oRs, strHTML strHTML = "" strSQL = "www_GetLinkURLs " & lngProductID Set oRs = gobjDB.Execute(strSQL) If Not oRs.EOF Then strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF While Not oRs.EOF strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF oRs.MoveNext Wend strHTML = strHTML & "
Related Links:
 • " & oRs("url_Name") & "
" & vbCRLF End If oRs.Close Set oRs = Nothing CreateLinksHTML = strHTML end function function CreateApplicationNotesHTML(plngProductID) dim oRs, strHTML, strTitle, strNote strHTML = "" strSQL = "www_GetApplicationNotes " & lngProductID Set oRs = gobjDB.Execute(strSQL) If Not oRs.EOF Then '**************************************************** Here strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF While Not oRs.EOF strTitle = nsIsNull(oRs("apn_Title"), "") strNote = nsIsNull(oRs("apn_Note"), "") strNote = Replace(strNote, vbCRLF, "
") 'strHTML = strHTML & "" strHTML = strHTML & "" & vbCRLF ' lmenchu changed class from ProductDescription to ApplicationNoteTitle 08-AUG-2005 strHTML = strHTML & "" & vbCRLF strHTML = strHTML & "" & vbCRLF oRs.MoveNext Wend strHTML = strHTML & "
Application Notes
 
" & strTitle & "
" & vbCRLF If oRs("apn_Image") <> "" Then strHTML = strHTML & "" & vbCRLF End If strHTML = strHTML & strNote strHTML = strHTML & "
" & vbCRLF End If oRs.Close Set oRs = Nothing CreateApplicationNotesHTML = strHTML end function %>