<!--#include file="conn.asp" -->
<!--#include file="inc/IsLogin.asp" -->
<%
dim id,act
id=cint(Trim(Request("id")))
act=Trim(Request.QueryString("act"))

if act="modify" then
call Modify_News(id)

Call Closeconn()

AlertInform "修改成功","News_list.asp"
end if
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>文章修改</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/reg.js"></script>
<script type="text/javascript" src="js/reg.js"></script>
<script charset="utf-8" src="../editor/kindeditor.js"></script>             
<script charset="utf-8" src="../editor/lang/zh_CN.js"></script>             
<script charset="utf-8" src="../editor/plugins/code/prettify.js"></script>             
    <script type="text/javascript">             
        KindEditor.ready(function(K) {             
            var editor = K.create('textarea[name="content"]', {             
                cssPath : '../editor/plugins/code/prettify.css',             
                uploadJson : '../editor/asp/upload_json.asp',             
                fileManagerJson : '../editor/asp/file_manager_json.asp',             
                allowFileManager : true,             
                afterCreate : function() {             
                    var self = this;             
                    K.ctrl(document, 13, function() {             
                        self.sync();             
                        K('form[name=form1]')[0].submit();             
                    });             
                    K.ctrl(self.edit.doc, 13, function() {             
                        self.sync();             
                        K('form[name=form1]')[0].submit();             
                    });             
                }             
            });             
            prettyPrint();             
        });             
    </script>
	
	 
</head>
<% 
 

if id="" then call OutAlertScript("请正确勾选您要修改的记录")

sql="Select * From News where id =" &id
set rs=conn.execute(sql)
	
	 
 
	bid=rs("bid")
	content = rs("content")
	title = rs("title")
	 
	
 %>
<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="index.asp">首页</a></li>
    <li>修改文章</li>
    </ul>
    </div>
    <form name="form1" method="post" action="News_modify.ASP?act=modify&id=<%=id%>" >
    <div class="formbody">
    
    <div class="formtitle"><span>添加文章</span></div>
    
    <ul class="forminfo">
    <li>
      <label>文章名称</label>
	  <input name="title" type="text" class="dfinput" id="title" value="<%=title%>" />
    </li>
    <li>
      <label>文章分类</label>
	  
<select name="bid" size="1" id="bid" class="dfinput1" >
 
	<%	
sqlb= "select * from big"
set rsb=conn.execute(sqlb) 
while not rsb.eof
%>
<option value="<%=trim(rsb("id"))%>"<% If rsb("id")=bid Then response.Write "selected"%>><%=rsb("bname")%></option>
<%
rsb.movenext
wend
 
rsb.close
%>
</select> 
 
	  
	  
    </li>
    
	  <li><label>文章介绍</label>
      <textarea id="content" name="content" style="width:700px;height:400px;visibility:hidden;"><%=content%></textarea></li>
	  
	  
    <li><label>&nbsp;</label><input name="submit" type="submit" class="btn" id="btn" value="确认保存"/>
	
	  &nbsp;&nbsp;&nbsp;<label>&nbsp;</label>
	<input name="Button" type="button" class="btn" id="btn" value="返回上页" onclick="history.go(-1)"/>
	
    </li>
    </ul>
    
    
    </div>
</form>
</body>

</html>
<% Call Closeconn() %>
