<%
Dim sqlTemp
IF Request.QueryString("action") <> "more" Then
sqlTemp = " TOP 14 "
end if
SQL = "SELECT " & sqlTemp & " * FROM [Product1_Kind] WHERE KindID = " & RS("ID") & " ORDER BY ID DESC,ID ASC"
SubRS.Open SQL,Connstr,1,1
Do While Not SubRS.EOF
%>
<%
Dim intStart
Dim intPageSize,intPageCount,intCurrentPage,intRecordTotal
intPageCount = 0
intCurrentPage = 0
SQL = "SELECT * FROM [News] WHERE KindID = " & ID & " ORDER By ID DESC"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,1,1
If Not RS.EOF Then
intPageSize = 28
intCurrentPage = getPageID(Request.QueryString("pageid"))
intRecordTotal = RS.RecordCount
intPageCount = getPageCount(intRecordTotal / intPageSize)
If intCurrentPage > intPageCount Then intCurrentPage = intPageCount
intStart = intPageSize * (intCurrentPage - 1)
RS.Move(intStart)
I = 1
Do While Not RS.EOF And Not I > intPageSize
%>
<%
I = I + 1
RS.MoveNext
Loop
End If
RS.Close()
Set RS = Nothing
%>