<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx1<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
%>
<html>
<head>
<title>网软志成在线购物系统</title>
<script>
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
<meta http-equiv="目录类型" content="文本/html; 字符集=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/right_top2.gif">
  <tr>
    <td width="1%">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/right_top2.gif">
      <tr>
        <td width="1%">&nbsp;</td>
        <td width="99%"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="99%" height="28"><table width="100%" border="0" cellspacing="0" cellpadding="5">
                  <tr>
                    <td width="77%" height="27" style="font-size:14px;color:#ffffff"><strong><font color="#000000">网软志成购物后台管理系统 &gt;&gt; 商品管理 &gt;&gt; 折扣管理</font></strong></td>
                    <td width="23%" style="font-size:14px;color:#ffffff"><span class="STYLE1">* 为必添项目</span></td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

  <br>
  <table border="0" width="95%" cellspacing="1" cellpadding="3" style="border-collapse: collapse" align=center bgcolor="#999999">
    <form method="post" action="zhekou_save.asp?action=update">
      <tr align=center bgcolor="#CCCCCC" height=25> 
        <td>序号</td>
        <td>折扣</td>
        <td>比例</td>
        <td>排序</td>
        <td>&nbsp;</td>
      </tr>
      
      <%
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT  * From shop_zhk  order by px",conn,1,1
if rs.recordcount=0 then 
%>
      <tr bgcolor="#F3F3F3"> 
        <td width="100%" height=25 colspan="9" align="center"> <span class="STYLE1">还没有添加折扣</span></td>
      </tr>
      <%
else
iiii=1
    do while not rs.eof
%>
      <tr height=25 bgcolor="#F3F3F3"> 
        <td align=center><%=rs("ID")%></td>
        <td align=center> <input type="hidden" name="zhkid" value="<%=rs("id")%>"> 
          <input class="wenbenkuang" type="text" name="zhkname" size="16" value="<%=trim(rs("zhkname"))%>"> 
        </td>
        <td align=center> <input class="wenbenkuang" type="text" name="order" size="10" value="<%=rs("order")%>" onKeyPress="return event.keyCode>=46&&event.keyCode<=57" > 
        </td>
        <td align=center><input name="px" type="text" class="wenbenkuang" id="px" value="<%=rs("px")%>" size="10" onKeyPress="return event.keyCode>=48&&event.keyCode<=57"></td>
        <td align=center> <a href="zhekou_kill.asp?zhkid=<%=rs("id")%>">删除</a> 
        </td>
      </tr>
      <%
	  iiii=iiii+1
    rs.MoveNext
    Loop
%><tr height=25 bgcolor="#F3F3F3"> 
        <td colspan="6" align=center><input type="submit" name="Submit22" value="保存修改" class="go-wenbenkuang"> 
          &nbsp; <input type="reset" value="重新设定" class="go-wenbenkuang" name="重置" > 
        </td>
      </tr>
      <%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
    </form>
  </table><br>
  <table border="0" width="95%" cellspacing="1" cellpadding="3" style="border-collapse: collapse" align=center bgcolor="#999999">
    <form method="post" name="form1" action="zhekou_save.asp?action=add" onSubmit="return ck2()">
	<script language="javascript">
	function ck2()
	{
	if(form1.zhkname.value=="")
	{
	alert("请输入折扣")
	form1.zhkname.focus()
	return false
	}
	
	if(form1.order.value=="")
	{
	alert("请输入比例")
	form1.order.focus()
	return false
	}
	
	if(form1.px.value=="")
	{
	alert("请输入排序")
	form1.px.focus()
	return false
	}
	}
	</script>
      <tr height=25 bgcolor="#F3F3F3"> 
        <td align=center bgcolor="#CCCCCC">添加折扣</td>
        <td align=center>折扣： 
        <input name="zhkname" type="text" class="wenbenkuang" id="zhkname" size="16">        </td>
        <td align=center> 比例： 
        <input name="order" type="text" class="wenbenkuang" id="order" size="10" onKeyPress="return event.keyCode>=46&&event.keyCode<=57">        </td>
        <td align=center>排序：
        <input name="px" type="text" class="wenbenkuang" id="px" onKeyPress="return event.keyCode>=48&&event.keyCode<=57" value="<%=iiii%>" size="10"></td>
        <td colspan="2" align=center> <input type="submit" name="Submit2" value="添加" class="go-wenbenkuang">        </td>
      </tr>
    </form>
  </table>
  <br>
</center>
<!--#include file="copyright.asp"-->
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>