<%@ Language=VBScript %> <% currentpage=FormatTextHTML(request.form("currentpage")) grade=FormatTextHTML(request.form("grade")) subject=FormatTextHTML(request.form("subject")) prodtype=FormatTextHTML(request.form("prodtype")) gradesub=FormatTextHTML(request.form("gradesub")) gradecat=FormatTextHTML(request.form("gradecat")) pagesize=30 'max record per page counter=1 'use to display item left and right 'prefix value incase they are empty If currentpage= "" Then currentpage = 1 else currentpage = cint(currentpage) end if ''''Split the search value ''''' gradeArr=Split(grade,"_") gradeid=gradeArr(0) subjectArr=Split(subject,"_") subjectid=subjectArr(0) subjectsubid=subjectArr(1) prodtypeArr=Split(prodtype,"_") prodtypeid=cint(prodtypeArr(0)) prodtypesubid=cint(prodtypeArr(1)) '''''create a search text title if gradeArr(1) <> "0" then searchtext= " > " & gradeArr(1) if subjectArr(2) <> "0" then searchtext= searchtext & " > " & subjectArr(2) if prodtypeArr(2) <> "0" then searchtext= searchtext & " > " & prodtypeArr(2) searchtext=mid(searchtext,3) '''''pass all para and return data Set RS = Server.CreateObject("ADODB.Recordset") RS.CursorLocation = 3 RS.PageSize = pagesize SQL="sp_get_ProductInfoSeach " &gradeid& ", " &subjectid& ", " &subjectsubid& ", " &prodtypeid& ", " &prodtypesubid& "" 'response.Write SQL RS.open SQL, Con,3,3 pagecount = RS.PageCount RecordCount=RS.RecordCount if currentpage=pagecount then pagemax=RecordCount else pagemax=currentpage * pagesize end if if currentpage =1 then pagemin=1 else pagemin=pagemax - pagesize +1 end if %> Scholastic Education Product Information | PreKindergarten (Early Learning) <% doMenu %>
Scholastic Education Product Information
Product Finder Results for: <%=searchtext%>
<% if RecordCount>0 then response.write "
Results: "&pagemin&" - "&pagemax&" of "&RecordCount&" items
" end if %>
<% ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''BEGIN: Loop Through the Record'''''''''''''''''''''''''''''''''''''''''''''''''''''' IF NOT RS.EOF AND NOT BOF then rs.AbsolutePage = currentpage DO WHILE RS.AbsolutePage = currentpage And Not RS.eof product_id=RS("product_id") name_of_product=FormatHTMLTextAll(RS("name_of_product")) product_description=FormatHTMLTextAll(RS("product_description")) add_image=RS("add_image") store_url=RS("store_url") product_microsite_url=RS("product_microsite_url") if not isNull(RS("usages")) then usages=RS("usages") else usages=0 end if indexfeature=RS("indexfeature") if not isnull(usages) and usages <> "" then usagesArray=split(trim(usages),",") if indexfeature = "y" then featurebg="class='pi_resulstscell_highlight'" else featurebg="class='pi_resulstscell'" end if response.Write("") response.Write("" response.write "" response.write "" response.write "" counter=counter+1 RS.MoveNext Loop RS.close set RS=nothing ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''END: Loop Through the Record'''''''''''''''''''''''''''''''''''''''''''''''''''''' ELSE response.Write ("") END If %>
" & RS("name_of_product") &"
") response.Write(product_description &"
") if product_microsite_url <> "" then response.Write("") end if if store_url <> "" then response.Write(" ") end if response.Write("
Product Information
") '''''''''''''''''''''''''Begin: Product Category Information'''''''''''''''''''''' SQLInfo="sp_get_ProductInfoResultProdInfo " & product_id Set RSInfo=Con.Execute(SQLInfo) If NOT RSInfo.Eof and NOT RSInfo.BOF then DO WHILE NOT RSInfo.Eof InfoGrade=InfoGrade & RSInfo("grade_level") & "," RSInfo.MoveNext Loop InfoGradeArr=split(InfoGrade,",") Response.write ("Grades: "&InfoGradeArr(0)&"-"&InfoGradeArr(ubound(InfoGradeArr)-1)&"
") InfoGrade="" set RSInfo=RSInfo.NextRecordset DO WHILE NOT RSInfo.Eof Response.write (""&RSInfo("subject_name")&"
") RSInfo.MoveNext Loop set RSInfo=nothing END IF ''''''''''''''''''''''''''End: Product Category Information'''''''''''''''''''''' response.write("
Product Usage
") if ubound(usagesArray) > 0 and not IsNull(usagesArray) then for i=0 to ubound(usagesArray) if usagesArray(i) <> "" then if usagesArray(i)="1" then usagesArray(i)="Small Group Instruction" elseif usagesArray(i)="2" then usagesArray(i)="Whole Group Instruction" elseif usagesArray(i)="3" then usagesArray(i)="Independent Learning" elseif usagesArray(i)="4" then usagesArray(i)="Professional Resource" end if response.write (""&usagesArray(i)&"
") end if next else response.write "Coming Soon" end if response.write "
There is no result that match your search.
<% if RecordCount>0 then response.write "
Results: "&pagemin&" - "&pagemax&" of "&RecordCount&" items
" end if %>
<% doFooter %>