tjmsg.asp

来自「修正的自由领域投票系统2.0 支持文件上传」· ASP 代码 · 共 49 行

ASP
49
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="const.asp"-->
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>留言处理中....</title>
</head>
<% dim id,sname,content,rs,sql
id=request.QueryString("id")
if id="" or (not isnumeric(id)) then
set conn=nothing
response.Redirect("index.asp")
response.End()
end if
sname=server.htmlencode(trim(request.Form("sname")))
content=server.htmlencode(request.form("content"))
mofei=trim(request.form("mofei"))
if cstr(session("getcode"))<>cstr(mofei) then
session("getcode")=""
response.Write("<script>window.alert('验证码失败!');window.location.href='./view.asp?id="&id&"';</script>")
set conn=nothing
response.End()
end if
if content="" then
response.Write("<script>window.alert('您没有填写内容哇!');history.go(-1)</script>")
response.End()
end if
session("getcode")=""
set rs=server.CreateObject("adodb.recordset")
sql="select * from pinlun"
rs.open sql,conn,3,2
rs.addnew
if sname="" then
sname="匿名"
end if
rs("pname")=sname
rs("content")=content
rs("shijian")=date
rs("uid")=id
rs.update
rs.close
set conn=nothing
response.Write("<script>window.alert('留言成功!');window.location.href='./view.asp?id="&id&"'</script>")
%><body>
</body>
</html>

⌨️ 快捷键说明

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