<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%call ling()
Call Head%>
<%
dim sql,rs1,sql1,id,lid,idd
id=request.QueryString("id")
if id="" or IsNumeric(id)=False then
if saytk>1 then
  Call Error("<title>出错</title></head><body><body bgcolor="""&yanse1&"""><p>ID无效！")
else
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
end if
lid=request.QueryString("lid")
if lid="" or IsNumeric(lid)=False then
if saytk>1 then
  Call Error("<title>出错</title></head><body><body bgcolor="""&yanse1&"""><p>ID无效！")
else
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="Select * from wjfile where ID="&id
rs.open sql,conn,1,3
if rs.eof then
  rs.close
  set rs=Nothing
if saytk>1 then
  Call Error("<title>出错</title></head><body><body bgcolor="""&yanse1&"""><p>ID无效！")
else
  Call Error("<card title=""ID无效""><p>ID无效！")
  end if
end if
dim Counts
Counts=rs("filepin")
call saycardd("预览图片")
If Not rs.eof	Then
rs("hit")=rs("hit")+1
rs.update()
end if
Response.Write	""&ubb(rs("name"))&"<br/>"
Response.Write	"日期:"&ubb(fordate(rs("times")))&"<br/>"
Response.Write	"人气:"&ubb(rs("hit"))&"<br/>"
set Rs=Server.CreateObject("ADODB.Recordset")
Sql="select * from [uppic] where lid="&id&""
rs.open Sql,conn,1,1
If Not rs.eof	Then
Dim PageSize,i
	PageSize=picviewnum				
	Dim Count,page,pagecount,gopage,act	
	gopage="picview.asp?id="&id&"&amp;lid="&lid&"&amp;idd="&idd&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs.recordcount
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1    
	pagecount=(count+pagesize-1)\pagesize
        if page>pagecount then page=pagecount	
	rs.move(pagesize*(page-1))
        response.write ("共:"&count&"张图片<br/>")
	For i=1 To PageSize       						
	If rs.eof Then Exit For	
			
Response.write "<img src="""&rs("picurl")&""" alt='pic'/><br/>" 

Response.write "格式:"&format&"大小:"&rs("YD_size")&"KB<br/>"

	rs.moveNext 								
	Next	
	if page-pagecount<0 then response.write "<br/><a href="""&gopage&"page="&page+1&""">下页-</a><a href="""&gopage&"page="&pagecount&""">尾页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页-</a><a href="""&gopage&"page=1"">首页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页"
if saytk=1 then
response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">[GO]</a><br/>"
end if
Else
Response.write "无此图片！<br/>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<%if lid<>"" then%>
<a href='piclist.asp?lid=<%=lid%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>'>[返回上级]</a><br/>
<%end if%>
<a href='picdl.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>[图片类别]</a><br/>
<a href="../index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[后台管理]</a>
<%response.write""
call head3()%>