<!--#include file="top.asp"-->
<%if userflag23=0 then
response.redirect"ok.asp?action=flag"
end if%>
<%=citycss%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=citytitle%> - 用户公文包 - 图片选择</title>
<script language="javascript">
<!--
	function select(image1,i){
		var image2 = image1
		parent.document.addform['magicfacepic('+i+')'].value=image2;
		parent.lookmagic(i)
	}
//-->
</script>

</head>
<body style="margin:0;background:menu">
<%if request("action")="" then
response.write "<div align=center valign=middle style=""height:150px"">参数错误，请重新选择！</div>"
response.end
end if%>
<!--======-->
<table width="100%" border="0" cellspacing="0" cellpadding="5" align=center>
<tr>
<%sql="select * from dlxf_upfile where dlxf_yp_id="&session("id")&" and dlxf_sort=0 order by dlxf_id desc"
set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1                     
if rs.eof and rs.bof then                     
	response.write "<tr><td height=194 colspan=6 align=center>暂无内容。请从我的公文包上传内容！</td></tr>"
else  
'分页的实现 
listnum=8
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
n=0
do while not rs.eof and i<listnum
n=n+1%>
  <td align=center><img src=../<%=rs("dlxf_fileadd")%> width=80 height=80 alt="<%=rs("dlxf_filename")%>" style="border:1px #000000 solid;CURSOR: hand" onClick="select('<%=rs("dlxf_fileadd")%>',<%=request("action")%>)"></td>
<%if n mod 4=0 then response.write"</tr><tr>"
rs.movenext 
i=i+1 
j=j-1
loop
if listnum*page-rs.recordcount>4 then response.write "</tr><tr><td colspan=4 height=92></td>"
if listnum*page-rs.recordcount=4 then response.write "<td colspan=4 height=92></td>"
%>
</tr>
<%filename="my_picture_view.asp?action="&request("action")&""%>
<tr><td colspan=4 align=right>共 <%=Rs.pagecount%> 页 
      <% if page=1 then %>
      <%else%>
      <a href=<%=filename%>>|<<</a>
      <a href=<%=filename%>&page=<%=page-1%>><<</a>
      <a href=<%=filename%>&page=<%=page-1%>>[<%=page-1%>]</a>
<%end if%><% if Rs.pagecount=1 then %>
<%else%>[<%=page%>]
<%end if%>
	  <% if Rs.pagecount-page <> 0 then %>
      <a href=<%=filename%>&page=<%=page+1%>>[<%=page+1%>]</a>
      <a href=<%=filename%>&page=<%=page+1%>>>></a>
      <a href=<%=filename%>&page=<%=Rs.pagecount%>>>>|</a>
	  <%end if%></td>
<%end if%></tr>
</table>