<% dim founderr founderr=false if request.querystring("piccat_id")<>"" then if not isInteger(request.querystring("piccat_id")) then founderr=true Response.Write "" end if end if if request("page")<>"" then if not isInteger(request("page")) then founderr=true Response.Write "" end if end if if request("keyword")<>"" then if instr(request("keyword"),"'")>0 then founderr=true Response.Write "" end if end if dim totalpic,Currentpage,totalpages,i sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where look=1 order by pic_id DESC" if request.querystring("piccat_id")<>"" then sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where piccat_id="&request.querystring("piccat_id")&" order by pic_id DESC" elseif request("keyword")<>"" then sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where "&request("select")&" like '%"&request("keyword")&"%'order by pic_id DESC" end if set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 totalcs=rs.recordcount%> <% dim picperpage picperpage = 100 if not rs.eof then rs.movefirst rs.pagesize=picperpage if trim(request("page"))<>"" then currentpage=clng(request("page")) if currentpage>rs.pagecount then currentpage=rs.pagecount end if else currentpage=1 end if if currentpage<>1 then if (currentpage-1)*picperpage <% i=i+1 if i mod 100 = 0 then%> <% end if rs.movenext loop else if rs.eof and rs.bof then %> <%end if end if%>
<%if request("piccat_id")<> "" then%> 该分类暂时没有图片 <%elseif request("keyword")<>"" then%> 没有找到包含[<%=request("keyword")%>]的图片! <%else%> 没有任何图片,请管理员到后台添加! <%end if%>
<% rs.close set rs=nothing %>