viewdingdan.asp
来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 224 行
ASP
224 行
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.reload('login.asp')</script>"
response.End
else
if session("flag")=2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="5" topmargin="5" marginwidth="0" marginheight="0">
<%dim dingdan,username
dingdan=request.QueryString("dan")
username=request.QueryString("username")
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_books.bookid,shop_books.bookname,shop_books.shichangjia,shop_books.huiyuanjia,shop_action.actiondate,shop_action.shousex,shop_action.userzhenshiname,shop_action.shouhuoname,shop_action.dingdan,shop_action.youbian,shop_action.blnisfp,shop_action.liuyan,shop_action.zhifufangshi,shop_action.songid,shop_action.zhuangtai,shop_action.zonger,shop_action.useremail,shop_action.usertel,shop_action.shouhuodizhi,shop_action.bookcount from shop_books inner join shop_action on shop_books.bookid=shop_action.bookid where shop_action.username='"&username&"' and dingdan='"&dingdan&"' ",conn,1,1
if rs.eof and rs.bof then
response.write "<center>此订单中有图书已被管理员删除,无法进行正确计算。<br>订单取消,请手动删除此订单! "
response.write "<input type=button name=Submit3 value=删除订单 onClick=""location.href='savedingdan.asp?action=del&dan="&dingdan&"&username="&username&"'""> </center>"
response.End
end if
%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr bgcolor="#EFF5FE">
<td colspan="2"><div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="89%"><div align="center">订单号为:<%=dingdan%> ,详细资料如下:</div></td>
<td width="11%"><div align="center">
<input type="button" name="Submit4" value="打 印" onclick="javascript:window.print()">
</div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>订单状态:</td>
<td width="87%" bgcolor="#EFF5FE"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<form name="form1" method="post" action="savedingdan.asp?dan=<%=dingdan%>&action=save&username=<%=username%>">
<td > <%
zhuang()%> <br>
<input type="submit" name="Submit" value="修改订单状态">
</td>
</form>
</tr>
</table></td>
</tr>
<tr>
<td width="13%" bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>商品列表:</td>
<td bgcolor="#EFF5FE"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#EFF5FE"><div align="center">商品名称</div></td>
<td bgcolor="#EFF5FE"><div align="center">订购数量</div></td>
<td bgcolor="#EFF5FE"><div align="center">会员价格</div></td>
<td bgcolor="#EFF5FE"><div align="center">金额小计</div></td>
</tr>
<%dim iii,fpflag
do while not rs.eof%>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 5px'><a href=../book.asp?id=<%=rs("bookid")%> target=_blank><%=trim(rs("bookname"))%></a></td>
<td bgcolor="#EFF5FE"><div align="center"><%=rs("bookcount")%></div></td>
<td bgcolor="#EFF5FE"><div align="center"><%=formatnumber(rs("huiyuanjia"),2)&"元"%></div></td>
<td bgcolor="#EFF5FE"><div align="center"><%=formatnumber(rs("huiyuanjia")*rs("bookcount"),2)&"元"%></div></td>
</tr>
<%iii=rs("zonger")+iii
rs.movenext
loop
rs.movefirst
if rs("blnisfp")="on" then
iii=iii*1.05
fpflag="(含税费)"
else
iii=iii*1
fpflag=""
end if%>
<tr>
<td colspan="4" bgcolor="#EFF5FE"><div align="right">用户选择的送货方式是:
<%'///判断送货方式加收金额
dim rs2
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select shop_songhuo.subject,shop_songhuo.jsmoney,shop_songhuo.gsmoneyside,shop_songhuo.gsmoneybili FROM shop_action INNER JOIN shop_songhuo ON shop_action.songid = shop_songhuo.songid where shop_action.username='"&username&"' and dingdan='"&dingdan&"' ",conn,1,1
if rs2.eof and rs2.bof then
response.write "方式以被删除"
response.write " +"&formatnumber(0,2)&"元"
response.write " 金额总计:"&formatnumber(iii,2)&"元"&fpflag
else
if iii<rs2("gsmoneyside") then
response.write trim(rs2("subject"))
response.write " +"&formatnumber(rs2("jsmoney"),2)&"元"
response.write " 金额总计:<font color=blue>"&formatnumber(iii+rs2("jsmoney"),2)&"元</font>"&fpflag
else
if iii<2*rs2("gsmoneyside") then
response.write trim(rs2("subject"))
response.write "+"&formatnumber((rs2("jsmoney")+(iii*rs2("gsmoneybili")*0.5)), 2)&"元"
response.write " 金额总计:<font color=blue>"&formatnumber((rs2("jsmoney")+iii*(1+rs2("gsmoneybili")*0.5)),2)&"元</font>"&fpflag
else
response.write trim(rs2("subject"))
response.write "+"&formatnumber((rs2("jsmoney")+(iii*rs2("gsmoneybili"))), 2)&"元"
response.write " 金额总计:<font color=blue>"&formatnumber((rs2("jsmoney")+iii*(1+rs2("gsmoneybili"))),2)&"元</font>"&fpflag
end if
end if
end if
rs2.Close
set rs2=nothing
%>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>订货人姓名:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=trim(rs("userzhenshiname"))%></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>收货人姓名:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=trim(rs("shouhuoname"))%></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>收货地址:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=trim(rs("shouhuodizhi"))%></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>邮编:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=trim(rs("youbian"))%></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>联系电话:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=trim(rs("usertel"))%></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>电子邮件:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=trim(rs("useremail"))%></td>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>送货方式:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%
'///送货方式
set rs2=server.CreateObject("adodb.recordset")
rs2.Open "select * from shop_songhuo where songid="&int(rs("songid")),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>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>支付方式:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%
'///支付方式
set rs2=server.CreateObject("adodb.recordset")
rs2.Open "select * from shop_songhuo where songid="&int(rs("zhifufangshi")),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>
</tr>
<tr>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>用户留言:</td>
<td bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=trim(rs("liuyan"))%></td>
</tr>
<tr>
<td height="20" bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'>下单日期:</td>
<td height="20" bgcolor="#EFF5FE" STYLE='PADDING-LEFT: 10px'><%=rs("actiondate")%></td>
</tr>
<tr>
<td height="32" colspan="2" bgcolor="#EFF5FE"><div align="center">
<input type="button" name="Submit3" value="删除订单" onClick="if(confirm('您确定要删除吗?')) location.href='savedingdan.asp?action=del&dan=<%=dingdan%>&username=<%=username%>';else return;">
<input type="button" name="Submit2" value="关闭窗口" onclick=javascript:window.close()>
</div></td>
</tr>
</table>
</body>
</html>
<%sub zhuang()
select case rs("zhuangtai")
case "1"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>读者已下订单<span style='font-family:Wingdings;'>à</span>
<input name="zhuangtai" type="checkbox" id="zhuangtai" value="2">读者已划出款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox2" value="checkbox" DISABLED>图书网收到款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox3" value="checkbox" DISABLED>图书网已发货<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>读者已收到货
<%case "2"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>读者已下订单<span style='font-family:Wingdings;'>à</span>
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>读者已划出款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="zhuangtai" value="3">图书网收到款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox3" value="checkbox" DISABLED>图书网已发货<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>读者已收到货
<%case "3"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>读者已下订单<span style='font-family:Wingdings;'>à</span>
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>读者已划出款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED >图书网收到款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="zhuangtai" value="4">图书网已发货<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox4" value="checkbox" DISABLED>读者已收到货
<%case "4"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>读者已下订单<span style='font-family:Wingdings;'>à</span>
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>读者已划出款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>图书网收到款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>图书网已发货<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="zhuangtai" value="5" >读者已收到货
<%case "5"%>
<input name="checkbox" type="checkbox" DISABLED id="checkbox" value="checkbox" checked>读者已下订单<span style='font-family:Wingdings;'>à</span>
<input name="checkbox" type="checkbox" id="zhuangtai" value="2" checked DISABLED>读者已划出款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox2" value="checkbox" checked DISABLED>图书网收到款<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox3" value="checkbox" checked DISABLED>图书网已发货<span style='font-family:Wingdings;'>à</span>
<input type="checkbox" name="checkbox4" value="checkbox" checked DISABLED>读者已收到货
<%end select
end sub%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?