<%Option Explicit%> <% Call PagePrep() %> <%=sPageTitle%>
<% If IsSmartPhone() Then BuildSmartPhoneHeader(sSmartPhoneHeaderText) Call BuildMidCol() ElseIf ret_blnContentGenius Then Call BuildMidCol() Else Call BuildHeaderDiv() Response.Write "
" Response.Write "
" Call BuildMidCol() Call BuildLeftColDiv() Call BuildThirdCol() Call BuildFourthCol() Response.Write "
" Call BuildFooterDiv() Response.Write "
" & vbCrLf End If %>
<% Dim sSmartPhoneHeaderText, sPageTitle Dim rsProduct Dim cmdProduct Dim lProductCount : lProductCount = 0 Dim bPrefilledPrices : bPrefilledPrices = False Dim sOrderBy, sSortDir Dim PGLP, LandingPageID, PromotionID Function PagePrep() LandingPageID = Request("lpid") PromotionID = Request("pid") Set PGLP = Server.CreateObject("LNPromoGenius.LandingPage") If IsNumeric(PromotionID) And len("" & LandingPageID) = 0 Then PGLP.ConnectionString = PGConnStr LandingPageID = PGLP.GetLandingPageIDFromPromotionID(PromotionID) End If If Not (IsNumeric(LandingPageID) And IsNumeric(PromotionID)) Then GoHome() End If Call PGLP.Init(LandingPageID, PGConnStr, SOURCE_WEBGENIUS, ret_oid, mscsShopperID) sPageTitle = PGLP.Title End Function Function BuildMidCol() Response.Write "
" ' Force header image (it is part of the paid advertisement) ret_blnHeaderImage = True Call DisplaySpecificImage(PGLP.HeaderImage, "", "") If ret_blnLNAV Then ' add some extra uniform padding if we have a left menu so that form doesn't butt up against it Response.Write "
" Else Response.Write "
" End If Response.Write PGLP.Body(ret_store_id) DisplaySpecialPromotions() Response.Write "
" ' margin Response.Write "
" ' midCol BuildMidCol = "" End Function Function BuildThirdCol() Response.Write "
" Call GetRightHandModules() Response.Write "
" End Function Sub GetRightHandModules() Dim Clusters, Cluster Dim html, PromoModule, BannerAd Dim bIncludePromoModule : bIncludePromoModule = False Dim bSecureRequest : bSecureRequest = False Dim bIncludeBrandModuleLink If SupportsOnlineShopping Or SupportsProductCatalog Then bIncludeBrandModuleLink = True Else ' no brand module for basic sites bIncludeBrandModuleLink = False End If If IsNumeric(PromotionID) Then Set Clusters = Server.CreateObject("LNPromoGenius.Clusters") Clusters.MPDConnString = PGConnStr Clusters.WGConnString = WGConnStr set Cluster = Clusters.GetClusterFromPromoID(PromotionID) html = Cluster.ModulesHTML(ret_store_id, ret_oid, Request.ServerVariables("SERVER_NAME"), bIncludePromoModule, mscsShopperID, bSecureRequest, bIncludeBrandModuleLink) Response.Write html End if End Sub Function DisplaySpecialPromotions() ' If Not (SupportsProductCatalog() or SupportsOnlineShopping()) Then ' Exit Function ' this is a basic site ' End If ' here we need code to selectively determine which products to display ' based on which products are tied to the promotion, and which products this retailer supports If IsNumeric(PromotionID) Then Set rsProduct=server.CreateObject("ADODB.Recordset") rsProduct.CursorLocation = adUseClient rsProduct.CursorType = adOpenStatic rsProduct.LockType = adLockBatchOptimistic rsProduct.PageSize = 50 '- hard code this to 50 Set cmdProduct = Server.CreateObject("ADODB.Command") cmdProduct.ActiveConnection = MSCS cmdProduct.CommandType = adCmdStoredProc cmdProduct.Parameters.Append cmdProduct.CreateParameter("@storePK", adInteger, adParamInput, 4, ret_OID) cmdProduct.Parameters.Append cmdProduct.CreateParameter("@PromotionID", adInteger, adParamInput, 4, PromotionID) cmdProduct.CommandText = "spPGGetSpecialPromotionProducts" rsProduct.Open cmdProduct Set rsProduct.ActiveConnection = nothing lProductCount = rsProduct.RecordCount If lProductCount > 0 Then Response.Write "" & vbCrLf Response.Write " Special Promotions" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf Call DisplayResultsBodyPG() Response.Write "
" & vbCrLf End If End If End Function Function DisplayResults() Dim bUseThumbnail : bUseThumbnail = True If lProductCount > 0 Then Call DisplayProductResultsEx(bUseThumbnail) End If End Function ' Insert tracking assest for PG Ads If Not PGLP Is Nothing Then Response.Write ("
" ) Response.Write PGLP.GetPixelCodeIFrame(Request.ServerVariables("SERVER_NAME"), Request.QueryString("dnr")) Response.Write ("
" & vbCrLf) Set PGLP = Nothing End If %>