详细说明: <% if request.cookies("username")="" then response.redirect "login.asp" end if function htmlencode(str) htmlencode=replace(replace(str,chr(13)," "),"'","''") end function dim rs,sql set rs=server.createobject("adodb.recordset") if request.querystring="add" then if request("title")="" then response.write "
没有填写完必须的内容!新闻没有保存...
" else sql="select * from news where id is null" rs.open sql,conn,1,3 rs.addnew rs("cataid")=request("cataid") rs("title")=request("title") rs("adddate")=date() rs("content")=htmlencode(request("content")) rs("hits")=1 rs.update rs.close response.write "