<!--#include file="conn.asp"-->
<!--#include file="seeion.asp"-->
<!--#include file="fckeditor/fckeditor.asp"-->
<%
Dim Angel_languageid
    Angel_languageid=Trim(request.QueryString("Languageid"))
If Angel_languageid="" Then 
    Angel_languageid=1
Else
    Angel_languageid=Angel_languageid
End If 
Angel_main_id = request("Angel_main_id")
id = request("id")
If request("submit") = "确定修改" Then
    sql = "select * from Angel_news where Angel_id="&id
    Set rs = server.CreateObject("adodb.recordset")
    rs.Open sql, conn, 1, 3
    rs("Angel_title") = request.Form("Angel_title")
	rs("Angel_SeoKeywords") = request.Form("Angel_SeoKeywords")
    rs("Angel_SeoDescription") = request.Form("Angel_SeoDescription")
    rs("Angel_body") = request.Form("Angel_body")
    rs("Angel_category") = request.Form("Angel_category")
    rs("Angel_author") = request.Form("Angel_author")
    rs("Angel_source") = request.Form("Angel_source")
    rs.update
    rs.Close
    response.Write "<script>alert('新闻修改成功！');window.location.href='Managementnews.asp';</script>"
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=gb2312" />
<title>Angel_asp工作室网站后台管理系统</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="header.asp"-->
<div id="top_banner" class="layout"></div>
<div id="content" class="layout">
  <!--#include file="left.asp"-->
  <div id="right">
    <div class="right_title">
      <h2>修改新闻</h2>
      <%
Set rs = server.CreateObject("adodb.recordset")
exec = "select * from Angel_news where Angel_id="& request("id")
rs.Open exec, conn, 1, 1
%>
    </div>
    <div class="right_body">
      <table class="table">
        <form method="post" name="Angel">
          <tr>
            <td width="13%">新闻标题：</td>
            <td width="87%"><input name="id" type="hidden" value="<%=request("id")%>" />
              <input name="Angel_title" type="text" value="<%=rs("Angel_title")%>" size="80"></td>
          </tr>
           <tr>
            <td align="center">关键字：</td>
            <td><input name="Angel_SeoKeywords" type="text" size="100" value="<%=rs("Angel_SeoKeywords")%>" /></td>
          </tr>
		   <tr>
            <td align="center">描述：</td>
            <td><input name="Angel_SeoDescription" type="text" size="100" value="<%=rs("Angel_SeoDescription")%>" /></td>
          </tr>

          <tr>
            <td>新闻分类：</td>
            <td><select name="Angel_category" >
                <%
Set rss = conn.Execute("select * from Angel_news_category where 1=1 and Angel_languageid="&Angel_languageid&" ")
Do While Not rss.EOF
    If rs("Angel_category") = rss("Angel_id") Then
        response.Write("<option value=""" & rss("Angel_id") & """ selected>" & rss("Angel_title") & "</option>")
    Else
        response.Write("<option value=""" & rss("Angel_id") & """>" & rss("Angel_title") & "</option>")
    End If
    rss.movenext
Loop
rss.Close
Set rss = Nothing

%>
              </select></td>
          </tr>
          <tr>
            <td>作者：</td>
            <td><input name="Angel_author" type="text" value="<%=rs("Angel_author")%>" /></td>
          </tr>
          <tr>
            <td>来源：</td>
            <td><input name="Angel_source" type="text" value="<%=rs("Angel_source")%>" /></td>
          </tr>
          <tr>
            <td height="300">详细内容：</td>
            <td>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "fckeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "100%"
oFCKeditor.Height = "360"
oFCKeditor.Value = rs("Angel_body")
oFCKeditor.Create "Angel_body"
%>
          </tr>
          <tr>
            <td height="34" colspan="2"><p class="submit">
                <input name="submit" type="submit" value="确定修改" />
              </p></td>
          </tr>
        </form>
      </table>
    </div>
  </div>
  <div class="clear"></div>
</div>
<!--#include file="footer.asp"-->
