这分页的代码错在哪呢?弄了一天还是不知道啥原因!请高手帮个忙!~~先谢谢了~
<!-- #include file="conn.asp" --><%
set rs_config=conn.execute("select * from config")
biaoji=rs_config("biaoji")
%>
<%
set rs_htyj=conn.execute("select * from htyj where htbh='"+request.querystring("htbh")+"'")
rs_htyj.open sql_htyj,conn,1,1
set rs_htsx=conn.execute("select * from htsx where htbh='"+request.querystring("htbh")+"'")
rs_htsx.open sql_htsx,conn,1,1
set rs_fkmx=conn.execute("select * from fkmx where htbh='"+request.querystring("htbh")+"'")
rs_fkmx.open sql_c,conn,1,1
rs_fkmx.pagesize=10
if request("p_fkmx")<>"" then
ep_fkmx=cint(request("p_fkmx"))
if ep_fkmx<1 then ep_fkmx=1
if ep_fkmx>rs_fkmx.pagecount then ep_fkmx=rs_fkmx.pagecount
else
ep_fkmx=1
end if
rs_fkmx.absolutepage=ep_fkmx
%>
<%
bm = session("bm")
username = session("username")
password = session("password")
set rs = server.createobject("adodb.recordset")
sql ="select * from user where bm='"&bm&"' and username='"&username&"' and password='"&password&"'"
rs.open sql,conn,1,1
if rs.eof then '如果没有数据
call close_rs '关闭表
call close_conn '关闭数据库
response.redirect "../error.asp"
response.end
else
end if
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
td { font-size: 10pt; line-height: 12pt}
a:link {color: #0080FF; text-decoration: none }
a:visited {color: #0080FF; text-decoration: none }
a:hover {color: #ee9c00; text-decoration: underline }
.style1 {color: #000000}
</style>
</head>
<body topmargin="15">
<center>
<div style="width:756px;height:120px;border:1px solid #000000;">
<table width="99%" border="0" align="center" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" class="12">
<form name="form1" method="post" action="save.asp" enctype="multipart/form-data" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
<tr bgcolor="#666666">
<td height="25" colspan="2"><div align="center">
<strong><font color="#FFFFFF">添 加 合 同 原 件 (</font><font color="#FF0000">*</font><font color="#FFFFFF">为必填项)</font></strong></div></td>
</tr>
<tr bgcolor="#f1f3f5">
<td width="20%" height="20" align="right">合同编号+合同相对方:</td>
<td width="50%" align="left"><input name="myname" type="text" value="<%=request.querystring("htbh")%>_<%=request.querystring("gys")%>" readonly="readonly" class="input" id="myname" size="40">
页码标记:
<input name="ym" type="text" id="ym" size="2">
<font color="#FF0000">*</font>两位页码<input name="htbh" type="hidden" id="htbh" value="<%=request.querystring("htbh")%>" size=""><input name="gys" type="hidden" id="gys" value="<%=request.querystring("gys")%>" size=""></td>
</tr>
<tr bgcolor="#f1f3f5">
<td width="20%" height="20" align="right">扫描件上传:</td>
<td align="left"><input name="file0" type="file" class="input" id="file0" size="40">
<font color="#FF0000">*</font> <input type="button" name="Submit22" value="预览" style="width=70;height=20;font-size=12" onClick="view0()">
<font color="#3333FF"><br>(上传产品放<strong>小</strong>图,建议<font color="#FF0000">120*120px</font>)</br></font>
</td></tr>
<tr bgcolor="#f1f3f5">
<td height="20" align="right">扫描件说明:
</td>
<td height="20" align="left"><input name="shuoming" type="text" id="shuoming" size="70"></td>
</tr>
<tr bgcolor="#f1f3f5">
<td height="26" colspan="2"><div align="center">
<input name="filepath" type="hidden" value="pic">
<input name="Submit" type="submit" class="button" value="确 定 提 交" style="width=130px;height=30px;font-size=12px">
</div></td>
</tr>
</form>
</table>
</div>
<div style="width:756px;height:1086px;border:1px solid #000000;margin-top:10px">
<table width=99% border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table border="0" width="90%" cellpadding="0" style="border-collapse: collapse; border: 1px dotted #A4A4FF" bordercolor="#111111" cellspacing="0">
<!--DWLayoutTable-->
<form action="ht_sx_do.asp" method="post" name="ht_sx">
<tr>
<td height="28" colspan="12" align="center" type="text"><%=biaoji%></td>
</tr>
<tr>
<td colspan="12" align="center" type="text">合同摘要记录封面</td>
</tr>
<tr>
<td height="28" colspan="8" align="left" type="text">供 应 商:<%=rs_htsx("gys")%></td>
<td width="1%" align="left" type="text" ><!--DWLayoutEmptyCell--> </td>
<td colspan="3" align="left" type="text">分类性质:<%=rs_htsx("flxz")%> </td>
</tr>
<tr>
<td height="28" colspan="8" align="left" type="text">合同内容:<%=rs_htsx("htnr")%> </td>
<td align="left" type="text" ><!--DWLayoutEmptyCell--> </td>
<td colspan="3" align="left" type="text">合同编号:<%=rs_htsx("htbh")%></td>
</tr>
<tr>
<td colspan="7" align="left" type="text" ><!--DWLayoutEmptyCell--> </td>
<td colspan="2" rowspan="2" align="right" type="text">合同金额:</td>
<td height="25" colspan="3" align="left" type="text">合同价:<%=rs_htsx("htj")%></td>
</tr>
<tr>
<td colspan="7" align="left" type="text">付款期限及条件:</td>
<td height="28" colspan="3" align="left" type="text">结算价:<%=rs_htsx("jsj")%> </td>
</tr>
<tr>
<td width="5%" align="center" type="text" >序号</td>
<td colspan="9" align="center" type="text">期限及条件</td>
<td width="1%" align="left" type="text" ><!--DWLayoutEmptyCell--> </td>
<td width="15%" align="center" type="text" >金额</td>
</tr>
<tr>
<td height="28"align="right" type="text" >1、</td>
<td colspan="9" align="left" valign="bottom" type="text"word-break="break-all"><%=rs_htsx("fkje01")%></td>
<td align="left" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je01")%></td>
</tr>
<tr>
<td height="28" align="right" type="text" >2、</td>
<td colspan="9" align="left" valign="bottom" type="text"><%=rs_htsx("fkje02")%></td>
<td align="right" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je02")%></td>
</tr>
<tr>
<td height="28" align="right" type="text" >3、</td>
<td colspan="9" align="left" valign="bottom" type="text"><%=rs_htsx("fkje03")%></td>
<td align="left" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je03")%></td>
</tr>
<tr>
<td height="28" align="right" type="text" >4、</td>
<td colspan="9" align="left" valign="bottom" type="text"><%=rs_htsx("fkje04")%></td>
<td align="left" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je04")%></td>
</tr>
<tr>
<td height="28" align="right" type="text" >5、</td>
<td colspan="9" align="left" valign="bottom" type="text"><%=rs_htsx("fkje05")%> </td>
<td align="right" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je05")%></td>
</tr>
<tr>
<td height="28" align="right"type="text" >6、</td>
<td colspan="9" align="left" valign="bottom" type="text"><%=rs_htsx("fkje06")%></td>
<td align="right"type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je06")%></td>
</tr>
<tr>
<td height="28" align="right" type="text" >7、</td>
<td colspan="9" align="left" valign="bottom" type="text"><%=rs_htsx("fkje07")%></td>
<td align="right" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je07")%></td>
</tr>
<tr>
<td height="28" align="right" type="text" >8、</td>
<td colspan="9" align="left" valign="bottom" type="text"><%=rs_htsx("fkje08")%></td>
<td align="right" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" type="text" ><%=rs_htsx("jx_je08")%></td>
</tr>
</form>
</table> </td>
</tr>
<tr>
<td align="center">
<table border="0" width="90%" table frame="below" cellpadding="0" style="border-collapse: collapse; border: 1px dotted #A4A4FF" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="19" colspan="4"align="left" type="text" >付款明细</td>
<td height="19" colspan="9"align="right" type="text" ><!--DWLayoutEmptyCell--> </td>
<tr>
<td width="40" height="28"align="center" type="text" >序号</td>
<td width="7" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="81" align="center" type="text">付款日期</td>
<td width="8" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="80" align="center" type="text">凭证编号</td>
<td width="8" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="78" align="center" type="text">对应科目</td>
<td width="7" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="95" align="center" type="text">付款金额</td>
<td width="8" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="104" align="center" type="text">尚欠金额</td>
<td width="10" align="center" type="text"><!--DWLayoutEmptyCell--> </td>
<td width="143" align="center" type="text">发票情况</td>
</tr>
<%
for i=0 to rs_fkmx.pagesize-1
if rs_fkmx.bof or rs_fkmx.eof then exit for
%>
<tr>
<td height="28"align="center" valign="bottom" type="text" ><!--DWLayoutEmptyCell--> </td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="center" valign="bottom" type="text" ><%=rs_fkmx("fkrq")%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="center" valign="bottom" type="text"><%=rs_fkmx("pzbh")%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="center" valign="bottom" type="text"><%=rs_fkmx("dykm")%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="right" valign="bottom" type="text"><%=formatnumber(rs_fkmx("fkje"),2,-1,0,-1)%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="right" valign="bottom" type="text"><%=formatnumber(rs_fkmx("sqje"),2,-1,0,-1)%></td>
<td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell--> </td>
<td align="center" valign="bottom" type="text"><%=rs_fkmx("fpqk")%></td>
</tr>
<%
rs_fkmx.movenext()
next
%>
<tr>
<td height="25" colspan="13"align="center" valign="bottom" type="text" >
<p align="center">
<a href="ht_mx.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&p_fkmx=<%=ep_fkmx-1%>">前一页</a>
<a href="ht_mx.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&p_fkmx=<%=ep_fkmx+1%>">后一页</a>
</p>
<p align="center">现在是第<%=ep_fkmx%>页一共有<%=rs_fkmx.pagecount%>页</p>
</tr>
<%
conn.close()
%>
</table>
</td>
</tr>
</table>
</div>
</center>
</body>
</html>