<!--#include file="0.asp"--><!--#include file="0.asp"-->
<!--#include file="../../conn/zkconn.asp"-->
<%
set rs = conn.execute("select id from user_name where name='"&session("www.loogoo.com")&"'")
userid=rs("id")
rs.close
if request("del")="yes" then
         set rs = conn.execute("select id from user_name where name='"&session("www.loogoo.com")&"'")
		userid=rs("id")
	    rs.close
		set rs = conn.execute("select userid from fukuan where id="&Request("id")&"")
		userid2=rs("userid")
	    rs.close
    if userid=userid2 then
         conn.execute("Delete fukuan where id="&request("id")&"")
         Response.Write("<script>alert(""删除成功"");location.href=""peisong.asp"";</script>")
    else
		Response.Write("对不起，您不能删除该条类别信息。如有疑问请与网站管理员联系。")
	 end if
end if 

if request("add")<>"" then
fs=request("fs")
fw=request("fw")
rmb_fs=request("rmb_fs")
rmb1=request("rmb1")
rmb2=request("rmb2")
rmb3=request("rmb3")
rmb4=request("rmb4")
sj=request("sj")
if not (isnumeric(rmb_fs) or isnumeric(rmb1) or isnumeric(rmb2) or isnumeric(rmb3) or isnumeric(rmb4)) then
Response.Write("<script>alert(""配送费用输入错误，请检查！"");history.back();</script>")
Response.end
end if
if fs<>"" and fw<>"" and sj<>"" then
set rs = conn.execute("select * from fukuan where fs='"&fs&"' and userid="&userid&"")
if rs.eof then
conn.execute("Insert into fukuan(fs,sj,rmb_fs,rmb1,rmb2,rmb3,rmb4,fw,userid)values('"&fs&"','"&sj&"','"&rmb_fs&"','"&rmb1&"','"&rmb2&"','"&rmb3&"','"&rmb4&"','"&fw&"',"&userid&")")
Response.Write("<script>alert(""添加配送支付方式成功"");location.href=""peisong.asp"";</script>")
else
Response.Write("<script>alert("""&fs&"配送方式贵公司已经存在，不能重复添加。"");history.back();</script>")
end if
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<form name="form1" method="post" action="?add=yes">
  <p>&nbsp;</p>
  <table width="500" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
    <tr bgcolor="#FFFFFF"> 
      <td colspan="2">&nbsp; <font color="#FF3333" class="b2"><strong>&gt;&gt;增加配送方式&nbsp; 
        </strong></font>（指用户购买贵公司商品后如何进行商品配送）</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="center">配送方式</td>
      <td> 
        <select name="fs" class="wenbenkuang" id="fs">
          <option  value="普通邮政" selected>普通邮政</option>
          <option  value="邮政快递">邮政快递</option>
          <option  value="EMS">EMS</option>
          <option  value="送货上门">送货上门</option>
          <option  value="E-mail发送">E-mail发送</option>
          <option  value="铁路货运">铁路货运</option>
          <option  value="自提">自提</option>
        </select></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="94" align="center"> 配送费用</td>
      <td width="394"> 
        <input name="rmb_fs" type="radio" value="1" checked>
        <input name="rmb1" type="text" class="wenbenkuang" id="rmb1" size="5" maxlength="10">
        元 <br>
        <input type="radio" name="rmb_fs" value="2">
        免费配送<br>
        <input type="radio" name="rmb_fs" value="3">
        购物总价小于等于
        <input name="rmb2" type="text" class="wenbenkuang" id="rmb2" size="5" maxlength="10">
        元,配送价格为
        <input name="rmb3" type="text" class="wenbenkuang" id="rmb3" size="5" maxlength="10">
        元;大于时配送价格为
        <input name="rmb4" type="text" class="wenbenkuang" id="rmb4" size="5" maxlength="10">
        元 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="center"> 配送范围</td>
      <td> 
        <input name="fw" type="text" class="wenbenkuang" id="fw" size="45" maxlength="50">
        50字内,请尽量简短</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="center">预计收货时间</td>
      <td> 
        <input name="sj" type="text" class="wenbenkuang" id="sj" size="20" maxlength="20">
        (例如:xx天或xx——xx天) </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td align="center">&nbsp;</td>
      <td> 
        <input name="Submit" type="submit" class="go-wenbenkuang" value="增 加"> 
        &nbsp; <input name="Submit2" type="reset" class="go-wenbenkuang" value="重 置">
        (全部正确填写才能正常提交增加)</td>
    </tr>
  </table>

</form>
<table width="500" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="2"><strong><font color="#FF3300" size="3">&gt;&gt;目前已有的配送方式</font></strong></td>
  </tr>
  <tr> 
    <td width="30">&nbsp; </td>
    <td width="470"> 
      <%set rs = conn.execute("select * from fukuan where userid="&userid&" order by id desc")
	  for i=1 to rs.recordcount
	  Response.Write("配送方式："&rs("fs")&"<br>配送费用：")
	  Select case rs("rmb_fs")
      case "1"
        Response.Write(""&rs("rmb1")&"")
     case "2"
	     Response.Write "0" 
     case "3"
	     Response.Write ("购物总价小于等于"&rs("rmb2")&"元,配送价格为"&rs("rmb3")&"元;大于时配送价格为"&rs("rmb4")&"") 
    End Select
	  Response.Write("元<br>配送范围："&rs("fw")&"<br>预计收货时间："&rs("sj")&"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='?del=yes&id="&rs("id")&"'>&gt;&gt;删除此配送方式</a><br>")
	  rs.movenext
	  next
	  rs.close
set rs=nothing%>
    </td>
  </tr>
</table>
</body>
</html>