<%@language=vbscript codepage=936 %> <% dim strFileName const MaxPerPage=20 dim totalPut,CurrentPage,TotalPages dim i,j dim ArticleID dim Title dim sql,rs dim BigClassName,SmallClassName,SpecialName dim PurviewChecked dim strAdmin,arrAdmin PurviewChecked=false Title=Trim(request("Title")) ArticleID=Request("ArticleID") BigClassName=Trim(request("BigClassName")) SmallClassName=Trim(request("SmallClassName")) SpecialName=trim(request("SpecialName")) strFileName="picManage.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "&SpecialName=" & SpecialName if request("page")<>"" then currentPage=cint(request("page")) else currentPage=1 end if sql="select * from pic where ArticleID>0" if session("purview")>4 then sql=sql & " and Editor='" & Session("admin") & "' and Passed=false" end if if Title<>"" then sql=sql & " and title like '%" & Title & "%' " end if if BigClassName<>"" then sql=sql & " and BigClassName='" & BigClassName & "' " if SmallClassName<>"" then sql=sql & " and SmallClassName='" & SmallClassName & "' " end if else if SpecialName<>"" then sql=sql & " and SpecialName='" & SpecialName & "' " end if end if sql=sql & " order by articleid desc" Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 %>
  刷新  添加
<% if BigClassName<>"" then set rsbignew=server.createobject("adodb.recordset") sql2 = "select * from BigClasspic where BigClassID="&cint(BigClassName) rsbignew.open sql2,conn,1,1 sqlSmallClass="select * from SmallPic where BigClassName='" &rsbignew("BigClassID")& "'" Set rsSmallClass= Server.CreateObject("ADODB.Recordset") rsSmallClass.open sqlSmallClass,conn,1,1 if not (rsSmallClass.bof and rsSmallClass.eof) then response.write "" end if rsSmallClass.close set rsSmallClass=nothing end if %>
<% dim sqlBigClass,sqlSmallClass,rsBigClass,rsSmallClass,sqlSpecial,rsSpecial sqlBigClass="select * from BigClasspic" Set rsBigClass= Server.CreateObject("ADODB.Recordset") rsBigClass.open sqlBigClass,conn,1,1 if rsBigClass.eof then response.Write("还没有任何栏目,请首先添加栏目。") end if do while not rsBigClass.eof if rsBigClass("BigClassName")=BigClassName then response.Write("" & rsBigClass("BigClassName") & " | ") if session("purview")=3 then strAdmin=rsBigClass("Admin") if Instr(strAdmin,"|")>0 then arrAdmin=split(strAdmin) for i=0 to ubound(arrAdmin) if trim(arrAdmin(i))=session("admin") then PurviewChecked=True exit for end if next else if trim(strAdmin)=session("Admin") then PurviewChecked=True end if end if end if else response.Write("" & rsBigClass("BigClassName") & " | ") end if rsBigClass.movenext loop rsBigClass.close set rsBigClass=nothing %>
" do while not rsSmallClass.eof if rsSmallClass("SmallClassID")=cint(SmallClassName) then response.Write(" " & rsSmallClass("SmallClassName") & "  ") if session("purview")=4 then strAdmin=rsSmallClass("Admin") if Instr(strAdmin,"|")>0 then arrAdmin=split(strAdmin) for i=0 to ubound(arrAdmin) if trim(arrAdmin(i))=session("admin") then PurviewChecked=True exit for end if next else if trim(strAdmin)=session("Admin") then PurviewChecked=True end if end if end if else response.Write(" " & rsSmallClass("SmallClassName") & "  ") end if rsSmallClass.movenext loop response.write "
 所有   <% if rs.eof and rs.bof then response.write "共找到 0 个
" 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 response.Write "共找到 " & totalPut & " 个 " %> <% if currentPage=1 then showContent showpage strFileName,totalput,MaxPerPage,true,false,"个 " else if (currentPage-1)*MaxPerPage <% sub showContent dim i i=0 %> <%do while not rs.eof%> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %>
选中 标题 窗口片 排序 推荐 加入时间 操 作
<%=rs("title")%> <%if rs("DefaultPicUrl")<>"" then%> " target="_blank">" height="80" border="0"> <%else response.Write("无") end if%> <%=rs("num")%> <%if rs("Passed")<>0 then%>推荐<%else%>- -<%end if%> <%=rs("UpdateTime")%> ">修改 &Action=Del" onClick="return ConfirmDel();">删除
选中本页显示的所有 =3 and session("purview")<=4 and PurviewChecked=False then response.write "disabled"%>>
<% end sub %>
查找 :   请输入标题。如果为空,则查找所有 。
<% rs.close set rs=nothing call CloseConn() %>