<!--#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 action,sd_classname,sd_topid
sd_classname=request("sd_classname")
sd_topid=request("sd_topid")
action=request("action")
if action="add" then
if sd_classname="" then
Response.Write ("<script language=javascript>alert('表单不完整！');this.location.href='sd_class_add.asp';</script>")
else
set r=server.createobject("adodb.recordset")
r.open "select * from sd_class",conn,1,3
r.addnew
r("sd_classname")=sd_classname
r("sd_topid")=sd_topid
r.update
r.close
set r=nothing
Response.Write ("<script language=javascript>alert('添加分类成功！');this.location.href='sd_class.asp';</script>")
Response.End
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>
<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_add.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"></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">推荐指数：</td>
    <td bgcolor="#FFFFFF"><input name="sd_topid" size="10"> 0-100,数字越大，排名越靠前 默认为0</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">　</td>
    <td bgcolor="#FFFFFF"><input type="hidden" name="action" value="add"><input type="submit" value="立即添加"></td>
  </tr>
</form>
</table>
<!--#include file="sd_copy.asp"-->
</body>
</html>