📄 admin_newsmodifysave.asp
字号:
<!--#include file="session.asp"-->
<%checkAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
if request("SmallClassID")<>"" then
thisSmallClassID="&SmallClassID="&request("SmallClassID")
else
thisSmallClassID=""
end if
if request("bigclassname")<>"" then
thisurl="admin_NewsManaList.asp?BigClassName="&request("bigclassname")&thisSmallClassID
else
thisurl="admin_NewsManaList.asp"
end if
NewsID=request("NewsID")
Title=replace(trim(Request.Form("Title")),"'","''")
if Title="" then
%>
<script language=javascript>
history.back()
alert("请填写文章标题!")
</script>
<%
Response.End
end if
function changechr(str)
changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ")
end function
Author=replace(trim(Request.Form("Author")),"'","''")
Original=replace(trim(Request.Form("Original")),"'","''")
about=replace(trim(Request.Form("about")),"'","''")
Content=Request.Form("Content")
titleurl=Request.Form("titleurl")
if titleurl="" then
if Content="" or Content="<P> </P>"then
%>
<script language=javascript>
history.back()
alert("文章内容不能为空!")
</script>
<%
Response.End
end if
end if
FocusNews=Request.Form("FocusNews")
if FocusNews="" then
FocusNews=false
else
FocusNews=true
end if
goodnews=Request.Form("goodnews")
if goodnews="" then
goodnews=false
else
goodnews=true
end if
hot=Request.Form("hot")
if hot="" then
hot=false
else
hot=true
end if
if OpenCheck=True then
checked=Request.Form("checked")
if IsEmpty(checked) or checked=false Then
checked=false
else
checked=true
end if
else
checked=true
end if
image=Request.Form("image")
SpecialName=Request.Form("SpecialName")
EnCode=trim(Request.Form("EnCode"))
sql="select * from news where NewsID=" & NewsID
rs.open sql,conn,3,3
rs("title")=title
rs("titleurl")=titleurl
rs("Author")=Author
rs("content")=content
rs("FocusNews")=FocusNews
rs("goodnews")=goodnews
rs("hot")=hot
rs("checked")=checked
rs("model")=Request.Form("model")
rs("image")=image
rs("SpecialName")=SpecialName
rs("about")=about
rs("UpdateTime")=trim(request.Form("updatetime"))
rs.update
set rs=nothing
conn.close
set conn=nothing
response.redirect thisurl
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -