设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 63|回复: 1
打印 上一主题 下一主题

这问题怎么解决啊

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-17 09:17:12 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
错误类型:
(0x80020009)
发生意外。
/ebuy/admin/editorder.asp, 第 142 行





源代码:第142行已经标记出来了
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if session("rank")=3 then
response.Write "<div align=center><font size=5 color=red><b>你的权限不够!</b></font></div>"
response.End
end if
end if
%>
<title>订单管理</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkk()
{
if(checkspace(document.form2.searchkey.value)) {
document.form2.searchkey.focus();
alert("请输入查询关键字!");
return false;
}
document.form2.submit();
}
//-->
</script>
<%dim state,namekey
namekey=trim(request.form("namekey"))
state=trim(request.form("state"))
if state="" then state=request.QueryString("state")
if namekey="" then namekey=request.querystring("namekey")
%>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6699cc">
<tr>
<td align="center"><font color="#FFFFFF">管理商品订单</font></td>
</tr>
<tr>
<td height="167" valign="top" bgcolor="#FFFFFF"> <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td align="right">
<select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right>
<option value="editorder.asp?state=0" >全部订单状态</option>
<option value="editorder.asp?state=1" >用户已划出款</option>
<option value="editorder.asp?state=2" >未作任何处理</option>
<option value="editorder.asp?state=3" >服务商已收到款</option>
<option value="editorder.asp?state=4" >服务商已发货</option>
<option value="editorder.asp?state=5" >用户已经收到货</option>
</select>
</td>
</tr>
</table>
<%
Const MaxPerPage=12
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
if(state=0) then
rs.open "select * from orders ",conn,1,1
else rs.open "select * from orders where state="&state&"",conn,1,1
end if
if namekey="" then
%>
<!--#
<select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" ><base target=Right>
<option value="editorder.asp?state=0" >全部订单状态</option>
<option value="editorder.asp?state=1" >未作任何处理</option>
<option value="editorder.asp?state=2" >用户已划出款</option>
<option value="editorder.asp?state=3" >服务商已收到款</option>
<option value="editorder.asp?state=4" >服务商已发货</option>
<option value="editorder.asp?state=5" >用户已经收到货</option>
</select>
-->
<%
end if

if err.number<>0 then
response.write "数据库中暂时无数据"
end if

if rs.eof And rs.bof then
Response.Write "<p align='center' class='contents'> 对不起,您选择的状态目前还没有订单!</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"editorder.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"editorder.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"editorder.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF" align="center">
<td>订单号</td>
<td>下单用户</td>
<td>订货人姓名</td>
<td>金额总计</td>
<td> 付款方式</td>
<td> 收货方式</td>
<td > 订单状态</td>
</tr>
<%do while not rs.eof
dim shop,username,rs2
set shop=server.CreateObject("adodb.recordset")
shop.open "select username from [user] where userid="&rs("userid"),conn,1,1
username=trim(shop("username"))
shop.close
%>
<tr bgcolor="#FFFFFF" align="center">
<td>&nbsp;<a href=# onClick="javascript:window.open('vieworder.asp?dan=<%=trim(rs("goods"))%>&username=<%=username%>','','width=710,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no');return false;"><%=trim(rs("goods"))%></a></td>
<td><%=username%></td>
<td><%=trim(rs("realname"))%></td>
<td><%
shop.open "select sum(paid) as paid,sum(score) as score from orders where goods='"&trim(rs("goods"))&"' ",conn,1,1
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from delivery where deliveryid="&rs("deliverymethord"),conn,1,1
response.write "<font color=#FF6600>"&shop("paid")+rs2("fee")&"元</font>"
rs2.close
shop.close
set shop=nothing
%>

</td>
<td> <%
rs2.open "select * from delivery where deliveryid="&int(rs("paymethord")),conn,1,1
if rs2.eof and rs2.bof then
response.write "方式已被删除"
else
response.Write trim(rs2("subject"))
end if
rs2.Close
set rs2=nothing
%>
</td>
<td> <%
set rs2=server.CreateObject("adodb.recordset")
rs2.Open "select * from delivery where deliveryid="&int(rs("deliverymethord")),conn,1,1
if rs2.eof and rs2.bof then
response.write "方式已被删除"
else
response.Write trim(rs2("subject"))
end if
rs2.close
set rs2=nothing%> </td>
<td> <%
select case rs("state")
case "1"
response.write "未作任何处理"
case "2"
response.write "未作任何处理"
case "3"
response.write "服务商已收到款"
case "4"
response.write "服务商已发货"
case "5"
response.write "用户已经收到货"
end select%> </td>
</tr>
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing%>
</table>
<%
End Sub

Function showpage(totalnumber,maxperpage,filename)
Dim n

If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
if namekey="" then
Response.Write "<form method=Post action="&filename&"?state="&state&">"
else
Response.Write "<form method=Post action="&filename&"?state="&state&"&namekey="&namekey&">"
end if
Response.Write "<p align='center' class='contents'> "
If CurrentPage<2 Then
Response.Write "<font class='contents'>首 页 上一页</font> "
Else
if namekey="" then
Response.Write "<a href="&filename&"?page=1&state="&state&" class='contents'>首 页</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&state="&state&" class='contents'>上一页</a> "
ELSE
Response.Write "<a href="&filename&"?page=1&state="&state&"&namekey="&namekey&" class='contents'>首 页</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&state="&state&"&namekey="&namekey&" class='content
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-19 02:39 , Processed in 0.081163 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表