<!-- #include file="../conn.asp" -->
<!-- #include file="../const.asp" -->
<%call chksunzom()
bx=requestA("bx")
bxs=split(bx,"|")
%> 
<html>
<head>
<title><%=dianming%> - 表项数据调用</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/sunzom.css" rel="stylesheet" type="text/css">

</HEAD>
<BODY>
<Script Language="JavaScript"> 
function getDay(v){ 
window.opener.document.<%=request.querystring("form")%>.<%=request.querystring("field")%>.value=v; 
window.close(); 
return false; 
} 
</Script> 
<%
'取得当前页码
currentpage=request("page")
'response.write currentpage
'response.end
if currentpage<1 or currentpage="" then
  currentpage="1"
end if

  sql="select * from "&bxs(0)&" order by id desc"  
 set rsxiao =server.createobject("ADODB.RecordSet")	
%><div align="center">
	<table cellpadding="4" cellspacing="1"  border="1" style="border-collapse: collapse" bordercolor="#808080" width="250">
<form name="form1" action="xx_del.asp">
  <input type="hidden" name="page" value="<%=currentpage%>">
  <tr align="center">    
	<td class="category">
	  ID</td>
	<td class="category">点击选择</td>
	<%if chkqx1(108,fla108)=1 then%>
    <%end if%>
  </tr>
  <%
    rsxiao.open sql,conn,1,3
  if not rsxiao.eof then
  rsxiao.pagesize=maxrecord
  rsxiao.absolutepage=currentpage
  for currentrec=1 to rsxiao.pagesize
    if rsxiao.eof then
      exit for
    end if
    mxid=rsxiao("id")
  %>
  <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''" >
	<td align="center"><%=mxid%></td>
	<td align="center" onclick="javascript:getDay('<%=rsxiao(""&bxs(1)&"")%>');" style="cursor:hand;"><%=rsxiao(""&bxs(1)&"")%></td>
  </tr>
  <%
  	'end if
    rsxiao.movenext
  next
  else
  %>
  <tr align="center" onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
    <td colspan="2" height="25" align="center" style="color:red"><b>没有找到记录</b></td>
  </tr>
  <%
  end if
  %>
    
  <%
  if rsxiao.recordcount>0 then 
  %> 
  <tr>
    <td colspan="2" height="30" class="category">
	<table cellpadding=0 cellspacing=0 width="100%">
	<tr>
	<td width="80%" align="right"><%=rsxiao.recordcount%>&nbsp;条信息&nbsp; 共&nbsp;<%=rsxiao.pagecount%>&nbsp;页&nbsp;
  <%
  nowstart=currentpage-3
  if nowstart<1 then
    nowstart=1
  end if
  nowend=currentpage+3
  if nowend>rsxiao.pagecount then
    nowend=rsxiao.pagecount
  end if
  response.write "&nbsp;<a href='?form="&request.querystring("form")&"&field="&request.querystring("field")&"&bx="&request.querystring("bx")&"&page=1' class='page'>最前页</a>&nbsp;"
  for ipage=nowstart to nowend
    if cstr(ipage)=cstr(currentpage) then
      response.write "&nbsp;<span style='font-weight:bold;color:#5858E6'>" & ipage &"</span>&nbsp;"
    else
      response.write "&nbsp;[&nbsp;<a href='?form="&request.querystring("form")&"&field="&request.querystring("field")&"&bx="&request.querystring("bx")&"&page="&ipage&"' class='page'>" & ipage &"</a>&nbsp;]&nbsp;"
    end if
  next
  response.write "&nbsp;<a href='?form="&request.querystring("form")&"&field="&request.querystring("field")&"&bx="&request.querystring("bx")&"&page="&rsxiao.pagecount&"' class='page'>最后页</a>&nbsp;"
%>
  </font>
  </td>
  </tr></table></td></tr>
<%end if%> 
</form>   
</table>
</div>
</body>
</html>