<!--#include file="conn1.asp"-->
<!--#include file="session2.asp"-->

<%
dim newsid
newsid=request.QueryString("id")
if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from wq_news where newsid="&newsid,conn,1,3
rs("newsname")=trim(request("newsname"))
rs("addname")=trim(request("addname"))
body=trim(Request.Form("body"))
rs("newscontent")=body
rs("adddate")=now()
rs("fenlei")=trim(request.Form("fenlei"))
rs.update
rs.close
set rs=nothing
session("content")=""
response.write "<script language=javascript>alert('修改成功！');window.location.href='editnews.asp';</script>"
response.End
end if
%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="skins/css/main.css" rel="stylesheet" type="text/css">


<!-- 编辑器开始 -->

<link rel="stylesheet" href="kindeditor_4.1.5/themes/default/default.css" />
	<link rel="stylesheet" href="kindeditor_4.1.5/plugins/code/prettify.css" />
	<script charset="utf-8" src="kindeditor_4.1.5/kindeditor.js"></script>
	<script charset="utf-8" src="kindeditor_4.1.5/lang/zh_CN.js"></script>
	<script charset="utf-8" src="kindeditor_4.1.5/plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="body"]', {
				cssPath : 'kindeditor_4.1.5/plugins/code/prettify.css',
				uploadJson : 'kindeditor_4.1.5/asp/upload_json.asp',
				fileManagerJson : 'kindeditor_4.1.5/asp/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
		
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="ebody"]', {
				cssPath : 'kindeditor_4.1.5/plugins/code/prettify.css',
				uploadJson : 'kindeditor_4.1.5/asp/upload_json.asp',
				fileManagerJson : 'kindeditor_4.1.5/asp/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>


<!--编辑器结束 -->


</head>
<body>





<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from wq_news where newsid="&newsid,conn,1,1%>
  <form name="form1" method="post" action="newsedit.asp?action=save&id=<%=newsid%>" >
  <table cellpadding="3" cellspacing="1" border="0" width="100%" class="tableBorder" align=center>
    <tr> 
      <th class="td_title"  colspan=6 height=25>修改新闻</th>
    </tr>
    <tr> 
      <td width="9%" class="td_content" align=right>新闻主题：</td>
      <td width="91%" class="td_content">&nbsp;&nbsp;
	  <input name="newsname" type="text" id="newsname" value="<%=trim(rs("newsname"))%>" size="90">	</td>
    </tr>
	
	
	
   <tr> 
      <td width="9%" class="td_content" align=right>新闻分类：</td>
      <td width="91%" class="td_content">&nbsp;&nbsp;
	  	<label>
	  	<input name="fenlei" type="radio" value="楼市快讯"  <%if rs("fenlei")="楼市快讯" then%>checked<%end if%> >
	  	</label>楼市快讯	<label>
	  	<input type="radio" name="fenlei" value="行业新闻" <%if rs("fenlei")="行业新闻" then%>checked<%end if%>>
	  	</label>行业新闻<label>
	  	<input type="radio" name="fenlei" value="居家装修" <%if rs("fenlei")="居家装修" then%>checked<%end if%>>
	  	</label>居家装修<label>
	  	<input type="radio" name="fenlei" value="购房小贴士" <%if rs("fenlei")="购房小贴士" then%>checked<%end if%>>
	  	</label>购房小贴士</td>
    </tr>
	
	
	

	
	
	
	
	
    <tr> 
      <td  class="td_content"align=right>发 表 人：</td>
      <td class="td_content"> &nbsp;&nbsp;&nbsp;<input name="addname" type="text" id="addname" value="<%=trim(rs("addname"))%>" size="30">      </td>
    </tr>
    <tr> 
      <td align="right" class="td_content">新闻分类</td><td  align="left" valign="top" class="td_content" style="padding-left:0px;"><textarea id="content1" name="body" cols="100" rows="8" style="width:700px;height:400px;visibility:hidden;">
	<%=replace(rs("newscontent"),"'","&#39;")%></textarea>
</td>
    </tr>
    <tr> 
      <td colspan="2" bgcolor="#EEF7FD"  align="center">
          <input class="button" type="submit" name="Submit" value="修&nbsp;&nbsp;改"  style="width:100px; height:30px;">
        
        </td>
    </tr>
  </table>
</form>
<br>

</body>
</html>
