<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file="../inc/function.asp"-->
<%
if request("chk")="add" then
	dim sql,rs,biaoti,neirong,laiy,gcla
	if request("biaoti")="" then
Response.Write "<script language='javascript'>alert('请输入标题!');history.back();</script>" 
	response.end
	else
	biaoti=HtmlEncode(request("biaoti"))
	end if
	'if request("laiy")="" then
'Response.Write "<script language='javascript'>alert('请输入新闻来源!');history.back();</script>" 
	'response.end
	'else
	laiy=HtmlEncode(request("laiy"))
	'end if
	if request("gcla")="选择新闻类别" then
Response.Write "<script language='javascript'>alert('请选择新闻类别!');history.back();</script>" 
	response.end
	else
	gcla=HtmlEncode(request("gcla"))
	end if
	if request("neirong")="" then
Response.Write "<script language='javascript'>alert('请输入内容!');history.back();</script>" 
	response.end
	else
	neirong=ReplaceSI(request("neirong"))
	end if
	set rs=server.createobject("adodb.recordset")
	sql="select * from [jle_news]"
	rs.open sql,conn,1,3
	rs.addnew
    rs("gcla")=gcla
    rs("biaoti")=biaoti
    rs("laiy")=laiy
    rs("neirong")=neirong
    rs("data")=now()
    rs.update
response.write "<p align=""center"">添加成功！</p>"
response.write "<meta http-equiv=refresh content=""1;URL=admin_notice.asp"">"  
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
else
%>
<body topmargin="0">
<div align="center">
<title>增加新闻</title><link href="inc_style.css" rel="stylesheet" type="text/css">
<center>
  <table width="90%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
    <form name=theForm method=POST action=?chk=add>
      <tr align="center" bgcolor="#FFFFFF" height="20">
        <td align="center" height="29"  class="tdbar" colspan="3"><p style="MARGIN-LEFT: 6px" align="center"> <b>添加新闻</b></td>
      </tr>
      <tr>
        <td width="264" height="43" align="right"  class="tdbar" > 标题：</td>
        <td  width="858"><input name="biaoti" size="91" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-SIZE: 11px; FONT-WEIGHT: bold" tabindex="1" maxlength="50"></td>
      </tr>
      <tr>
        <td align="right"  class="tdbar" > 新闻来源： </td>
        <td colspan="2"><input name="laiy" size="91" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-SIZE: 11px; FONT-WEIGHT: bold" tabindex="1" maxlength="50"></td>
      </tr>
      <tr>
        <td align="right"  class="tdbar" > 新闻类别： </td>
        <td  width="858"><select name="gcla" size="1">
          <option selected value="选择新闻类别">选择新闻类别</option>
          <%set rs_lei = server.createobject("adodb.recordset")
				   sql = "select * from jle_newsfl"
				  rs_lei.open sql,conn,1,1
				  do while not rs_lei.eof%>
          <option value="<%=rs_lei("newsname")%>"><%=rs_lei("newsname")%></option>
          <%rs_lei.movenext
				  loop                                                                                                    
		  rs_lei.close:set rs_lei = nothing                           
		  conn.close:set conn=nothing%>
        </select></td>
      </tr>
      <tr>
        <td align="right"  class="tdbar" > 内容：</td>
        <td  width="858">
         
         <textarea name="neirong" cols="80" rows="10" id="Content" style="display:none"></textarea><IFRAME ID="eWebEditor" SRC="Editor/ewebeditor.htm?id=neirong&style=laoy" FRAMEBORDER="0" SCROLLING="no" WIDTH="600" HEIGHT="350"></IFRAME>
 </td>
      </tr>
      <tr>
        <td bgcolor="#f7f7f7" height="43" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" colspan="2"><p align="center">
          <button name="B1" type="submit"><u>添加</u></button>
        </td>
      </tr>
    </form>
  </table>
</center><%end if%>