<%
login_check(1)if request.QueryString("action")="submit" thentitle=trim(request.Form("title"))
title=sqlstr(title)author=trim(request.Form("author"))
author=sqlstr(author)keywords=trim(request.Form("keywords"))
keywords=sqlstr(keywords)sortid=trim(request.Form("sortid"))
sortid=sqlstr(sortid)
if sortid = "" then sortid=0speid=trim(request.Form("speid"))
speid=sqlstr(speid)
if speid = "" then speid=0adminid=trim(session("adminid"))
adminid=sqlstr(adminid)content=trim(request.Form("content"))
content=sqlstr(content)chars=0
set rs_sort=conn.execute("select chars from sort where id="&sortid)
if not rs_sort.eof then
if rs_sort("chars")>0 then chars=rs_sort("chars")
end ifSet re = New RegExp
re.Pattern = "<[^>]+>"
re.Global = True
re.IgnoreCase = True
re.MultiLine = True
c = re.Replace(content,"")
if chars>0 and len(c)<chars then
alert("新闻字数不能少于"&chars)
end ifcomment=trim(request.Form("comment"))
comment=sqlstr(comment)if comment="" then comment=0if request.Form("abs_link")<>"" then
href=trim(request.Form("href"))
href=sqlstr(href)
end ifif title="" or content="" then alert("标题和内容都不能为空")
if adminid="" then alert("err")sql="insert into content([title],author,[keywords],content,adminid,href,sortid,speid,comment) values('" & title & "','" & author & "','" & keywords & "','" & content & "'," & adminid & ",'" & href & "'," & sortid & "," & speid & ","& comment &")"
'response.Write(sql)
'response.End()
conn.execute(sql)
SET rs=conn.execute("select top 1 id from content order by id desc")
contentid=rs("id")for i=1 to 20
filename=request.Form("file"&i)
file_info=request.Form("infor"&i)filename=sqlstr(filename)
file_info=sqlstr(file_info)if filename<>"" and file_info<>"" then
conn.execute("insert into file(path,intro,adminid,contentid,show) values('"&filename&"','"&file_info&"',"&adminid&","&contentid&",1)")
end if
nextif request.QueryString("upload")="upload" then
alert("<script>alert('添加成功,继续添加图片');location.href='file_up.asp?contentid=" & contentid & "';</script>")
else
alert("<script>alert('添加成功');location.href='content_add.asp';</script>")
end ifend if
sortid=trim(request.QueryString("sortid"))
if sortid="" then sortid=0
%>
问题出在哪里 请帮忙啊