<!--#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 id,action
sd_title=request.form("sd_title")
sd_Author=request.form("sd_Author")
sd_CopyFrom=request.form("sd_CopyFrom")
sd_ArtKeyWord=request.form("sd_ArtKeyWord")
sd_ArtDescription=request.form("sd_ArtDescription")
sd_content=request.form("sd_content")
sd_hot=request.form("sd_hot")
action=request("action")
if action="add" then
if sd_title="" then
	Response.Write ("<script language=javascript>alert('文章标题必须填写！');history.back(-1);</script>")
else
set r=server.createobject("adodb.recordset")
r.open "select * from sd_article",conn,1,3
r.addnew
r("sd_title")=sd_title
r("sd_Author")=sd_Author
r("sd_CopyFrom")=sd_CopyFrom
r("sd_ArtKeyWord")=sd_ArtKeyWord
r("sd_ArtDescription")=sd_ArtDescription
r("sd_hot")=sd_hot
r("sd_content")=sd_content
r.update
r.close
set r=nothing
Response.Write ("<script language=javascript>alert('添加文章成功！');this.location.href='sd_article.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">
<FORM name=sou1 action="sd_article.asp?seo=1" method=POST>
    按名称：
    <input type="text" name="T1" size="10" class="s26" value="<%=trim(request("t1"))%>">
    <input type="submit" value="查 找" name="B1" class="bnt">
    </form></td>
      <td width="550" bgcolor="f7f7f7">
<input type="button" name="button" value="所有文章" class="bnt" onClick="window.location.href='sd_article.asp?seo='" />
<input type="button" name="button" value="热门文章" class="bnt" onClick="window.location.href='sd_article.asp?seo=3'" />
<input type="button" name="button" value="添加文章" class="bnt" onClick="window.location.href='sd_article_add.asp'" />
</td>
    </tr>
</table>

<table height="1" border="0" cellpadding="3"  cellspacing="1" bgcolor="#F2F9E8" class="admintable1">
  <tr>
    <td colspan="2" class="admintitle">添加文章</td>
  </tr>
<form action="sd_article_add.asp" id="form2" name="form2" method="post" onSubmit="return load_content();">
<input type="hidden" name="action" value="add">
  <tr>
    <td width="20%" height="30" align="right" bgcolor="#FFFFFF">文章标题：</td>
    <td width="80%" bgcolor="#FFFFFF"><input name="sd_title" type="text" id="sd_title" size="50" maxlength="100"/></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">文章作者：</td>
    <td bgcolor="#FFFFFF"><input name="sd_Author" size="20" class="borderall"> <font color="#ff0000">* 不可为空</font></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">文章来源：</td>
    <td bgcolor="#FFFFFF"><input name="sd_CopyFrom" size="30" class="borderall"> <font color="#ff0000">* 不可为空</font></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">关键词：</td>
    <td bgcolor="#FFFFFF"><input name="sd_ArtKeyWord" size="60" class="borderall"> 用 , 分割</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">描述：</td>
    <td bgcolor="#FFFFFF"><textarea id="sd_ArtDescription" name="sd_ArtDescription" cols="80%" rows="5"></textarea></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">详细内容：<br><br><font color="#ff0000">* 不可为空</font></td>
    <td bgcolor="#FFFFFF"><SCRIPT language="javascript">
var Sm="";//----编辑器的网址
var Se="SDEdit/";//----编辑器的文件夹
var sy="919B9C";//----边框深一点的颜色
var qy="ECE9D8";//----背景浅一点的颜色
var by="FCFCFC";//----背景白色的底纹
var an="sd_content";//----所要编辑的文本框名称
</script>
<SCRIPT language="JavaScript" src="SDEdit/sdEdit.js" charset="gb2312"></SCRIPT>  
<textarea name="sd_content" id="sd_content" cols="88" rows="8" style="display:none;"><p></p></textarea></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">是否热门：</td>
    <td bgcolor="#FFFFFF"><input type="radio" value="0" checked name="sd_hot">否　<input type="radio" value="1" name="sd_hot">是</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#FFFFFF">　</td>
    <td bgcolor="#FFFFFF"><input type="submit" value="立即添加"></td>
  </tr>
</form>
</table>
<!--#include file="sd_copy.asp"-->
</body>
</html>