<!--#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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #000000;
	font-weight: bold;
}
.STYLE2 {color: #FF0000}
-->
</style></head>
<body>
<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">
      <tr>
        <td width="1%" height="28">&nbsp;</td>
        <td width="99%"><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="STYLE2">* 为必添项目</span></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<br>
<table border="0" width="95%" cellpadding="3" cellspacing="1" style="border-collapse: collapse" bgcolor="#999999" >
    <form method="post" action="danwei_save.asp?action=update">
      <tr align=center bgcolor="#CCCCCC"> 
        <td>序号</td>
        <td>单位名称</td>
        <td>排序(必填项，数字)</td>
        <td>&nbsp;</td>
      </tr>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT  * From shop_danwei  order by danweiorder",conn,1,1
if rs.recordcount=0 then 
%>
      <tr bgcolor="#F3F3F3"> 
        <td width="100" colspan="8" align="center"> 还没有添加单位 </td>
      </tr>
<%
else
iiii=1
    do while not rs.eof
%>
      <tr bgcolor="#F3F3F3"> 
        <td align=center bgcolor="#F3F3F3"><%=rs("ID")%></td>
        <td align=center> 
          <input type="hidden" name="danweiid" value="<%=rs("id")%>">
          <input  class="wenbenkuang" type="text" name="danweiname" size="20" value="<%=trim(rs("danweiname"))%>">        </td>
        <td align=center> 
          <input  class="wenbenkuang" type="text" name="danweiorder" size="10" value="<%=rs("danweiorder")%>" ONKEYPRESS="event.returnValue=IsDigit();" >        </td>
        <td align=center> <a href="danwei_kill.asp?danweiid=<%=rs("id")%>">删除</a>        </td>
      </tr>
      <%
	  iiii=iiii+1
    rs.MoveNext
    Loop
%>
      <tr bgcolor="#F3F3F3"> 
        <td width="100%" colspan="8" align="center"> 
          <input type="submit" name="Submit2" 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>
    <form method="post" action="danwei_save.asp?action=add">
      <tr height=25 bgcolor="#F3F3F3">
        <td rowspan="2" align=center bgcolor="#CCCCCC"><strong>添加单位</strong></td>
        <td align=center bgcolor="#CCCCCC">单位名称</td>
        <td align=center bgcolor="#CCCCCC">排序(必填项，数字)</td>
        <td colspan="2" align=center bgcolor="#CCCCCC">&nbsp;</td>
      </tr>
      <tr height=25 bgcolor="#F3F3F3"> 
        <td align=center> 
          <input  class="wenbenkuang" type="text" name="danweiname" size="20"></td>
        <td align=center> 
          <input name="danweiorder" type="text"  class="wenbenkuang" ONKEYPRESS="event.returnValue=IsDigit();" value="<%=iiii%>" size="10">        </td>
        <td colspan="2" align=center> 
          <input type="submit" name="Submit2" value="添加"  class="go-wenbenkuang">        </td>
      </tr>
    </form>
  </table>
</center>
<!--#include file="copyright.asp"-->
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>