<!--#Include file="include/top.asp"-->
<HTMl>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>分类管理</TITLE>
<LINK rel="stylesheet" href="include/css.css"  type="text/css">
<SCRIPT language="VBScript">
Sub AddSubmit_OnClick
  If trim(form2.className.value)=Empty Then
    MsgBox "请填写分类名称！"
    Document.form2.className.Focus()
    Exit Sub
  End If
  form2.Submit
End Sub
</SCRIPT>
</HEAD>
<BODY>
<TABLE width="400" border="1" align="center" bordercolor="#000000">
  <%
  getConn()
  classSql="select * from Class where UserName='"&Session("userName")&"'"
  rs.Open classSql,conn,1,3
  %>
  <TR align="center" class="tr"> 
    <TD height="25" width="250">分类名称</TD>
    <TD>操作</TD>
  </TR>
  <%While Not rs.eof%>
  <FORM name="form1" method="post" action="editClassPost.asp">
  <TR align="center" class="td"> 
    <TD height="25" width="250"><input name="className" type="text" value="<%=rs("ClassName")%>" size="30"></TD>
    <TD>
      <input type="hidden" name="act" value="modify">
	  <input type="hidden" name="classId" value=<%=rs("id")%>>
	  <input type="submit" name="Submit1" value="修改" onclick="return checkForm(this.form);"> 
      <A href="editClassPost.asp?classId=<%=rs("id")%>&act=delete" onClick="return confirm('此操作将删除类别和类别下的所有联系人，确定要删除吗？');">删除</A></TD> 
  </TR>
  </FORM>
  <%rs.Movenext()
  Wend
  Set rs=Nothing
  %>
</TABLE>
<TABLE width="400" border="1" align="center" bordercolor="#000000">
    <TR align="center" class="td"> 
		<FORM name="form2" method="post" action="editClassPost.asp">
		  <TD height="25" width="250"><input name="className" type="text" size="30"></TD>
          <TD><input type="hidden" name="act" value="new">
		    <input type="button" name="AddSubmit" value="添加分类">
	      </TD>
		</FORM>
    </TR>
</TABLE>
<%Set conn=Nothing%>
</BODY>
</HTMl>
<!--#Include File="include/bottom.htm"-->