<%response.buffer=true%>

<!--#include file="conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="../fuction.asp"-->

<%  id=nosql(int(request.querystring("id")))
url=nosql(request.form("url"))
 bid=nosql(int(request.querystring("bid")))
    if id="" or  not isnumeric(id) then
response.write"错误的请求"
response.end 
end if

username=nosql(session("username"))
password=nosql(session("userpassword"))
  if username="" or password="" then
    response.redirect"login.asp"
    end if

  
  body=ContentEncode(request.form("body"))
  title=request.form("title")
  title = nosql(title)

    faceimg=nosql(trim(request.form("faceimg")))
    if isempty(body) or body="" then
     response.write"<script language='javascript'>alert('内容不能为空')</script>"
      response.write "<script language='javascript'>history.back(-1)</script>"
      end if
set rs=server.createobject("adodb.recordset")
sql="select * from book where id="&id
rs.open sql,conn,3,3
  rs("body")=body
  rs("title") = title
  rs("faceimg")=faceimg
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
 response.redirect url



%>

