<%
If PicClassID<>0 Then
Dim ChildID
sSql="Select ClassID,ClassName,ParentPath,Child From PictureClass Where ClassID="&PicClassID
oRs.Open sSql,oConn,1,1
If Not oRs.Eof Then
if oRs("ClassID")>0 then
if oRs("Child")>0 then
ChildID=""
set tClass=oConn.execute("select ClassID from PictureClass where ParentID=" & oRs("ClassID") & " or ParentPath like '" & oRs("ParentPath") & "," & oRs("ClassID") & ",%'")
do while not tClass.eof
if ChildID="" then
ChildID=tClass(0)
else
ChildID=ChildID & "," & tClass(0)
end if
tClass.movenext
loop
else
ChildID=PicClassID
end if
end if
End If
oRs.Close
sSql="Select * From PictureData Where P_PictureClassID in ("&ChildID&") And P_Recycle=False Order By pai,P_ID Desc"
Else
sSql="Select * From PictureData Where P_Recycle=False Order By pai,P_ID Desc"
End If
oRs.Open sSql,oConn,1,1
Dim PicNum
dim MaxPerPage
dim totalPut
dim CurrentPage
dim TotalPages
dim i
if int(PicClassID)=5 then
MaxPerPage=30
else
MaxPerPage=W_PicRecoNum
end if
if not ors.eof then
ors.MoveFirst
end if
ors.pagesize=MaxPerPage
If trim(Request("Page"))<>"" then
If IsNumeric(trim(Request("Page"))) = False Then
GoError "分頁參數錯誤,請不要試圖破壞此系統。"
End If
CurrentPage= CLng(request("Page"))
If CurrentPage> ors.PageCount then
CurrentPage = ors.PageCount
End If
Else
CurrentPage= 1
End If
totalPut=ors.recordcount
if CurrentPage<>1 then
if (currentPage-1)*MaxPerPage
<%
k=currentPage
if k<>1 then
response.write ""
else
Response.Write ""
end if
if ors.PageCount>1 then
for p=1 to ors.PageCount
if p=k then
response.write ""&p&""
else
response.write ""&p&""
end if
next
end if
if k<>n then
response.write ""
else
Response.Write ""
end if
%>
|
<%
Do While Not oRs.Eof and i"
For PicNum =0 to 1
hh=len(ors("P_PictureAddTime"))
P_PictureAddTime=left(ors("P_PictureAddTime"),hh-8)
%>
<%if int(PicClassID)=5 then%>
<%else%>
<%end if%>
|
<%
oRs.MoveNext
i=i+1
If oRs.Eof then
If PicNum = 0 Then
Response.Write " | "
End if
Exit For
End If
Next
Response.Write ""
Loop
%>
|
|