<!--#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_ManageFunction.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,SkinClass_Id,SkinClass_Name,SkinClass_Memo
SkinClass_Id=Request("SkinClass_Id")
SkinClass_Name=Trim(Request("SkinClass_Name"))
SkinClass_Memo=Request("SkinClass_Memo")
Menu=Request("Menu")
redim SkinClassArray(j,2)
if Menu="UpSkinClass" then
   rs.open"select * from SkinClass where SkinClass_Name='"&SkinClass_Name&"'",conn,1,3
   if not rs.eof and not rs.bof then
      if rs("SkinClass_Id")<>int(SkinClass_Id) then
         Response.Write("<script language=javascript>alert('模板名称存在!');this.location.href='?SkinClass_Id="&SkinClass_Id&"';</script>")
	     Response.End
	  end if
   end if
   rs.close
   rs.open"select * from SkinClass where SkinClass_Id="&SkinClass_Id,conn,1,3
   if not rs.eof and not rs.bof then
	  rs("SkinClass_Name")=SkinClass_Name
	  rs("SkinClass_Memo")=SkinClass_Memo
   rs.update
   rs.close
   Response.Write("<script language=javascript>alert('模板修改成功');parent.window.location.reload();DivOpenClose('',2,0,0);</script>")
   Response.End()
   else
       Response.Write("<script language=javascript>alert('没有找在记录');SkinClassDivClose();</script>")
   end if
end if
rs.open"select * from SkinClass where SkinClass_Id="&SkinClass_Id,conn,1,3
   SkinClassArray(j,0)=rs("SkinClass_Id")
   SkinClassArray(j,1)=rs("SkinClass_Name")
   SkinClassArray(j,2)=rs("SkinClass_Memo")
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="SkinClassFrom" method="post" action="?Menu=UpSkinClass" id="SkinClassFrom" onSubmit="return SkinClassCheck();">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#EEEEEE">
  <tr bgcolor="#FFFFFF">
    <td>模板分类ID</td>
    <td><%=SkinClassArray(i,0)%><input name="SkinClass_Id" type="hidden" value="<%=SkinClassArray(i,0)%>"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>模板分类名称</td>
    <td><input name="SkinClass_Name" type="text" class="inputcss"
	 id="SkinClass_Name" value="<%=SkinClassArray(i,1)%>" size="20"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>模板分类描术</td>
    <td><input name="SkinClass_Memo" type="text" class="inputcss" id="SkinClass_Memo" value="<%=SkinClassArray(i,2)%>" size="20"></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    <td><input name="Submit" type="submit" class="SubmitCss" value="修改模板分类"></td>
  </tr>
</table>
</form>
</BODY>
</HTML>

