📄 orderedit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="userfunction.asp"-->
<!--#include file="cartfunction.asp"-->
<%
if request.cookies("bookshop")("username")="" then
response.write "<script language=javascript>alert('对不起,您还没有登录!');window.location.reload('javascript:window.close()')</script>"
response.End
end if
%>
<html>
<head>
<title><%=webname%>--我要下订单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<%dim ccount, zcount, fcount
ccount=0: zcount=0 :fcount=0
set rsc=server.createobject("adodb.recordset")
rsc.open "select * from shop_city order by cityidorder ",conn,1,1
set rsz=server.createobject("adodb.recordset")
rsz.open "SELECT shop_songclass.fsid, shop_songclass.faid, shop_songclass.songid, shop_songhuo.subject FROM shop_songclass INNER JOIN shop_songhuo ON shop_songclass.songid = shop_songhuo.songid ORDER BY shop_songhuo.songidorder",conn,1,1
%>
<SCRIPT language=JavaScript>
<!--
var citycount;
citycount=0;
var zffscount;
zffscount=0;
var fafacount;
fafacount=0;
subcity = new Array();
subzffs = new Array();
subfaid = new Array()
//取得选省份时城区
<%do while not rsc.eof%>
subcity[<%=ccount%>] = new Array("<%= trim(rsc("cityid"))%>","<%= trim(rsc("cityname"))%>","<%= rsc("shengid")%>","<%= rsc("faid")%>");
subfaid[<%=ccount%>] = new Array("<%= trim(rsc("cityid"))%>","<%= rsc("faid")%>");
<%ccount =ccount + 1
fcount =fcount + 1
rsc.movenext
loop
rsc.close%>
citycount=<%=ccount%>;
fafacount=<%=fcount%>;
//取得选城区时的送书方式
<%do while not rsz.eof%>
subzffs[<%=zcount%>] = new Array("<%= trim(rsz("subject"))%>","<%= rsz("faid")%>","<%= rsz("songid")%>");
<%zcount=zcount+1
rsz.movenext
loop
rsz.close%>
zffscount=<%=zcount%>;
function changeshengclass(shengclassid)
{
document.shouhuoxx.cityclass.length = 0;
var shengclassid=shengclassid;
var i;
for (i=0;i < citycount; i++)
{
if (subcity[i][2] == shengclassid)
{
document.shouhuoxx.cityclass.options[document.shouhuoxx.cityclass.length] = new Option(subcity[i][1], subcity[i][0]);
}
}
if (shengclassid ==0 )
{
document.shouhuoxx.cityclass.options[document.shouhuoxx.cityclass.length] = new Option("选城区", 0);
}
changecityclass(document.shouhuoxx.cityclass.options[document.shouhuoxx.cityclass.selectedIndex].value)
}
function changecityclass(cityclassid)
{
document.shouhuoxx.songid.length = 0;
var cityclassid=cityclassid;
var i;
var j;
for (i=0; i<fafacount; i++)
{
if (subfaid[i][0] == cityclassid)
{
for (j=0; j<zffscount; j++)
{
if(subfaid[i][1] == subzffs[j][1])
{
document.shouhuoxx.songid.options[document.shouhuoxx.songid.length] = new Option(subzffs[j][0], subzffs[j][2]);
}
}
}
}
if (cityclassid ==0 )
{
document.shouhuoxx.songid.options[document.shouhuoxx.songid.length] = new Option("送书方式", 0);
}
}
function showfapiao()
{
if(document.all.chkfp.checked==true)
{
document.all.liuyan.style.display="";
document.all.fapiao_label.style.display="";
}
else{
document.all.liuyan.style.display="none";
document.all.fapiao_label.style.display="none";
}
}
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</SCRIPT>
<%dim action, bk, bkindex
action=request.QueryString("action")
bk = Session("mycart")
bkindex= session("cartindex")
set rs=server.CreateObject("adodb.recordset")
rs.open "select shouname,shousex,shengshi,city,shouhuodizhi,youbian,usertel,songid,zhifufangshi,blnedit from shop_user where username='"&request.cookies("bookshop")("username")&"' ",conn,1,1
if action="" then action=rs("blnedit")
select case action
//无或改信息资料
case "0"
edit_userxx()
//有信息资料
case "1"
list_userxx()
//更新全部资料
case "updatexx"
update_userxx()
//修改送货方式
case "songhuofangshi"
edit_usershfs()
//更新送货方式
case "updatesffs"
update_usershfs()
//修改支付方式
case "zhifufangshi"
edit_userzffs()
//更新支付方式
case "updatezffs"
update_userzffs()
//写入订单信息
case "orderok"
function HTMLEncode2(fString)
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
HTMLEncode2 = fString
end function
dim shijian,dingdan
shijian=now()
dingdan=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
set rsxx=server.CreateObject("adodb.recordset")
rsxx.Open "select * from shop_user where username='"&request.cookies("bookshop")("username")&"' ",conn,1,3
for i=0 to bkindex-1
bookid = bk(i,0)
bookname = bk(i,1)
purchase = bk(i,2)
shichangjia = bk(i,3)
huiyuanjia = bk(i,4)
set rs=server.CreateObject("adodb.recordset")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -