<% Set MyConn = Server.CreateObject("ADODB.Connection") MyConn.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=wim2011; UID=wim2011-dba;PASSWORD=abc123!; OPTION=3" Qsql = "Select * from tblwarranty ORDER by warrantyTitle DESC" SET Asql = MyConn.Execute(Qsql) Qcount = "Select count(*) as Allmenu from tblwarranty" SET Acount = MyConn.Execute(Qcount) totalMenu = CInt(Acount("Allmenu")) DIM rsPerRow ' how many records do you want per row in table? DIM totalRS ' how many records total from MySql? DIM rsPerPage ' how many records do you want to display per page? DIM wantPrint ' how many page number do you want to group per pack? rsPerRow = 1 totalRS = totalMenu rsPerPage = 30 wantPrint = 5 'if the query of page is nothing, set this page number is 1 curentPage = request.queryString("page")&"" if curentPage="" then curentPage=1 count1=0 'small counter to count movedown in WHILE/WEND in ASP page movedown=0 'small counter to count movedown in MySql while (movedown < ((curentPage-1)*rsPerPage)) movedown = movedown + 1 Asql.movenext wend 'Start to display page layout count2=0 '----> small counter to count the number of has reached the wanted number response.write "  WIM Products' Warranty

" %>
Which adds up to 8,760 working hours. 365 days a year-times two. This is the period for which we guarantee the functional charteristics of our products. We are confident that nothing can go wrong with a system or a unit bearing the name WIM. But in the unlikely event that a fault should occur, we undertake to repair it and to shoulder the cost. As you will appreciate, this does not apply to wearing parts.

2 times longer than the statutory requirement.
The law currently requires a fixed warranty on material and production defects in commercially used products of 1 year. We will grant you not just 1 year's warranty from the date of purchase, but another 1 years on top. But please do tell us where your equipment is being used and who you are.

Please return the warranty card to WIM.

Otherwise we will NOT be able to fulfil our two-year warranty pledge. The warranty card is enclosed with your unit. As soon as you have registered, you will receive your binding warranty certificate guaranteeing two years of cover from the date of purchase.
<% response.Write "

  Need the free Adobe Reader? Get it here.


" if totalmenu = 0 then response.Write "
No product warranty document found.
Please come back again for more updated product warranty document. Thank you very much for your kind consideration." else response.Write "" while (not Asql.eof) and (count1 rsPerRow then response.write "" count2=1 end if dim warrantyID, warrantyTitle warrantyID = Asql("warrantyID") warrantyTitle = Asql("warrantyTitle") response.write "" Asql.movenext wend response.write "
 Product Warranty
»"&warrantyTitle&"
" 'Start to handle the page number(1:do the paging logic 2:display page numbers) response.write "
" 'response.write "total records: " & totalMenu 'This is the most funny part...the number here is used to * the number of wantPrint to get the next group page if curentPage = 1 then pageMove=0 else pageMove=request.queryString("pageMove") end if 'To count virtual page number after grouping renderPage = round(totalRS/rsPerPage) if (totalRS mod rsPerPage) = 0 then pageCount = renderPage else if renderPage < (totalRS/rsPerPage) then pageCount=renderPage + 1 elseif renderPage > (totalRS/rsPerPage) then pageCount = renderPage end if end if 'This is the virtual paging, to count the number of page group if curentPage = 1 then printTime=0 else printTime = request.queryString("printTime") end if 'Start to do the page number layout '1:direct to previous page group if it is in the right time if printTime > 0 then tempnow1=((wantPrint*pageMove)+1)-wantPrint response.write "Previous "& wantPrint &" Pages  " end if '2:write page number for writePage=1 to wantPrint virtualPage = writePage+(wantPrint*pageMove) if virtualPage = curentPage+0 then response.write ""&virtualPage&"" else if virtualPage <= pageCount then response.write " | "& virtualPage & " | " end if end if next '3: direct to the next page group if it is in the right time if (virtualPage > pageCount) or (virtualPage=pageCount) then 'response.write "no next" else response.write " Next "& wantPrint &" Pages " end if response.Write "

  Please come back again for more product warranty documents. Thank you very much for your kind consideration." end if %>