⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deliverymode.asp

📁 亿众购物系统 一套设计完善、高效的web商城解决方案
💻 ASP
字号:
<!--#include file="../Session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/site.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
if request("Del")="Yes" then
	conn.execute("Delete From DeliveryMode where id="&request("id")&"")
end if 

if request("add")<>"" then
	DeliveryMode=request("DeliveryMode")
	Area=request("Area")
	OutlayMode=request("OutlayMode")
	Outlay1=request("Outlay1")
	if Outlay1="" then:Outlay1=0
	Outlay2=request("Outlay2")
	if Outlay2="" then:Outlay2=0
	Outlay3=request("Outlay3")
	if Outlay3="" then:Outlay3=0
	Outlay4=request("Outlay4")
	if Outlay4="" then:Outlay4=0
	Date1=request("Date1")
	if IsNumeric(Outlay1)=False or IsNumeric(Outlay2)=False or IsNumeric(Outlay3)=False or IsNumeric(Outlay4)=False then
		Response.Write("<script>alert(""配送费用输入错误,请检查!"");history.back();</script>")
		Response.end
	end if
	if DeliveryMode<>"" and Area<>"" and Date1<>"" then
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql="select * from DeliveryMode where DeliveryMode='"&DeliveryMode&"'"
		rs.open sql,conn,0,1
		if rs.eof then
			conn.execute("Insert into DeliveryMode (DeliveryMode,[Area],OutlayMode,Outlay1,Outlay2,Outlay3,Outlay4,[Date]) Values ('"&DeliveryMode&"','"&Area&"',"&OutlayMode&","&Outlay1&","&Outlay2&","&Outlay3&","&Outlay4&",'"&Date1&"')")
			Response.Write("<script>alert(""添加配送方式成功"");location.href=""DeliveryMode.asp"";</script>")
		else
			Response.Write("<script>alert("""&DeliveryMode&"配送方式已经存在,不能重复添加。"");history.back();</script>")
		end if
	end if
end if
%>
<form name="form1" method="post" action="?add=yes">
  <table width="100%" align="center" class=datalist>
    <tr align="center"> 
      <td height="50" colspan="2" class="tdstyle"><font color="#000000" size="3"><strong>添加配送方式</strong></font></td>
    </tr>
    <tr> 
      <td width="25%" align="right" valign="middle" bgcolor="#FFFFFF" class="tdstyle">配送方式&nbsp; 
      </td>
      <td width="75%" bgcolor="#FFFFFF" class="tdstyle"> &nbsp;
	  <select name="DeliveryMode" class="input1" id="DeliveryMode">
          <option  value="普通邮递" selected>普通邮递</option>
          <option  value="邮政快递">邮政快递</option>
          <option  value="EMS">EMS</option>
          <option  value="铁路货运">铁路货运</option>
          <option  value="中铁快运">中铁快运</option>
          <option  value="汽运配货">汽运配货</option>
          <option  value="送货上门">送货上门</option>
          <option  value="用户自提">用户自提</option>
		  <option  value="Email发送">Email发送</option>
		</select>
      </td>
    </tr>
    <tr> 
      <td align="right" valign="middle" class="tdstyle"> 配送费用&nbsp; </td>
      <td class="tdstyle"> &nbsp;<input name="OutlayMode" type="radio" value="1" checked>免费送货<br>
        &nbsp;<input type="radio" name="OutlayMode" value="2"><input name="Outlay1" type="text" class="input1" id="Outlay1" size="5" maxlength="10">元 <br>
        &nbsp;<input type="radio" name="OutlayMode" value="3">
        订单总额小于等于 
        <input name="Outlay2" type="text" class="input1" id="Outlay2" size="3" maxlength="10">
        元,配送款为 
        <input name="Outlay3" type="text" class="input1" id="Outlay3" size="3" maxlength="10">
        元;大于时配送款为 
        <input name="Outlay4" type="text" class="input1" id="Outlay4" size="3" maxlength="10">
        元</td>
    </tr>
    <tr> 
      <td align="right" valign="middle" class="tdstyle"> 配送范围&nbsp; </td>
      <td class="tdstyle"> &nbsp;<textarea name="Area" cols="45" class="input1" id="Area"></textarea>50字内</td>
    </tr>
    <tr> 
      <td align="right" valign="middle" class="tdstyle">送达时间&nbsp; </td>
      <td class="tdstyle">&nbsp;  <input name="Date1" type="text" class="input1" id="Date1" size="20" maxlength="20">(例如:2天 或 2-5天) </td>
    </tr>
    <tr> 
      <td height="30" colspan="2" align="center" class="tdstyle"> 
        <input name="Submit" type="submit" class="button" value="增 加">
		<input name="Submit2" type="reset" class="button" value="重 置">
      </td>
    </tr>
  </table>
</form>
<table width="100%" align="center" class=datalist>
  <tr align="center"> 
    <td height="50" colspan="2" class="tdstyle"><strong><font color="#000000" size="3">配送方式</font></strong></td>
  </tr>
  <tr> 
  <%Set rs = Server.CreateObject("ADODB.Recordset")
  sql="select * from DeliveryMode order by id desc"
  rs.open sql,conn,1,1
  if rs.eof then
  	Response.Write"<td width=100% align=center class=tdstyle><br>暂无配送方式,请及时添加!<br>"
  else
	  Response.Write("<td width=100% class=tdstyle><br>")
	  for i=1 to rs.recordcount
	  Response.Write("配送方式"&(i)&":"&rs("DeliveryMode")&" 配送费用:")
	  Select case rs("OutlayMode")
      case "1"
        Response.Write "0"
     case "2"
	     Response.Write(""&rs("Outlay1")&"")
     case "3"
	     Response.Write ("订单总金额小于等于"&rs("Outlay2")&"元,配送价格为"&rs("Outlay3")&"元;大于时配送价格为"&rs("Outlay4")&"") 
    End Select
	  Response.Write("元 配送范围:"&rs("Area")&" 预计收货时间:"&rs("date")&"")%> <input name="submit" type="button" class="button2" value="删 除" onClick="window.location='?Del=Yes&Id=<%=rs("Id")%>'"><br><br>
	  <%rs.movenext
	  next
	  rs.close
 end if
	  %>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -