%@LANGUAGE="VBSCRIPT"%> <% strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("articles/elinarticles.mdb") set conn = server.createobject("adodb.connection") conn.open strconn %> <% Set Rs1 = Server.CreateObject("ADODB.Recordset") rs1.CursorLocation = 2 rs1.LockType = 3 rs1.open "SELECT * FROM article where secondId= 4" + " ORDER BY time DESC" ,conn %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 6 Repeat1__index = 0 Rs1_numRows = Rs1_numRows + Repeat1__numRows %> <% Set Rs2 = Server.CreateObject("ADODB.Recordset") rs2.CursorLocation = 2 rs2.LockType = 3 rs2.open "SELECT * FROM article where secondId= 11" ,conn %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = 6 Repeat2__index = 0 Rs2_numRows = Rs2_numRows + Repeat1__numRows %> <% Set Rs3 = Server.CreateObject("ADODB.Recordset") rs3.CursorLocation = 2 rs3.LockType = 3 rs3.open "SELECT * FROM article where secondId= 13" ,conn %> <% Dim Repeat3__numRows Dim Repeat3__index Repeat3__numRows = 6 Repeat3__index = 0 Rs3_numRows = Rs3_numRows + Repeat3__numRows %> <% Set Rs4 = Server.CreateObject("ADODB.Recordset") rs4.CursorLocation = 2 rs4.LockType = 3 rs4.open "SELECT * FROM article where secondId= 6" ,conn %> <% Dim Repeat4__numRows Dim Repeat4__index Repeat4__numRows = 6 Repeat4__index = 0 Rs4_numRows = Rs4_numRows + Repeat4__numRows %> <% Set Rs5 = Server.CreateObject("ADODB.Recordset") rs5.CursorLocation = 2 rs5.LockType = 3 rs5.open "SELECT * FROM article where secondId= 2" ,conn %> <% Dim Repeat5__numRows Dim Repeat5__index Repeat5__numRows = 6 Repeat5__index = 0 Rs5_numRows = Rs5_numRows + Repeat5__numRows %> <% Dim Repeat6__numRows Dim Repeat6__index Repeat6__numRows = 5 Repeat6__index = 5 Rs5_numRows = Rs5_numRows + Repeat6__numRows %> <% Set Rs6 = Server.CreateObject("ADODB.Recordset") rs6.CursorLocation = 2 rs6.LockType = 3 rs6.open "SELECT * FROM article where secondId= 9" ,conn %> <% Dim Repeat7__numRows Dim Repeat7__index Repeat7__numRows = 6 Repeat7__index = 0 Rs6_numRows = Rs6_numRows + Repeat7__numRows %> <% Set Rs7 = Server.CreateObject("ADODB.Recordset") rs7.CursorLocation = 2 rs7.LockType = 3 rs7.open "SELECT * FROM article where secondId= 19" ,conn %> <% Dim Repeat8__numRows Dim Repeat8__index Repeat8__numRows = 5 Repeat8__index = 0 Rs7_numRows = Rs7_numRows + Repeat8__numRows %> <% Set Rs8 = Server.CreateObject("ADODB.Recordset") rs8.CursorLocation = 2 rs8.LockType = 3 rs8.open "SELECT * FROM article where secondId= 1" ,conn %> <% Dim Repeat9__numRows Dim Repeat9__index Repeat9__numRows = 5 Repeat9__index = 0 Rs9_numRows = Rs9_numRows + Repeat9__numRows %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters Dim MM_keepNone Dim MM_keepURL Dim MM_keepForm Dim MM_keepBoth Dim MM_removeList Dim MM_item Dim MM_nextItem ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" End If MM_keepURL="" MM_keepForm="" MM_keepBoth="" MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each MM_item In Request.QueryString MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item)) End If Next ' add the Form variables to the MM_keepForm string For Each MM_item In Request.Form MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm If (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) End If If (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) End If If (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) End If ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>
| ||||||||||||||||||||||||||
|
版权所有:广东省罗定市中等职业技术学校 |