<!--#include file="../siteconfig/conn.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录，或者超时了！请重新登录');this.location.href='login.asp';</script>")
Response.End
End if
%>
<!--#include file="Admin_ClassFunction.asp"-->
<HTML>
<HEAD>
<TITLE>分类管理</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
</HEAD>
<script language="JavaScript" type="text/javascript" src="js.js"></script>
<BODY>
<%dim Menu,UrlClass_Name,UrlClass_ClassId,UrlClass_Memo,UrlClass_SkinId,Class_Id,Class_Name,UrlClass_Search
UrlClass_Name=Trim(Request("UrlClass_Name"))
UrlClass_ClassId=Request("UrlClass_ClassId")
Class_Id=Request("Class_Id")
UrlClass_Memo=Request("UrlClass_Memo")
UrlClass_SkinId=Request("UrlClass_SkinId")
UrlClass_Search=Trim(Request("UrlClass_Search"))
Menu=Request("Menu")
if Menu="AddUrlClass" then
   rs.open"select * from UrlClass",conn,1,3
   rs.addnew
      rs("UrlClass_Name")=UrlClass_Name
	  rs("UrlClass_ClassId")=UrlClass_ClassId
	  rs("UrlClass_Memo")=UrlClass_Memo
	  rs("UrlClass_SkinId")=UrlClass_SkinId
	  rs("UrlClass_Search")=UrlClass_Search
   rs.update
   rs.close
   Response.Write("<script language=javascript>alert('子分类添加成功');parent.window.location.reload();DivOpenClose('',2,0,0);</script>")
   Response.End()
end if
rs.open"select Class_Id,Class_Name from Class where Class_Id="&Class_Id,conn,1,3
    Class_Id=rs("Class_Id")
	Class_Name=rs("Class_Name")
rs.close
%>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#EEEEEE">
  <tr>
    <td width="45%">添加子分类</td>
    <td width="55%" align="right"><a href="#" onClick="javascript:DivOpenClose('',2,0,0);return false">关闭</a></td>
  </tr>
</table>
<form name="UrlClassFrom" method="post" action="?Menu=AddUrlClass" id="UrlClassFrom" onSubmit="return UrlClassCheck();">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#EEEEEE">
  <tr bgcolor="#FFFFFF">
    <td>子分类名称</td>
    <td><input name="UrlClass_Name" type="text" class="inputcss" id="UrlClass_Name" size="15"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>主分类</td>
    <td><%=Class_Name%><input name="UrlClass_ClassId" type="hidden" class="inputcss" id="UrlClass_ClassId" value="<%=Class_Id%>" size="15"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>描术</td>
    <td><input name="UrlClass_Memo" type="text" class="inputcss" id="UrlClass_Memo" size="15"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>相关搜索</td>
    <td><input name="UrlClass_Search" type="text" class="inputcss" id="UrlClass_Search" size="15"> 每个关键字以,分格最多50个字节</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>样式</td>
    <td><input name="UrlClass_SkinId" type="text" class="inputcss" id="UrlClass_SkinId" size="10"> 样式ID号默认最好不改</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    <td><input name="Submit" type="submit" class="SubmitCss" value="添加分类"></td>
  </tr>
</table>
</form>
</BODY>
</HTML>

