<%@ Language="VBSCRIPT" %> <% Option Explicit %> <% '************************************************************************************ '* Declaration section '************************************************************************************ ' Declare variable to display details. Dim strBOwnerID, strBID, strCatID, strClassID, strSubClassID, strWhere Dim strBName, strBOwner, strPara, strCategory, strClass ' Available to all Dim strBright, strOpacity, strBasisWeight, strCaliper, strFinish, strRecCont Dim strPostCons, strAlkaline, strColors, strSoldIn, strCompatible Dim strBSID, strBSItemID ' Declare variable to obtain previous page for link. Dim strReturnTo ' Grab variable from QueryString. strBID = Request.QueryString("bid") strCatID = Request.QueryString("catid") strClassID = Request.QueryString("classid") strSubClassID = Request.QueryString("subclassid") strBSID = Request.QueryString("bsid") strBSItemID = Request.QueryString("bsitemid") ' Build whereclause to obtain proper record. strWhere = "WHERE " If strBID <> "" Then strWhere = strWhere & "tbl_Brand.BrandID = " & strBID & " AND " End If If strCatID <> "" Then strWhere = strWhere & "tbl_Category.CategoryID = " & strCatID & " AND " End If If strClassID <> "" Then strWhere = strWhere & "tbl_Classification.ClassID = " & strClassID & " AND " End If If strSubClassID <> "" Then strWhere = strWhere & "tbl_BSItem.SubClassID = " & strSubClassID & " AND " End If ' Take off AND if at the end of string== If Right(strWhere, 4) = "AND " Then strWhere = Left(strWhere, Len(strWhere) - 4) End If ' Time to create and open recordset Dim rsDetails, sqlDetails sqlDetails = "SELECT tbl_Locations.LocationID, tbl_Locations.LocationAbrv, tbl_BrandSummary.BrandID, tbl_Brand.BrandName, tbl_Category.CategoryID, tbl_Classification.ClassID, tbl_BSItem.SubClassID, tbl_Category.CategoryName, tbl_Classification.ClassName, tbl_Class_Sub.Rank, tbl_Class_Sub.RankName, tbl_Category.CategoryID & '-' & tbl_Classification.ParaNum & tbl_Class_Sub.Rank AS BrandPara, tbl_BrandSummary.Brightness, tbl_BrandSummary.Opacity, tbl_BrandSummary.BasisWeight, tbl_BrandSummary.RecycledContent, tbl_BrandSummary.PostConsumer, tbl_BrandSummary.Alkaline, tbl_BrandSummary.Caliper, tbl_BrandSummary.Colors, tbl_BrandSummary.Finish, tbl_BrandSummary.Sheets, tbl_BrandSummary.Rolls, tbl_BrandSummary.CutSizes, tbl_BrandSummary.HeidelbergDI, tbl_BrandSummary.Indigo, tbl_BrandSummary.Xeikon, tbl_BrandSummary.Laser, tbl_BrandSummary.InkJet, tbl_BrandSummary.DateStamp " & _ "FROM tbl_Locations INNER JOIN (tbl_Class_Sub RIGHT JOIN ((tbl_Category RIGHT JOIN (tbl_Brand LEFT JOIN (tbl_Classification RIGHT JOIN tbl_BrandSummary ON tbl_Classification.ClassID = tbl_BrandSummary.ClassID) ON tbl_Brand.BrandID = tbl_BrandSummary.BrandID) ON tbl_Category.CategoryID = tbl_Classification.CategoryID) LEFT JOIN tbl_BSItem ON tbl_BrandSummary.BrandSummaryID = tbl_BSItem.BSID) ON tbl_Class_Sub.ClassRankID = tbl_BSItem.SubClassID) ON tbl_Locations.LocationID = tbl_Brand.LocationID " & _ strWhere Set rsDetails = Server.CreateObject("ADODB.Recordset") rsDetails.Open sqlDetails, GetPCDataConn, 2, 3 If Not rsDetails.BOF And Not rsDetails.EOF Then strBOwnerID = rsDetails("LocationID") strBName = rsDetails("BrandName") strBOwner = rsDetails("LocationAbrv") strPara = rsDetails("BrandPara") strCategory = rsDetails("CategoryName") strClass = rsDetails("ClassName") strBright = rsDetails("Brightness") strOpacity = rsDetails("Opacity") strBasisWeight = rsDetails("BasisWeight") strCaliper = rsDetails("Caliper") strFinish = rsDetails("Finish") strRecCont = rsDetails("RecycledContent") strPostCons = rsDetails("PostConsumer") If rsDetails("Alkaline") = "Y" Then strAlkaline = "Yes" ElseIf rsDetails("Alkaline") = "N" Then strAlkaline = "No" End If If InStr(rsDetails("Colors"), "C") > 0 Then strColors = "Yes" ElseIf InStr(rsDetails("Colors"), "W") > 0 Then strColors = "White Only. No Colors." End If ' Check fields for SoldIn status If rsDetails("Sheets") = True Then strSoldIn = "Sheets" End If If rsDetails("Rolls") = True Then If strSoldIn <> "" Then strSoldIn = strSoldIn & ", Rolls" Else strSoldIn = "Rolls" End If End If If rsDetails("Cutsizes") = True Then If strSoldIn <> "" Then strSoldIn = strSoldIn & ", Cutsizes" Else strSoldIn = "Cutsizes" End If End If ' Check fields for Compatible status If rsDetails("HeidelbergDI") = True Then strCompatible = "HeidelbergDI" End If If rsDetails("Indigo") = True Then If strCompatible <> "" Then strCompatible = strCompatible & ", Indigo" Else strCompatible = "Indigo" End If End If If rsDetails("Xeikon") = True Then If strCompatible <> "" Then strCompatible = strCompatible & ", Xeikon" Else strCompatible = "Xeikon" End If End If If rsDetails("Laser") = True Then If strCompatible <> "" Then strCompatible = strCompatible & ", Laser" Else strCompatible = "Laser" End If End If If rsDetails("InkJet") = True Then If strCompatible <> "" Then strCompatible = strCompatible & ", InkJet" Else strCompatible = "InkJet" End If End If ' Link from Brand to Distributors of this Brand. Dim rsManfDist, sqlManfDist, strManfDistLink sqlManfDist = "SELECT tbl_Locations.LocationID, Count(tbl_MnftoDist.M2MID) AS CountOfM2MID " & _ "FROM tbl_Locations INNER JOIN tbl_MnftoDist ON tbl_Locations.LocationID = tbl_MnftoDist.MLocationID " & _ "GROUP BY tbl_Locations.LocationID " & _ "HAVING (((tbl_Locations.LocationID)=" & strBOwnerID & "));" Set rsManfDist = Server.CreateObject("ADODB.Recordset") rsManfDist.Open sqlManfDist, GetPCDataConn, 2, 3 If Not rsManfDist.BOF And Not rsManfDist.EOF Then strManfDistLink = " | View Distributors of Brand Owner" Else strManfDistLink = "" End If rsManfDist.Close Set rsManfDist = Nothing End If rsDetails.Close Set rsDetails = Nothing ' Declare and obtain CustomerID. Dim intCustID intCustID = Request.Cookies("PCUser")("CustomerID") Dim strBMType, intBID, intCompID, intCatID, intClassID, intSubClassID Dim strQuery, strPageMark, strItemName, strItemInfo ' Obtain values from Bookmark Link. strBMType = Request.QueryString("bmtype") intBID = Request.QueryString("bid") intCatID = Request.QueryString("catid") intClassID = Request.QueryString("classid") intSubClassID = Request.QueryString("subclassid") intCompID = Request.QueryString("lid") strItemName = Request.QueryString("iname") strItemInfo = Request.QueryString("iinfo") If intCustID <> "" Then strPageMark = "bid=" & intBID & "&catid=" & intCatID & "&classid=" & intClassID & "&subclassid=" & intSubClassID strQuery = "SELECT * FROM tbl_PCMarks WHERE CustomerID=" & intCustID & " AND BMType='B' AND PageMark ='" & strPageMark & "'" ' Get any brands that have been bookmarked. Dim rsBrands, sqlBrands, strBMarked sqlBrands = strQuery Set rsBrands = Server.CreateObject("ADODB.Recordset") rsBrands.Open sqlBrands, GetWMCMSConnection, 1, 2 If Not rsBrands.BOF And Not rsBrands.EOF Then strBMarked = "Yes" Else strBMarked = "No" End If rsBrands.Close Set rsBrands = Nothing Else strBMarked = "" End If ' Add hit to counters. Dim rsAddBrandCounter, sqlAddBrandCounter, intBrandCounter sqlAddBrandCounter = "SELECT BrandID, TotalBrandHits FROM tbl_Brand WHERE BrandID=" & strBID Set rsAddBrandCounter = Server.CreateObject("ADODB.Recordset") rsAddBrandCounter.Open sqlAddBrandCounter, GetWMDataConnectionString, 2, 3 If Not rsAddBrandCounter.BOF And Not rsAddBrandCounter.EOF Then intBrandCounter = rsAddBrandCounter("TotalBrandHits") If IsNull(intBrandCounter) Then intBrandCounter = 0 End if intBrandCounter = intBrandCounter + 1 rsAddBrandCounter("TotalBrandHits") = intBrandCounter rsAddBrandCounter.Update End If rsAddBrandCounter.Close Set rsAddBrandCounter = Nothing If Request.QueryString("bsid") <> "" OR Request.QueryString("bsitemid") <> "" Then Dim rsAddCounter, sqlAddCounter, intAddCounter If Request.QueryString("bsid") <> "" AND Request.QueryString("bsitemid") = "" Then sqlAddCounter = "SELECT tbl_BrandSummary.BrandSummaryID, tbl_BrandSummary.BrandID, tbl_BrandSummary.ClassID, tbl_BrandSummary.TotalBrandHits " & _ "FROM tbl_BrandSummary " & _ "WHERE tbl_BrandSummary.BrandSummaryID= " & strBSID Else sqlAddCounter = "SELECT tbl_BSItem.BSItemID, tbl_BSItem.TotalBrandHits " & _ "FROM tbl_BSItem " & _ "WHERE tbl_BSItem.BSItemID=" & strBSItemID End If Set rsAddCounter = Server.CreateObject("ADODB.Recordset") rsAddCounter.Open sqlAddCounter, GetWMDataConnectionString, 2, 3 If Not rsAddCounter.BOF And Not rsAddCounter.EOF Then intAddCounter = rsAddCounter("TotalBrandHits") If IsNull(intAddCounter) Then intAddCounter = 0 End If intAddCounter = intAddCounter + 1 rsAddCounter("TotalBrandHits") = intAddCounter rsAddCounter.Update End If rsAddCounter.Close Set rsAddCounter = Nothing End If '************************************************************************************ '* Functions section '************************************************************************************ Private Function GetFinishName(finishtext) Dim strFinish, strFinishTxt, strCurrentFinish strFinish = finishtext strFinishTxt = "" Dim rsFinish, sqlFinish Set rsFinish = Server.CreateObject("ADODB.Recordset") sqlFinish = "SELECT tbl_Finish.FinishAbrv, tbl_Finish.Finish " & _ "FROM tbl_Finish ORDER BY tbl_Finish.Finish;" 'rsFinish.CursorLocation = 3 ' adUseClient rsFinish.Open sqlFinish, GetWMDataConnectionString, 1, 2 ' adOpenKeyset CursorType While Not rsFinish.EOF strCurrentFinish = rsFinish("FinishAbrv") If InStr(strFinish, strCurrentFinish) > 0 Then If strFinishTxt <> "" Then strFinishTxt = strFinishTxt & ", " & rsFinish("Finish") Else strFinishTxt = rsFinish("Finish") End If End If rsFinish.MoveNext Wend rsFinish.Close Set rsFinish = Nothing GetFinishName = strFinishTxt End Function %> PaperCatalog.com - Paper Brand Details
spacer
Brand Names | Brand Owners | Papers By Grade | Paper Distributors | Back to Results Page
  <% If intCustID <> "" Then %> <% Else %> <% End If %>
<%=strBName%> - Details  <%If strBMarked = "No" Then%><%ElseIf strBMarked = "Yes" Then%>(Bookmarked)<%End If%>
Brand Name <%=strBName%>
Brand Owner <%=strBOwner%><%=strManfDistLink%>
Paragraph # <%=strPara%> <%If strPara <> "-" Then%>Compare Brands<%End If%>
Category <%=strCategory%>
Classification <%=strClass%>
Brightness <%=strBright%>
Opacity <%=strOpacity%>
Basis Weight <%=strBasisWeight%>
Caliper <%=strCaliper%>
Finish <%=GetFinishName(strFinish)%>
Recycled Content <%=strRecCont%>
Post Consumer <%=strPostCons%>
Alkaline <%=strAlkaline%>
Colors <%=strColors%>
Sold In <%=strSoldIn%>
Compatible With <%=strCompatible%>
Brightness

View all the details!

Walden's Paper Catalog

Login or Sign Up for PaperCatalog.com services today!

You will receive much more details for the following:

  • Paper Brands
  • Brand Owners
  • Paper Grades
  • Paper Distributors

Subscribe Today!Learn More

Opacity
Basis Weight
Caliper
Finish
Recycled Content
Post Consumer
Alkaline
Colors
Sold In
Compatible With
"> "> "> "> "> "> ">