<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn.asp"-->
<%
id = request("id")
Set rs = server.CreateObject("adodb.recordset")
    sql = "select * from news where id="&id
    rs.Open sql, conn, 1, 3
    title = request.Form("title")
    category = request.Form("category")
    keywords = request.Form("keywords")
    Description = request.Form("description")
    author = request.Form("author")
    Source = request.Form("source")
    body = request.Form("body")
    recommendatory = request.Form("recommendatory")
    If title = "" Then
        response.Write("<script language=javascript>alert('标题不能为空！');history.go(-1)</script>")
        response.End
    End If
    If body = "" Then
        response.Write("<script language=javascript>alert('详细内容不能为空！');history.go(-1)</script>")
        response.End
    End If
    rs("title") = title
    rs("category") = category
    rs("keywords") = keywords
    rs("description") = Description
    rs("author") = author
    rs("source") = Source
    rs("body") = body
    rs("recommendatory") = recommendatory
    rs.update
    rs.Close
    Set rs = Nothing
    conn.Close
    Set rs = Nothing
response.Write "<script language=javascript>alert('修改成功！');window.location.href='news.asp';</script>"
%>
