Products Search " style="border:1px solid #FFFFFF; height:10px; line-height:10px; width:130px;"/>
<%i=i+1 if i>=MaxPerPage then Exit Do rs.movenext loop rs.close set rs=nothing %>
Download
<% set rs=Server.CreateObject("adodb.recordset") sql= "select id,typename from download_type order by ordernumber asc,id asc " rs.Open sql,conn,1,1 while not rs.eof%> <% rs.movenext Wend rs.close set rs=nothing%>
"> <%=rs("typename")%>
Download
<% set rs=Server.CreateObject("adodb.recordset") sql="select top 1 id from download_type order by ordernumber asc,id asc" rs.open sql,conn,1,1 if rs.recordcount>0 then typeid=rs("id") end if rs.close set rs=nothing %> <%Const MaxPerPage=6 dim totalPut dim CurrentPage dim TotalPages dim j if Not isempty(Request("page")) then currentPage=Cint(Request("page")) else currentPage=1 end if if request.QueryString("id")="" then sql1="select * from download where type="&typeid else id=SafeRequest("id",1) sql2="select pass from download_type where id="&id set rs2=Server.CreateObject("adodb.recordset") rs2.open sql2,conn,1,1 if rs2("pass")<>"" then if Session("typepass")<>rs2("pass") then Response.Redirect "download_type_check.asp?id="&id else sql1="select * from download where type="&id end if else sql1="select * from download where type="&id end if rs2.close set rs2=nothing end if sql1=sql1&" order by orderid asc,id asc" set rs=server.createobject("adodb.recordset") rs.open sql1,conn,1,1 if err.number<>0 then response.write "no records!" end if if rs.eof or rs.bof then Response.Write "

no records!

" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showContent showpage totalput,MaxPerPage,"download.asp?keyword="&keyword&"&id="&id&"&" else if (currentPage-1)*MaxPerPage
<%=rs("filename")%>
<%=rs("nr")%>
<%if rs("pass")<>"" then%>">Click to download >><%else%>">Click to download >><%end if%>
<%End Sub Function showpage(totalnumber,maxperpage,filename) Dim n If totalnumber Mod maxperpage=0 Then n= totalnumber \ maxperpage Else n= totalnumber \ maxperpage+1 End If if n>1 then Response.Write "
" Response.Write "

" If CurrentPage<2 Then Response.Write " First  Prev  " Else Response.Write " First  " Response.Write " Prev  " End If If n-currentpage<1 Then Response.Write " Next  Last " Else Response.Write "" Response.Write " Next   Last " End If Response.Write " Page:"&CurrentPage&"/"&n&" " Response.Write " Total:"&totalnumber&" " Response.Write "Goto:" Response.Write " " end if End Function %>