⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newspl_save.asp

📁 强大的后台文章编辑器的功能
💻 ASP
字号:
<!--#include file = admin_conn.asp -->

<%
function chkhtm(stra)
  stra=replace(stra,"<","&lt;")
  stra=replace(stra,">","&gt;")
  stra=replace(stra,"'","")
  stra=replace(stra,"(","(")
  stra=replace(stra,")",")")
  stra=replace(stra,";",";")
  stra=replace(stra,",",",")
  stra=replace(stra,"%","%")
  stra=replace(stra,"+","+")
  chkhtm=stra
end function

id=int(chkhtm(trim(request("id"))))
username=chkhtm(trim(request("username")))
content=chkhtm(trim(request("content")))
yzmm=int(trim(request("yzmm")))

if yzmm<>Session("VerifyCode") then
  Response.Write "<BR><BR><BR><center>验证码错误 <a href=javascript:history.back();>返回</a></center>"
  conn.close
  set conn=nothing
  Response.end
end if
Session("VerifyCode")=""
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")

if id<>"" and username<>"" and content<>"" then
  conn.Execute = "insert into newspl (username,content,addtime,ip,newsid) values('"&username&"','"&content&"',now(),'"&userip&"',"&id&")"
end if

conn.close
set conn=nothing

Response.Redirect "newspl.asp?id="&id
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -