<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file="../inc/function.asp"-->
<link href="inc_style.css" rel="stylesheet" type="text/css">
<%
	dim sql,rs,id,ok,biaoti,neirong,nurl,laiy,gcla
id=request("id")
if request("chk")="del" then
set rs1=server.createobject("adodb.recordset")
sql1="delete from [jle_news] where id="&cstr(id)
rs1.open sql1,conn,1,3
response.write "<script language=JavaScript>" & chr(13) & "alert('删除信息成功！');" & "history.back()" & "</script>"
response.write "<meta http-equiv=refresh content=""1;URL=admin_notice.asp"">"
response.end
conn.close
set conn=nothing
end if

	set rs=server.createobject("adodb.recordset")
	sql="select * from [jle_news] where id="&cstr(id)
	rs.open sql,conn,1,3
    if request("ok")=1 then
    rs("gcla")=HtmlEncode(request("gcla"))
    rs("biaoti")=HtmlEncode(request("biaoti"))
    rs("laiy")=HtmlEncode(request("laiy"))
    rs("neirong")=ReplaceSI(request("neirong"))
    rs("data")=now()
    rs.update
    response.write "<font size=2>修改成功!</font><br>"
    response.write "<meta http-equiv=refresh content=""1;URL=admin_notice.asp"">"
    response.end
    else
%>
<title>后台管理---修改新闻</title>
<div align="center">
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#cac8c9" height="179" class="table">
<FORM name=theForm method=POST action=?ok=1&id=<%=request("id")%>>
<tr>
<td bgColor="#FEEEBC" colspan="2" align="center" class="tdbar"><b>新闻修改</b></td>
</tr>
<tr>
<td bgColor="#f7f7f7" align="center" class="td">
<span style="FONT-SIZE: 12px">
新闻标题：</span></td>
<td bgColor="#f7f7f7" class="td">
<p align="center">
<span style="FONT-SIZE: 12px">
<input name="biaoti" size="75" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-WEIGHT: bold" tabIndex="1" value="<%=rs("biaoti")%>"></span></td>
</tr>
<tr>
<td bgColor="#f7f7f7" align="center" class="td">
<span style="FONT-SIZE: 12px">
新闻来源：</span></td>
<td bgColor="#f7f7f7" class="td">
<p align="center">
<span style="FONT-SIZE: 12px">
<input name="laiy" size="75" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-WEIGHT: bold" tabIndex="1" value="<%=rs("laiy")%>"></span></td>
</tr>
<tr>
<td bgColor="#f7f7f7" align="center" class="td">
新闻分类<span style="FONT-SIZE: 12px">：</span></td>
<td bgColor="#f7f7f7" class="td">
<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")%>" <%if rs_lei("newsname")=rs("gcla") then%>selected<%end if%>><%=rs_lei("newsname")%></OPTION>
                  <%rs_lei.movenext
				  loop                                                                                                    
		  rs_lei.close:set rs_lei = nothing%>
                </SELECT></td>
</tr>
<tr>
<td bgColor="#f7f7f7" align="center" class="td">
内容：</td>
<td bgColor="#f7f7f7" class="td">
<textarea name="neirong" style="display:none" ><%=rs("neirong")%></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" vAlign="middle" colspan="2" class="td">
<p align="center">
<button name="B1" type="submit">
<font color="#384249"><b>信息修改</b></font></button></td>
</tr>
</form>
</table>
</div>

<%
    end if
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
%>