📄 fangshi.asp
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css2.css" rel="stylesheet" type="text/css">
</head>
<body>
<%dim action,songid,fsid,ffaid,ssongid,i_mun,i_color,html
fsid =request.QueryString("fid")
songid=request.QueryString("id")
action=request.QueryString("action")
html= request("html")
set rs=server.CreateObject("adodb.recordset")
select case action
'/////修改送货方式
case "songhuosave"
rs.open "select * from shop_songhuo where songid="&songid,conn,1,3
if trim(request("subject"))="" or request("songidorder")="" or request("jsmoney")="" or request("gsmoneyside")="" or request("gsmoneybili")="" then
response.write "<script language=javascript>alert('填写的信息不完整!');window.location.reload('fangshi.asp?action=songhuo')</script>"
else
rs("subject")=trim(request("subject"))
rs("gsmoneyside")=request("gsmoneyside")
rs("gsmoneybili")=request("gsmoneybili")
rs("songidorder")=request("songidorder")
rs("jsmoney")=request("jsmoney")
rs("fangshi")=0
rs.update
rs.close
response.write "<script language=javascript>alert('成功修改了送货方式!');window.location.reload('fangshi.asp?action=songhuo')</script>"
response.End
end if
'/////添加送货方式
case "songhuoadd"
rs.open "select * from shop_songhuo",conn,1,3
rs.addnew
rs("subject")=trim(request("subject"))
rs("gsmoneybili")=request("gsmoneybili")
rs("gsmoneyside")=request("gsmoneyside")
rs("songidorder")=request("songidorder")
rs("jsmoney")=request("jsmoney")
rs("fangshi")=0
rs.update
rs.close
response.write "<script language=javascript>window.location.reload('fangshi.asp?action=songhuo')</script>"
response.End
'/////删除送货方式
case "songhuodel"
conn.execute "delete from shop_songhuo where songid="&songid
conn.execute "delete from shop_songclass where songid="&songid
response.redirect "fangshi.asp?action=songhuo"
'/////删除送货类型
case "classdel"
conn.execute "delete from shop_songclass where fsid="&fsid
response.redirect "fangshi.asp?action=songclass"
'/////添加送货类型
case "addclass"
ffaid=clng(request("faid"))
ssongid=clng(request("songid"))
rs.open "select * from shop_songclass where faid="&ffaid&" and songid="&ssongid ,conn,1,3
if rs.bof and rs.eof then
rs.addnew
rs("faid") = trim(request("faid"))
rs("songid")= trim(request("songid"))
rs.update
rs.close
response.write "<script language=javascript>window.location.reload('fangshi.asp?action=songclass')</script>"
response.End
else
response.write "<script language=javascript>alert('类型重复!');window.location.reload('fangshi.asp?action=songclass')</script>"
response.End
end if
'/////删除支付方式
case "zhifudel"
conn.execute "delete from shop_songhuo where songid="&songid
response.redirect "fangshi.asp?action=zhifu"
'////修改支付方式
case "zhifusave"
rs.open "select * from shop_songhuo where songid="&songid,conn,1,3
if trim(request("subject"))="" or request("songidorder")="" then
response.write "<script language=javascript>alert('填写的信息不完整!');window.location.reload('fangshi.asp?action=zhifu')</script>"
response.End
else
rs("subject")=trim(request("subject"))
rs("songidorder")=request("songidorder")
rs("fangshi")=1
rs.update
rs.close
response.write "<script language=javascript>alert('成功修改了支付方式!');window.location.reload('fangshi.asp?action=zhifu')</script>"
response.End
end if
'/////添加支付方式
case "zhifuadd"
rs.open "select * from shop_songhuo",conn,1,3
if trim(request("subject"))="" or request("songidorder")="" then
response.write "<script language=javascript>alert('填写的信息不完整!');window.location.reload('fangshi.asp?action=zhifu')</script>"
response.End
else
rs.addnew
rs("subject")=trim(request("subject"))
rs("songidorder")=request("songidorder")
rs("fangshi")=1
rs.update
rs.close
response.write "<script language=javascript>window.location.reload('fangshi.asp?action=zhifu')</script>"
response.End
end if
end select
set rs=nothing
%>
<table width="90%" border="0" height=450 cellpadding="0" cellspacing="0">
<tr><td bgcolor="#ece9d8"><br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td>
<table width=231 border="0" cellpadding="0" cellspacing="0">
<tr valign=bottom><% select case action
case "songhuo" %>
<td background=images/get_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>送货方式</font></div></td>
<td background=images/lose_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><a href="fangshi.asp?action=songclass"><font color=#000000>送货类型</font></a></div></td>
<td background=images/lose_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><a href="fangshi.asp?action=zhifu"><font color=#000000>支付方式</font></a></div></td>
<%case "songclass"%>
<td background=images/lose_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><a href="fangshi.asp?action=songhuo"><font color=#000000>送货方式</font></a></div></td>
<td background=images/get_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>送货类型</font></div></td>
<td background=images/lose_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><a href="fangshi.asp?action=zhifu"><font color=#000000>支付方式</font></a></div></td>
<%case "zhifu" %>
<td background=images/lose_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><a href="fangshi.asp?action=songhuo"><font color=#000000>送货方式</font></a></div></td>
<td background=images/lose_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><a href="fangshi.asp?action=songclass"><font color=#000000>送货类型</font></div></td>
<td background=images/get_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>支付方式</font></div></td>
<%end select %>
</tr>
</table>
<%
select case action
case "songhuo"%>
<table width="100%" border="1" align=center cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#666666">
<tr><td>
<table width="100%" border="1" align=center cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" align=center cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<td bgcolor="#ece9d8"><div align="center">排序</div></td>
<td bgcolor="#ece9d8"><div align="center">送货方式</div></td>
<td bgcolor="#ece9d8"><div align="center">加收金额</div></td>
<td bgcolor="#ece9d8"><div align="center">超出金额</div></td>
<td bgcolor="#ece9d8"><div align="center">超加比率</div></td>
<td bgcolor="#ece9d8"><div align="center">编辑</div></td>
<td width="10%" bgcolor="#ece9d8"><div align="center">删除</div></td>
</tr>
<%dim ii,jj
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_songhuo where fangshi=0 order by songidorder",conn,1,1
ii=rs.recordcount:i_mun=1
do while not rs.eof
if i_mun mod 2=1 then
i_color="#ffffff"
else
i_color="#eeeeee"
end if%>
<tr>
<form name="form1" method="post" action="fangshi.asp?action=songhuosave&id=<%=rs("songid")%>">
<td bgcolor=<%=i_color%>><div align="center">
<input name="songidorder" type="text" id="songidorder" size="2" value=<%=rs("songidorder")%> onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"></div></td>
<td bgcolor=<%=i_color%>><div align="center"><input name="subject" type="text" id="subject" size="14" value=<%=trim(rs("subject"))%>></div></td>
<td bgcolor=<%=i_color%>><div align="center">
<input name="jsmoney" type="text" id="jsmoney" size="4" value=<%=formatnumber(rs("jsmoney"),2)%> onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">元</div></td>
<td bgcolor=<%=i_color%>><div align="center">
<input name="gsmoneyside" type="text" id="gsmoneyside" size="3" value=<%=rs("gsmoneyside")%> onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))">元</div></td>
<td bgcolor=<%=i_color%>><div align="center">
<input name="gsmoneybili" type="text" id="gsmoneybili" size="3" value=<%=formatnumber(rs("gsmoneybili"),2)%> onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))"></div></td>
<td bgcolor=<%=i_color%>><div align="center"><input type="submit" name="Submit" class="bt" value="修改">
<td bgcolor=<%=i_color%>><div align="center"><a href="fangshi.asp?action=songhuodel&id=<%=rs("songid")%>" onClick="return confirm('您确定进行删除操作吗?')"><font color="#FF0000">删除</font></a> </div></td>
</form>
</tr>
<% i_mun=i_mun+1
rs.movenext
loop
rs.close
set rs=nothing%>
<tr>
<form name="frmfs" method="post" action="fangshi.asp?action=songhuoadd">
<td colspan=7 bgcolor="#cccccc" height=32><div align="center">
排 序<input name="songidorder" type="text" class="tx" id="songidorder" value=<%=ii+1%> size="2" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))">
送货方式<input name="subject" type="text" class="tx" id="subject" size="14">
加收金额<input name="jsmoney" type="text" class="tx" id="jsmoney" size="4" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
元
超出金额<input name="gsmoneyside" type="text" class="tx" id="gsmoneyside" size="3" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
元
超加比率<input name="gsmoneybili" type="text" class="tx" id="gsmoneybili" size="3" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
<input type="submit" name="Submit3" class="bt5" value="添 加" onclick="return checkfs();">
</div></td>
</form>
</tr>
</table>
</tr>
</table>
</tr>
</table>
</tr>
</table>
<%
case "songclass"%>
<table width="100%" border="1" align=center cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#666666">
<tr><td>
<table width="100%" border="1" align=center cellspacing="0" cellpadding="0" >
<tr><td width="70%">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr height=25>
<td bgcolor="#ece9d8" width="49%"><div align="center">送货类型</div></td>
<td bgcolor="#ece9d8"><div align="center">送货方式</div></td>
<td bgcolor="#ece9d8"><div align="center">删除</div></td></div></td>
</tr>
<%'/////用数组显示跨行送货类型
dim i, j, k, o, m, n, a1, a2, a3, a4, a5, a6
i=0: j=0: k=0: o=0: m=0: n=0: a1=0: a2=0: a3=0: a4=0: a5=0: a6=0
dim a(5,1),b(5,1),c(5,1),d(5,1),e(5,1),f(5,1)
set rs=server.CreateObject("adodb.recordset")
rs.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_songclass.faid",conn,1,1
do while not rs.eof
'/////用数组分别保存各种送货类型
if rs("faid")=1 then
a(i,0)=rs("subject")
a(i,1)=rs("fsid")
i=i+1
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -