Home
<% Dim con,rs,tc1,tc2 Dim currentPage,i,rowCount currentPage=Trim(request("currentPage")) If currentPage="" Then currentPage=1 End If dim data_path data_path = server.mappath("../data") &"\repository.mdb" Set con = Server.CreateObject("ADODB.Connection") con.ConnectionString="Provider=Microsoft.Jet.Oledb.4.0;Data Source='"& data_path &"'" con.open Set rs= Server.CreateObject("ADODB.Recordset") Set rs1= Server.CreateObject("ADODB.Recordset") rs.CursorLocation = adUseClient rs.CursorType=adOpenStatic rs1.CursorLocation = adUseClient rs1.CursorType=adOpenStatic bgcolor1="#FFDDBB" bgcolor2="#660000" tc1="#ffffff" tc2="#000000" If Request.item("txtSearch")="" Then rs.Open "select * from papers ",con rs1.Open "select count(*) from papers ",con Else rs.Open "select * from papers where title like '%"& Request.Item("txtSearch") &"%' ",con rs1.Open "select count(*) from papers where title like '%"& Request.Item("txtSearch") &"%' ",con 'rs.Open "select * from papers ",con End If If not rs.EOF Then rs.Pagesize=5 rs.Absolutepage = cINT(currentPage) rowCount=0 %> <% If Request.item("txtSearch")<>"" Then %> <% End If %> <% while not rs.EOF and rowCount > <% rowCount=rowCount+1 rs.Movenext Wend %>
Page  <%= currentPage %>  of  <%=rs.Pagecount%> 
Results <%=rs1.Fields(0)%> match(s) found for <%= Request.item("txtSearch") %>
Author Title Date Subject
 
<%= rs.Fields(1)%> <%= rs.Fields(2)%> <%= rs.Fields(3)%> <%= rs.Fields(4)%>
<% IF cINT(currentPage)=rs.Pagecount and rs.Pagecount>1 Then%>
Home    | &drpHead=<%= Request.item("drpHead")%>" class="my1" onmouseover="window.status='title Home';return true" onmouseout="window.status='title Home';return true">Previous
<% ElseIf cINT(currentPage)=1 and rs.Pagecount>1 Then%>
Home    | &drpHead=<%= Request.item("drpHead")%>" class="my1" onmouseover="window.status='title Home';return true" onmouseout="window.status='title Home';return true">Next
<% ElseIf cINT(currentPage)=1 and cINT(currentPage)=rs.Pagecount Then%>
Home
<% Else%>
Home    | &drpHead=<%= Request.item("drpHead")%>" class="my1" onmouseover="window.status='title Home';return true" onmouseout="window.status='title Home';return true">Previous    | &drpHead=<%= Request.item("drpHead")%>" class="my1" onmouseover="window.status='title Home';return true" onmouseout="window.status='title Home';return true">Next
<% End If Else %>
Sorry, No Match Found For Your Request click here
<% End If %>