BOF 或 EOF 中有一个是“真”,
错误类型:ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/User/Company/consult.asp
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
网页:
GET /User/Company/consult.asp
以下是代码
<!--#include file="../../Conn.asp"-->
<!--#include file="Session.asp"-->
<!--#include file="../../Inc/CheckAll.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../Style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
action=request("action")
if action="" then
call main()
elseif action="looks" then
call looks()
elseif action="feihu" then
call feihu()
elseif action="savafeihu" then
call savafeihu()
elseif action="del" then
call del()
elseif action="delmove" then
call delmove()
elseif action="search" then
call search()
end if
sub main()
%>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#B35A33" bgcolor="#FCE7D6">
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td align="center" bgcolor="#FF6E0D" class="texts">查看用户订单</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#E0E0E0">
<td colspan="6"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<form action="?action=search" method="post" name="forms">
<tr>
<td width="20%" align="right">请输入要搜索的关键字:</td>
<td width="45%"><input name="keyword" type="text" size="65"></td>
<td width="20%" align="center"><select name="selecttypes">
<option value="">请选择搜索类别</option>
<option value="发送人姓名">发送人姓名</option>
<option value="留言类别">留言类别</option>
<option value="是否回复">是否回复</option>
<option value="发送时间">发送时间</option>
</select></td>
<td width="15%"><input type="submit" name="souso" value="我要搜索"></td>
</tr>
</form>
</table></td>
</tr>
<form action="?action=delmove" name="theForm" method="post">
<tr bgcolor="#E0E0E0">
<td width="30%"><B>发送人姓名</B></td>
<td width="20%"><B>在线订购</B></td>
<td width="15%" align="center"><b>是否回复</b></td>
<td width="15%" align="center"><B>发送时间</B></td>
<td width="15%" align="center"><B>操作</B></td>
<td width="5%" align="center"><B>选择</B></td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(udel='还未删除')order by id desc"
rs.open sql,conn,1,1
rs.pagesize=20
totalPut=rs.recordcount
totalPage=rs.pagecount
MaxPerPage=rs.pagesize
currentpage=request("page")
if isempty(currentpage) or cint(currentpage)<1 or cint(currentpage)>totalPage then
currentpage=1
end if
if rs.EOF and rs.BOF then
Response.Write "对不起,当前没有内容!!!"
else
rs.absolutepage=currentpage
loopno=MaxPerPage
i=0
do while not rs.eof and loopno>0
%>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td width="30%"><%=rs("usernames")%></td>
<td width="20%"><%=rs("types")%></td>
<td width="15%" align="center"><%=rs("reply_no")%></td>
<td width="15%" align="center"><%=rs("times")%></td>
<td width="15%" align="center"><a href="?action=looks&id=<%=rs("id")%>">查看</a>|<a href="?action=feihu&id=<%=rs("id")%>">回复</a>|<a href="?action=del&id=<%=rs("id")%>">删除</a></td>
<td width="5%" align="center"><input name="box3" type="checkbox" id="box3" value="<%=rs("id")%>"></td>
</tr>
<%
rs.movenext
loopno=loopno-1
i=i+1
loop
end if
%>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td height="25" colspan="6" align="center">操作:删除
<input name="rad" type="radio" value="1" checked> 全部选定
<INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>
<INPUT onClick="{if(confirm('确定执行选择的操作吗?')){return true;}return false;}" type=submit value=执行选定的操作 name=submit></td>
</tr>
</form>
</table>
<!--#include file="../../Inc/Manager_Pages.asp"--></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<%
end sub
sub looks()
set rs=server.createobject("adodb.recordset")
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(types='商业机会')and(id="& request("id") &")"
rs.open sql,conn,1,1
%>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#B35A33" bgcolor="#FCE7D6">
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td align="center" bgcolor="#FF6E0D" class="texts">查看商业机会</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td width="12%" align="right">发送人:</td>
<td width="88%"><%=rs("usernames")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">联系电话:</td>
<td><%=rs("tels")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">联系地址:</td>
<td><%=rs("address")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">主题:</td>
<td><%=rs("titles")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">主要内容:</td>
<td><%=rs("contents")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">发送时间:</td>
<td><%=rs("times")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">是否回复:</td>
<td><%=rs("reply_no")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">回复内容:</td>
<td><%=rs("reply")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right">回复时间:</td>
<td><%=rs("replytimes")%></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right"> </td>
<td>『<a href="?action=feihu&id=<%=rs("id")%>">回复</a><a href="?"></a>』『<a href="?">返回</a>』『<a href="?action=del&id=<%=rs("id")%>">删除</a><a href="?"></a>』</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<%
end sub
sub feihu()
set rs=server.createobject("adodb.recordset")
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(types='商业机会')and(id="& request("id") &")"
rs.open sql,conn,1,1
%>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#B35A33" bgcolor="#FCE7D6">
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td align="center" bgcolor="#FF6E0D" class="texts">回复咨询</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
<form action="?action=savafeihu" method="post" name="theForm" onSubmit="return Validator.Validate(this,3)">
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td width="12%" align="right">回复咨询:</td>
<td width="88%"><input name="id" type="hidden" value="<%=rs("id")%>"><textarea name="reply" cols="60" rows="12" dataType="LimitB" min="1" max="2000" msg="回复咨询不能为空,并且不能大于2000个有效字符"><%=UHTMLEncode(rs("reply"))%></textarea></td>
</tr>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td align="right"> </td>
<td><input type="submit" name="Submit" value=" 回复 "></td>
</tr>
</form>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<%
end sub
sub savafeihu
set rs=server.createobject("adodb.recordset")
sql= "select * from message where id="&request("id")
rs.open sql,conn,1,3
rs("reply")=HTMLEncode(request.form("reply"))
rs("replytimes")=Now()
rs("reply_no")="已经回复"
rs.update
response.write "<script language=javascript>alert('回复成功!');window.location.href='?';</script>"
end sub
sub del()
set rs=server.createobject("adodb.recordset")
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(id="& request("id") &")"
rs.open sql,conn,1,3
rs("udel")="已经删除"
rs.update
response.write "<script language=javascript>alert('此条记录已成功删除!');window.location.href='?';</script>"
end sub
sub delmove()
set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from message where id in ("&Replace(Request("box3"),"'","")&")"
rs.open sql,conn,1,3
do while not rs.eof
rs("udel")="已经删除"
rs.update
rs.movenext
Loop
response.write "<script language='javascript'>alert('所有选中记录已成功删除!');window.location.href='?';</script>"
end sub
sub search()
if(request.form("keyword")="")or(request.form("selecttypes")="")then
response.write "<script language=javascript>alert('对不起,请输入您要查询的关键字和选择搜索类别!');window.location.href='?';</script>"
response.end
end if
selecttypes=request.form("selecttypes")
%>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#B35A33" bgcolor="#FCE7D6">
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td align="center" bgcolor="#FF6E0D" class="texts">查看用户订单</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#E0E0E0">
<td colspan="6"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<form action="?action=search" method="post" name="forms">
<tr>
<td width="20%" align="right">请输入要搜索的关键字:</td>
<td width="45%"><input name="keyword" type="text" size="65"></td>
<td width="20%" align="center"><select name="selecttypes">
<option value="">请选择搜索类别</option>
<option value="发送人姓名">发送人姓名</option>
<option value="留言类别">留言类别</option>
<option value="是否回复">是否回复</option>
<option value="发送时间">发送时间</option>
</select></td>
<td width="15%"><input type="submit" name="souso" value="我要搜索"></td>
</tr>
</form>
</table></td>
</tr>
<form action="?action=delmove" name="theForm" method="post">
<tr bgcolor="#E0E0E0">
<td width="30%"><B>发送人姓名</B></td>
<td width="20%"><B>在线订单</B></td>
<td width="15%" align="center"><b>是否回复</b></td>
<td width="15%" align="center"><B>发送时间</B></td>
<td width="15%" align="center"><B>操作</B></td>
<td width="5%" align="center"><B>选择</B></td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
if selecttypes="发送人姓名" then
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(udel='还未删除')and([usernames] like '%" & request.form("keyword") & "%')order by id desc"
elseif selecttypes="留言类别" then
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(udel='还未删除')and(types like '%" & request.form("keyword") & "%')order by id desc"
elseif selecttypes="是否回复" then
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(udel='还未删除')and(reply_no like '%" & request.form("keyword") & "%')order by id desc"
elseif selecttypes="发送时间" then
sql= "select * from message where(user_names='"&session("company_user_names")&"')and(udel='还未删除')and(times like '%" & request.form("keyword") & "%')order by id desc"
end if
rs.open sql,conn,1,1
if rs.EOF and rs.BOF then
Response.Write "对不起,当前没有内容!!!"
else
do while not rs.eof
%>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td width="30%"><%=rs("usernames")%></td>
<td width="20%"><%=rs("types")%></td>
<td width="15%" align="center"><%=rs("reply_no")%></td>
<td width="15%" align="center"><%=rs("times")%></td>
<td width="15%" align="center"><a href="?action=looks&id=<%=rs("id")%>">查看</a>|<a href="?action=feihu&id=<%=rs("id")%>">回复</a>|<a href="?action=del&id=<%=rs("id")%>">删除</a></td>
<td width="5%" align="center"><input name="box3" type="checkbox" id="box3" value="<%=rs("id")%>"></td>
</tr>
<%
rs.movenext
loop
end if
%>
<tr onMouseOver="javascript:this.bgColor='#F0F0F0'"onmouseout="javascript:this.bgColor='#FFFFFF'"; bgColor="#FFFFFF">
<td height="25" colspan="6" align="center">操作:删除
<input name="rad" type="radio" value="1" checked> 全部选定
<INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>
<INPUT onClick="{if(confirm('确定执行选择的操作吗?')){return true;}return false;}" type=submit value=执行选定的操作 name=submit></td>
</tr>
</form>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<%
end sub
%>
</body>
</html>