<!--#include file="sd_mdb.asp"-->
<%
if session("User")="" then
	response.write"<SCRIPT language=JavaScript>alert('您尚未登录！');location.href=""sd_admin_login.asp"";</SCRIPT>"
end if
dim modify,classid,sd_classname,sd_topid
classid=request("classid")
if classid="" then
response.write "参数丢失!"
Response.End
end if
modify=request("modify")
sd_classname=request("sd_classname")
sd_topid=request("sd_topid")
if modify="yes" then
if sd_classname="" then
Response.Write ("<script language=javascript>alert('表单不完整！');this.location.href='sd_class_edit.asp';</script>")
else
set r=server.createobject("adodb.recordset")
r.open "select * from sd_class where classid="&classid,conn,1,3
if not r.eof then
r("sd_classname")=sd_classname
r("sd_topid")=sd_topid
r.update
Response.Write "<script language=javascript>alert('修改成功！');this.location.href='sd_class.asp';</script>"
end if
r.close
set r=nothing
end if
end if
%>
<html>
<head>
<TITLE>雨过天晴工作室 www.adminchn.com</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="images/Admin_css.css" type=text/css rel=stylesheet>
</head>
<body>
<table width="95%" border="0" cellspacing="2" cellpadding="3"  align=center class="admintable" style="margin-bottom:5px;">
    <tr>
      <td height="25" bgcolor="f7f7f7">
<input type="button" name="button" value="管理分类" class="bnt" onClick="window.location.href='sd_class.asp'" />
<input type="button" name="button" value="添加分类" class="bnt" onClick="window.location.href='sd_class_add.asp'" />
	</td>
    </tr>
</table>
<script language="javascript">
function form_onsubmit()
{
if (document.form.sd_classname.value==""){
alert("分类名称不能为空");
return false;
}

}
</script>
<%
set r=server.createobject("adodb.recordset")
r.open "select * from sd_class where classid="&classid,conn,1,3
if not r.eof then
%>
<table height="1" border="0" cellpadding="3"  cellspacing="1" bgcolor="#F2F9E8" class="admintable1">
  <tr>
    <td colspan="2" class="admintitle">修改分类</td>
  </tr>
<form action="sd_class_edit.asp" method="post" name="form" onSubmit="return form_onsubmit()">
  <tr>
    <td width="20%" height="30" align="right" bgcolor="#FFFFFF">分类名称：</td>
    <td width="80%" bgcolor="#FFFFFF"><input name="sd_classname" size="30" value="<%=r("sd_classname")%>"></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">推荐指数：</td>
    <td bgcolor="#FFFFFF"><input name="sd_topid" size="10" value="<%=r("sd_topid")%>"> 0-100,数字越大，排名越靠前 默认为0</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">　</td>
    <td bgcolor="#FFFFFF"><input name="classid" value='<%=r("classid")%>' type='hidden'><input name="modify" value="yes" type="hidden"><input type="submit" value="立即修改"></td>
  </tr>
</form>
</table>
<%
end if
r.close
set r=nothing
%>
<!--#include file="sd_copy.asp"-->
</body>
</html>