www.gusucode.com > 凡人网络购物系统 2008源码程序 > Admin/ad_ps.asp

    <!--#include file="conn.asp"-->
<!--#include file="ad_chk.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=inc/css.css rel=STYLESHEET type=text/css>
<body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5">

<%
if Request.Cookies("venshop")("admin_class")<>0 then
response.write "你没有这个权限!"
response.end
end if
%>
<%
ps_id=request("ps_id")
if request("action")="add" then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from venshop_ps",conn,1,3
rs.AddNew
rs("ps_name")=request("ps_name")
rs("ps_content")=request("ps_content")
rs("ps_time")=request("ps_time")
if yunfei=1 or yunfei=3 or yunfei=4 then
	rs("ps_fei")=request("ps_fei")
	if yunfei=3 or yunfei=4 then
		rs("ps_xufei")=request("ps_xufei")
		
		if yunfei=3 then
			rs("ps_qi")=request("ps_qi")
			rs("ps_xu")=request("ps_xu")
		else
			rs("ps_qi")=0
			rs("ps_xu")=0
		end if
	else
		rs("ps_xufei")=0
	end if
else
	rs("ps_fei")=0
end if
rs.Update
rs.Close
set rs=nothing
call addok(addt,"ad_ps.asp","ad_ps.asp")
end if

if request("action")="edit" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from venshop_ps where ps_id="&ps_id&"",conn,1,3
rs("ps_name")=request("ps_name")
rs("ps_content")=request("ps_content")
rs("ps_time")=request("ps_time")
if yunfei=1 or yunfei=3 or yunfei=4 then
rs("ps_fei")=request("ps_fei")
if yunfei=3 then
rs("ps_qi")=request("ps_qi")
rs("ps_xu")=request("ps_xu")
rs("ps_xufei")=request("ps_xufei")
end if
end if
rs.update
rs.close
set rs=nothing
call editok(editt,"ad_ps.asp","ad_ps.asp")
end if

if request("action")="del" then
conn.execute "delete from venshop_ps where ps_id="&ps_id
call deleok(delet,"ad_ps.asp")
end if
%>
<table border="0" cellpadding="5" cellspacing="0" class="st">
  <tr><td align="center" class="sa">送货方式</td>
<%if yunfei=1 or yunfei=3 or yunfei=4 then%>
<td align="center" class="sa">基本运费</td>
<%if yunfei=3 then%>
<td align="center" class="sa">起重质量</td>
<td align="center" class="sa">单位续重质量</td>
<td align="center" class="sa">单位重量运费</td>
<%elseif yunfei=4 then%>
<td align="center" class="sa">单件商品运费</td>
<%end if%>
<%end if%>
	  <td align="center" class="sa">说明介绍</td>
	  <td align="center" class="sa">到货时间</td>
	  <td align="center" class="sa">操作</td></tr>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from venshop_ps",conn,1,1
i=0
do while not rs.eof
i=i+1
%><form method="post" action="ad_ps.asp?action=edit&ps_id=<%=rs("ps_id")%>">
  <tr><td align="center" valign="top" class="s<%=i mod 2%>"><input name="ps_name" type="text" size="13" value="<%=rs("ps_name")%>"></td>
<%if yunfei=1 or yunfei=3 or yunfei=4 then%>
<td align="center" valign="top" class="s<%=i mod 2%>"><input name="ps_fei" type="text" size="2" value="<%=rs("ps_fei")%>"></td>
<%if yunfei=3 then%>
<td align="center" valign="top" class="s<%=i mod 2%>"><input name="ps_qi" type="text" size="2" value="<%=rs("ps_qi")%>"> 千克</td>
<td align="center" valign="top" class="s<%=i mod 2%>"><input name="ps_xu" type="text" size="2" value="<%=rs("ps_xu")%>"> 千克</td>
<td align="center" valign="top" class="s<%=i mod 2%>"><input name="ps_xufei" type="text" size="2" value="<%=rs("ps_xufei")%>"></td>
<%elseif yunfei=4 then%>
<td align="center" valign="top" class="s<%=i mod 2%>"><input name="ps_xufei" type="text" size="2" value="<%=rs("ps_xufei")%>"></td>
<%end if%>
<%end if%>
	  
	  <td align="center" valign="top" class="s<%=i mod 2%>"><textarea rows="3" name="ps_content" cols="26"><%=rs("ps_content")%></textarea></td>
	  <td align="center" valign="top" class="s<%=i mod 2%>"><input name="ps_time" type="text" size="6" value="<%=rs("ps_time")%>"></td>
	  <td align="center" valign="top" class="s<%=i mod 2%>"><input type="submit" name="Submit" value="修改">&nbsp;
		<a href=ad_ps.asp?action=del&ps_id=<%=rs("ps_id")%> onClick="return confirm('您确定进行删除操作吗?')">删除</a>
	  </td>
</tr></form>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
<br>
<table border="0" cellpadding="5" cellspacing="0" class="st"><form method="post"  action="ad_ps.asp?action=add">
<tr><td align="center" class="sa">添加送货方式</td>
<%if yunfei=1 or yunfei=3 or yunfei=4 then%>
<td align="center" class="sa">基本运费</td>
<%if yunfei=3 then%>
<td align="center" class="sa">起重质量</td>
<td align="center" class="sa">单位续重质量</td>
<td align="center" class="sa">单位重量运费</td>
<%elseif yunfei=4 then%>
<td align="center" class="sa">单件商品运费</td>
<%end if%>
<%end if%>
<td align="center" class="sa">说明</td>
<td align="center" class="sa">到货时间</td>
<td align="center" class="sa"></td>

</tr>
<tr>
<td align="center" valign="top"><input name="ps_name" type="text" size="11"></td>

<%if yunfei=1 or yunfei=3 or yunfei=4 then%>
<td align="center" valign="top"><input name="ps_fei" type="text" size="2" value="0"></td>
<%if yunfei=3 then%>
<td align="center" valign="top"><input name="ps_qi" type="text" size="2" value="0"> 千克</td>
<td align="center" valign="top"><input name="ps_xu" type="text" size="2" value="0"> 千克</td>
<td align="center" valign="top"><input name="ps_xufei" type="text" size="2" value="0"></td>
<%elseif yunfei=4 then%>
<td align="center" valign="top"><input name="ps_xufei" type="text" size="2" value="0"></td>
<%end if%>
<%end if%>

<td align="center" valign="top"><textarea rows="3" name="ps_content" cols="21"></textarea></td>
<td align="center" valign="top"><input name="ps_time" type="text" size="8"></td>
<td align="center" valign="top"><input type="submit" name="Submit2" value="添加"></td>
</tr></form></table>
<br><div class="help">
备注:<br>此配送方式对应前台客户下订单时选择的送货方式,客户可以选择适当的送货方式,设置的附加费用会在客户选择该送货方式时自动加上。</div><!--#include file="ad_bottom.asp"-->