<!-- #include file="../inc/conn.asp"-->
<!-- #include file="../config.asp"-->
<%
if request("action")="add" then
      set rs1=server.CreateObject("adodb.recordset")
	  sql="select * from help_news"
	  rs1.open sql,conn,3,3
	  rs1.addnew
	  rs1("class_id")=request("class_id")
      rs1("title")=trim(request("title"))
	  rs1("content")=request("content")
	  rs1("date")=now()
	  rs1.update
	  rs1.close
  Response.write "<script>alert('信息添加成功！');location.href=""add.asp"";</script>"
end if
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
	color: #333333;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<script language="javascript" type="text/javascript" src="../../js/js.js"></script> 
<script language="javascript">
function chk(){
if(form1.title.value!=''){
	if(containInvalidChartwo(form1.title.value)){
	alert("标题中包含非法字符!");
	form1.title.focus();
	return;
	}
}
  with (document.form1)
       {
	    if (class_id.value=='')
		    {
			  alert("请选择信息类别！");
			  class_id.focus();
			}
	    else if (title.value=='')
		    {
			  alert("请填写信息标题！");
			  title.focus();
			}
	    else
		    {
			  form1.action="?action=add";
			  form1.submit();
			}		
	   }
}
</script>
</head>
<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="70" background="../images/right_top.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="35"><!-- #include file="../right_top.asp"--></td>
        </tr>
        <tr>
          <td height="35">&nbsp;当前位置：后台管理 &gt; 帮助中心 &gt; 帮助信息添加</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="5"></td>
  </tr>
</table>  
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
	
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#AAC1DE">
<form name="form1" method="post" action="">
    <tr>
      <td width="100" bgcolor="#EFF5FB"><div align="center">信息类别：</div></td>
      <td bgcolor="#FFFFFF"><select name="class_id">
                  <option value="">请选择类别</option>
		<%
        set rst=server.createobject("adodb.recordset")
        sql = "select * from help_class order by id asc"
        rst.open sql,conn,3,3
		do while not rst.eof
		%>
				  <option value="<%= rst("id")%>"><%= rst("class_name")%></option>
		<%rst.movenext 
		LOOP
		rst.close%>
            </select>*</td>
      </tr>
    <tr>
      <td bgcolor="#EFF5FB"><div align="center">信息标题：</div></td>
      <td bgcolor="#FFFFFF"><input name="title" type="text" size="60">
        *</td>
    </tr>
    <tr>
      <td bgcolor="#EFF5FB"><div align="center">信息详情：</div></td>
      <td bgcolor="#FFFFFF"><IFRAME ID="eWebEditor1" SRC="../../edit_tool/edit_tools.htm?id=content&style=blue" FRAMEBORDER="0" SCROLLING="no" width="100%" height="450"></IFRAME><input name=content type=hidden ID="content" value=""></td>
    </tr></form>
</table>
    </td>
  </tr>
  <tr>
    <td height="50">
      <input name="Submit2" type="button" style="background-image:url(../images/bottom3.gif); width:82px;height:22px; border-width:0; cursor:hand;padding-top:2px;" value="添加信息" onClick="chk()"/></td></tr>
</table>
</body>
</html>
